INNER CODE UNIT · Python

func

PyAbel/PyAbel · abel/__init__.py:14

def func(..., arg_old=_deprecated, arg_new):
    if arg_old is not _deprecated:
        _deprecate('abel.submodule.func() '
                   'argument "arg_old" is deprecated, use "arg_new" instead.')
        arg_new = arg_old
    ...

In unit tests:

# to suppress deprecation warnings
from warnings import catch_warnings, simplefilter

def test_something():
    ...
    with catch_warnings():
        simplefilter('ignore', category=DeprecationWarning)
        # test deprecated function/arguments
        ...

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…