$36 GRAYBYTE WORDPRESS FILE MANAGER $30

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 91.108.106.9 | ADMIN IP 216.73.216.99
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/usr/lib64/python3.6/lib2to3/fixes/

HOME
Current File : /usr/lib64/python3.6/lib2to3/fixes//fix_itertools.py
""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    """

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixItertools(fixer_base.BaseFix):
    BM_compatible = True
    it_funcs = "('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')"
    PATTERN = """
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              """ %(locals())

    # Needs to be run after fix_(map|zip|filter)
    run_order = 6

    def transform(self, node, results):
        prefix = None
        func = results['func'][0]
        if ('it' in results and
            func.value not in ('ifilterfalse', 'izip_longest')):
            dot, it = (results['dot'], results['it'])
            # Remove the 'itertools'
            prefix = it.prefix
            it.remove()
            # Replace the node which contains ('.', 'function') with the
            # function (to be consistent with the second part of the pattern)
            dot.remove()
            func.parent.replace(func)

        prefix = prefix or func.prefix
        func.replace(Name(func.value[1:], prefix=prefix))

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
28 Feb 2025 12.45 AM
root / root
0755
__pycache__
--
28 Feb 2025 12.45 AM
root / root
0755
__init__.py
0.046 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_apply.py
2.373 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_asserts.py
0.961 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_basestring.py
0.313 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_buffer.py
0.576 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_dict.py
3.672 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_except.py
3.266 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_exec.py
0.956 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_execfile.py
2 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_exitfunc.py
2.437 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_filter.py
2.589 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_funcattrs.py
0.629 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_future.py
0.534 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_getcwdu.py
0.44 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_has_key.py
3.121 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_idioms.py
4.762 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_import.py
3.18 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_imports.py
5.551 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_imports2.py
0.282 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_input.py
0.691 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_intern.py
1.206 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_isinstance.py
1.57 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_itertools.py
1.512 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_itertools_imports.py
2.037 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_long.py
0.465 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_map.py
3.555 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_metaclass.py
8.005 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_methodattrs.py
0.592 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_ne.py
0.558 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_next.py
3.1 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_nonzero.py
0.577 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_numliterals.py
0.75 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_operator.py
3.39 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_paren.py
1.198 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_print.py
2.777 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_raise.py
2.857 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_raw_input.py
0.443 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_reduce.py
0.817 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_reload.py
1.127 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_renames.py
2.169 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_repr.py
0.599 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_set_literal.py
1.657 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_standarderror.py
0.438 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_sys_exc.py
1.01 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_throw.py
1.545 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_tuple_params.py
5.435 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_types.py
1.732 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_unicode.py
1.227 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_urllib.py
8.157 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_ws_comma.py
1.064 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_xrange.py
2.631 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_xreadlines.py
0.673 KB
23 Dec 2018 9.37 PM
root / root
0644
fix_zip.py
1.259 KB
23 Dec 2018 9.37 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF