GRAYBYTE WORDPRESS FILE MANAGER5986

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/python34/lib64/python3.4/lib2to3/fixes/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/python34/lib64/python3.4/lib2to3/fixes//fix_filter.py
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
"""

# Local imports
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, Call, ListComp, in_special_context

class FixFilter(fixer_base.ConditionalFix):
    BM_compatible = True

    PATTERN = """
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
    >
    """

    skip_on = "future_builtins.filter"

    def transform(self, node, results):
        if self.should_skip(node):
            return

        if "filter_lambda" in results:
            new = ListComp(results.get("fp").clone(),
                           results.get("fp").clone(),
                           results.get("it").clone(),
                           results.get("xp").clone())

        elif "none" in results:
            new = ListComp(Name("_f"),
                           Name("_f"),
                           results["seq"].clone(),
                           Name("_f"))

        else:
            if in_special_context(node):
                return None
            new = node.clone()
            new.prefix = ""
            new = Call(Name("list"), [new])
        new.prefix = node.prefix
        return new

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 20 2024 08:31:37
root / linksafe
0755
__pycache__
--
May 20 2024 08:31:37
root / linksafe
0755
__init__.py
0.046 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_apply.py
1.856 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_asserts.py
0.961 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_basestring.py
0.313 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_buffer.py
0.576 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_callable.py
1.124 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_dict.py
3.722 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_except.py
3.266 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_exec.py
0.978 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_execfile.py
1.943 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_exitfunc.py
2.437 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_filter.py
2.053 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_funcattrs.py
0.629 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_future.py
0.534 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_getcwdu.py
0.44 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_has_key.py
3.146 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_idioms.py
4.762 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_import.py
3.18 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_imports.py
5.551 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_imports2.py
0.282 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_input.py
0.691 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_intern.py
0.756 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_isinstance.py
1.57 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_itertools.py
1.512 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_itertools_imports.py
2.037 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_long.py
0.465 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_map.py
2.986 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_metaclass.py
8.01 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_methodattrs.py
0.592 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_ne.py
0.558 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_next.py
3.1 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_nonzero.py
0.583 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_numliterals.py
0.75 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_operator.py
3.39 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_paren.py
1.198 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_print.py
2.787 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_raise.py
2.857 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_raw_input.py
0.443 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_reduce.py
0.817 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_reload.py
0.677 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_renames.py
2.169 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_repr.py
0.599 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_set_literal.py
1.657 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_standarderror.py
0.438 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_sys_exc.py
1.01 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_throw.py
1.545 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_tuple_params.py
5.435 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_types.py
1.755 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_unicode.py
1.227 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_urllib.py
8.188 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_ws_comma.py
1.064 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_xrange.py
2.631 KB
April 17 2024 17:10:02
root / linksafe
0644
fix_xreadlines.py
0.673 KB
April 17 2024 17:10:01
root / linksafe
0644
fix_zip.py
0.881 KB
April 17 2024 17:10:02
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF