iota/codecs.py
def check_trytes_codec(encoding):
    """
    Determines which codec to use for the specified encoding.

    References:

    - https://docs.python.org/3/library/codecs.html#codecs.register
    """
    if encoding == AsciiTrytesCodec.name:
        return AsciiTrytesCodec.get_codec_info()

    elif encoding == AsciiTrytesCodec.compat_name:
        warn(
            '"{old_codec}" codec will be removed in PyOTA v2.1. '
            'Use "{new_codec}" instead.'.format(
                new_codec=AsciiTrytesCodec.name,
                old_codec=AsciiTrytesCodec.compat_name,
            ),

            DeprecationWarning,
        )
        return AsciiTrytesCodec.get_codec_info()

    return None
def check_trytes_codec(encoding):
    if encoding == AsciiTrytesCodec.name:
        return AsciiTrytesCodec.get_codec_info()

    elif encoding == AsciiTrytesCodec.compat_name:
        warn(
            '"{old_codec}" codec will be removed in PyOTA v2.1. '
            'Use "{new_codec}" instead.'.format(
                new_codec=AsciiTrytesCodec.name,
                old_codec=AsciiTrytesCodec.compat_name,
            ),

            DeprecationWarning,
        )
        return AsciiTrytesCodec.get_codec_info()

    return None
def check_trytes_codec ( encoding ) : if encoding == AsciiTrytesCodec . name : return AsciiTrytesCodec . get_codec_info ( ) elif encoding == AsciiTrytesCodec . compat_name : warn ( '"{old_codec}" codec will be removed in PyOTA v2.1. ' 'Use "{new_codec}" instead.' . format ( new_codec = AsciiTrytesCodec . name , old_codec = AsciiTrytesCodec . compat_name , ) , DeprecationWarning , ) return AsciiTrytesCodec . get_codec_info ( ) return None
Determines which codec to use for the specified encoding.

    References:

    - https://docs.python.org/3/library/codecs.html#codecs.register
Determines which codec to use for the specified encoding .