Home
last modified time | relevance | path

Searched refs:__code__ (Results 1 – 25 of 69) sorted by relevance

123

/external/python/cpython3/Lib/test/
Dtest_compile.py222 for variable in self.test_32_63_bit_values.__code__.co_consts:
306 self.assertNotEqual(id(f1.__code__), id(f2.__code__))
419 self.assertIn("_A__mangled", A.f.__code__.co_varnames)
420 self.assertIn("__not_mangled__", A.f.__code__.co_varnames)
421 self.assertIn("_A__mangled_mod", A.f.__code__.co_varnames)
422 self.assertIn("__package__", A.f.__code__.co_varnames)
581 for const in func.__code__.co_consts:
586 % (expected, func.__code__.co_consts))
601 self.assertIs(f1.__code__, f2.__code__)
614 self.assertIs(f1.__code__, f2.__code__)
[all …]
Dtest_code.py166 code = new_code(f.__code__)
183 self.assertFalse(function.__code__.co_flags & inspect.CO_NOFREE,
184 hex(function.__code__.co_flags))
259 coderef = weakref.ref(f.__code__, callback)
308 self.assertRaises(SystemError, SetExtra, f.__code__,
310 self.assertEqual(GetExtra(f.__code__, FREE_INDEX+100,
318 SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(100))
328 SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(200))
330 SetExtra(f.__code__, FREE_INDEX, ctypes.c_voidp(300))
334 GetExtra(f.__code__, FREE_INDEX, extra)
[all …]
Dtest_dis.py48 """ % (_C.__init__.__code__.co_firstlineno + 1,)
68 """ % (_C.cm.__code__.co_firstlineno + 2,)
77 """ % (_C.sm.__code__.co_firstlineno + 2,)
103 """ % (_f.__code__.co_firstlineno + 1,
104 _f.__code__.co_firstlineno + 2)
137 """ % (bug708901.__code__.co_firstlineno + 1,
138 bug708901.__code__.co_firstlineno + 2,
139 bug708901.__code__.co_firstlineno + 3)
165 """ % (bug1333982.__code__.co_firstlineno + 1,
167 bug1333982.__code__.co_firstlineno + 1,
[all …]
Dtest_funcattrs.py68 test.__code__ = self.b.__code__
160 self.assertEqual(type(func.__code__), types.CodeType)
163 d.__code__ = c.__code__
164 self.assertEqual(c.__code__, d.__code__)
168 b.__code__ = c.__code__
175 e.__code__ = d.__code__
Dtest_traceback.py294 lineno = prn.__code__.co_firstlineno
321 lineno_f = f.__code__.co_firstlineno
368 lineno_g = g.__code__.co_firstlineno
404 lineno_h = h.__code__.co_firstlineno
495 lineno = fmt.__code__.co_firstlineno
866 lineno = extract.__code__.co_firstlineno
997 ' v = 4\n' % (__file__, some_inner.__code__.co_firstlineno + 4)
Dtest_sys_settrace.py324 self.compare_events(func.__code__.co_firstlineno,
334 self.compare_events(func.__code__.co_firstlineno,
387 self.compare_events(generator_example.__code__.co_firstlineno,
534 frame.f_lineno == f.__code__.co_firstlineno + 2):
581 self.code = function.__code__
1287 __code__ = code variable in JumpTestCase.test_jump_to_firstlineno.fake_function
Dtest_scope.py561 self.assertRaises(TypeError, eval, g.__code__)
564 exec(g.__code__, {})
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_rpc.py12 func, (cbytes,) = rpc.pickle_code(f.__code__)
19 self.assertIn(type((lambda:None).__code__),
25 self.assertIn(b'test_rpc.py', rpc.dumps(f.__code__))
/external/python/cpython2/Lib/test/
Dtest_traceback.py215 lineno = prn.__code__.co_firstlineno
216 file = prn.__code__.co_filename
228 lineno = fmt.__code__.co_firstlineno
229 file = fmt.__code__.co_filename
247 lineno = extract.__code__.co_firstlineno
248 file = extract.__code__.co_filename
Dtest_compile.py627 for const in func.__code__.co_consts:
632 % (expected, func.__code__.co_consts))
647 self.assertIs(f1.__code__, f2.__code__)
666 self.assertIsNot(f1.__code__, f2.__code__)
679 self.assertIsNot(f1.__code__, f2.__code__)
Dtest_code.py179 coderef = weakref.ref(f.__code__, callback)
/external/python/cpython3/Lib/
Dtypes.py14 CodeType = type(_f.__code__)
55 GetSetDescriptorType = type(FunctionType.__code__)
246 co_flags = func.__code__.co_flags
257 co = func.__code__
258 func.__code__ = CodeType(
Dmodulefinder.py52 self.__code__ = None
303 m.__code__ = co
390 if mm.__code__ is None:
/external/python/cpython2/Lib/plat-mac/
Dappletrawmain.py58 __code__ = marshal.load(_fp) variable
64 exec __code__
Dbundlebuilder.py639 site.__code__ = self._getSiteCode()
640 mf.scan_code(site.__code__, site)
663 if path and mod.__code__ is None:
678 mod.__code__ = code
680 if mod.__code__ is not None:
685 self.pymodules.append((name, mod.__code__, ispkg))
/external/python/cpython3/Tools/freeze/
Dmakefreeze.py40 if m.__code__:
46 str = marshal.dumps(m.__code__)
/external/python/cpython2/Tools/freeze/
Dmakefreeze.py41 if m.__code__:
47 str = marshal.dumps(m.__code__)
/external/ply/ply/ply/
Dlex.py362 func.__code__.co_filename, func.__code__.co_firstlineno,
695 line = t.__code__.co_firstlineno
696 file = t.__code__.co_filename
721 f.sort(key=lambda x: x[1].__code__.co_firstlineno)
733 line = f.__code__.co_firstlineno
734 file = f.__code__.co_filename
743 nargs = f.__code__.co_argcount
802 line = f.__code__.co_firstlineno
803 file = f.__code__.co_filename
811 nargs = f.__code__.co_argcount
Dyacc.py3049 eline = self.error_func.__code__.co_firstlineno
3050 efile = self.error_func.__code__.co_filename
3054 argcount = self.error_func.__code__.co_argcount - ismethod
3135 line = getattr(item, 'co_firstlineno', item.__code__.co_firstlineno)
3165 if func.__code__.co_argcount > reqargs:
3168 elif func.__code__.co_argcount < reqargs:
3197 if ((isinstance(v, types.FunctionType) and v.__code__.co_argcount == 1) or
3198 (isinstance(v, types.MethodType) and v.__func__.__code__.co_argcount == 2)):
3204 v.__code__.co_filename, v.__code__.co_firstlineno, n)
/external/selinux/python/sepolgen/src/sepolgen/
Dlex.py362 func.__code__.co_filename, func.__code__.co_firstlineno,
695 line = t.__code__.co_firstlineno
696 file = t.__code__.co_filename
721 f.sort(key=lambda x: x[1].__code__.co_firstlineno)
733 line = f.__code__.co_firstlineno
734 file = f.__code__.co_filename
743 nargs = f.__code__.co_argcount
802 line = f.__code__.co_firstlineno
803 file = f.__code__.co_filename
811 nargs = f.__code__.co_argcount
/external/tensorflow/tensorflow/contrib/framework/python/ops/
Darg_scope.py102 return func.__code__.co_varnames[-kwargs_length:func.__code__.co_argcount]
/external/python/cpython3/Lib/asyncio/
Dformat_helpers.py13 code = func.__code__
/external/scapy/scapy/
Dautomaton.py474 for n in st.atmt_origfunc.__code__.co_names+st.atmt_origfunc.__code__.co_consts:
483 for n in f.__code__.co_names+f.__code__.co_consts:
493 for n in f.__code__.co_names+f.__code__.co_consts:
/external/python/cpython2/Lib/
Dmodulefinder.py76 self.__code__ = None
323 m.__code__ = co
436 if mm.__code__ is None:
/external/tensorflow/tensorflow/python/keras/utils/
Dgeneric_utils.py229 raw_code = marshal.dumps(func.__code__).replace(b'\\', b'/')
232 raw_code = marshal.dumps(func.__code__)

123