/opt/alt/python33/lib64/python3.3/lib2to3/fixes
NameSizeModeActions
__pycache__/-0755rm
fix_apply.py19010644editdlrm
fix_basestring.py3200644editdlrm
fix_buffer.py5900644editdlrm
fix_callable.py11510644editdlrm
fix_dict.py38160644editdlrm
fix_except.py33440644editdlrm
fix_exec.py10010644editdlrm
fix_execfile.py19900644editdlrm
fix_exitfunc.py24970644editdlrm
fix_filter.py21020644editdlrm
fix_funcattrs.py6440644editdlrm
fix_future.py5470644editdlrm
fix_getcwdu.py4510644editdlrm
fix_has_key.py32220644editdlrm
fix_idioms.py48760644editdlrm
fix_import.py32560644editdlrm
fix_imports.py56840644editdlrm
fix_imports2.py2890644editdlrm
fix_input.py7070644editdlrm
fix_intern.py14020644editdlrm
fix_isinstance.py16080644editdlrm
fix_itertools.py15480644editdlrm
fix_itertools_imports.py20860644editdlrm
fix_long.py4760644editdlrm
fix_map.py30580644editdlrm
fix_metaclass.py82010644editdlrm
fix_methodattrs.py6060644editdlrm
fix_ne.py5710644editdlrm
fix_next.py31740644editdlrm
fix_nonzero.py5970644editdlrm
fix_numliterals.py7680644editdlrm
fix_operator.py34710644editdlrm
fix_paren.py12270644editdlrm
fix_print.py28540644editdlrm
fix_raise.py29260644editdlrm
fix_raw_input.py4540644editdlrm
fix_reduce.py8370644editdlrm
fix_renames.py22210644editdlrm
fix_repr.py6130644editdlrm
fix_set_literal.py16970644editdlrm
fix_standarderror.py4490644editdlrm
fix_sys_exc.py10340644editdlrm
fix_throw.py15820644editdlrm
fix_tuple_params.py55650644editdlrm
fix_types.py17970644editdlrm
fix_unicode.py12560644editdlrm
fix_urllib.py83840644editdlrm
fix_ws_comma.py10900644editdlrm
fix_xrange.py26940644editdlrm
fix_xreadlines.py6890644editdlrm
fix_zip.py9020644editdlrm
__init__.py470644editdlrm
Edit: /opt/alt/python33/lib64/python3.3/lib2to3/fixes/fix_callable.py (1151B)
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for callable(). This converts callable(obj) into isinstance(obj, collections.Callable), adding a collections import if needed.""" # Local imports from lib2to3 import fixer_base from lib2to3.fixer_util import Call, Name, String, Attr, touch_import class FixCallable(fixer_base.BaseFix): BM_compatible = True order = "pre" # Ignore callable(*args) or use of keywords. # Either could be a hint that the builtin callable() is not being used. PATTERN = """ power< 'callable' trailer< lpar='(' ( not(arglist | argument) any ','> ) rpar=')' > after=any* > """ def transform(self, node, results): func = results['func'] touch_import(None, 'collections', node=node) args = [func.clone(), String(', ')] args.extend(Attr(Name('collections'), Name('Callable'))) return Call(Name('isinstance'), args, prefix=node.prefix)