diff options
author | Guido van Rossum <guido@python.org> | 1994-09-29 10:04:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-09-29 10:04:43 (GMT) |
commit | adc940eabfdb69c6adb3764f35fa00d057e3c3d5 (patch) | |
tree | 1590c90f864ae470afe6b1a4a00d3b6dffbf196d /Lib | |
parent | e433c974bcf890403d80b7a6c1c53ea2f583faea (diff) | |
download | cpython-adc940eabfdb69c6adb3764f35fa00d057e3c3d5.zip cpython-adc940eabfdb69c6adb3764f35fa00d057e3c3d5.tar.gz cpython-adc940eabfdb69c6adb3764f35fa00d057e3c3d5.tar.bz2 |
Cosmetic changes
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/types.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Lib/types.py b/Lib/types.py index 531d405..56dec04 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -16,22 +16,25 @@ TupleType = type(()) ListType = type([]) DictionaryType = type({}) -def func(): pass -FunctionType = type(func) - -class C: - def meth(self): pass -ClassType = type(C) -UnboundMethodType = type(C.meth) # Same as MethodType -x = C() -InstanceType = type(x) -MethodType = type(x.meth) - -BuiltinFunctionType = type(len) # Also used for built-in methods +def _f(): pass +FunctionType = type(_f) +LambdaType = type(lambda: None) # Same as FunctionType +CodeType = type(_f.func_code) + +class _C: + def _m(self): pass +ClassType = type(_C) +UnboundMethodType = type(_C._m) # Same as MethodType +_x = _C() +InstanceType = type(_x) +MethodType = type(_x._m) + +BuiltinFunctionType = type(len) +BuiltinMethodType = type([].append) # Same as BuiltinFunctionType ModuleType = type(sys) -FileType = type(sys.stdin) +FileType = type(sys.stdin) # XXX what if it was assigned to? XRangeType = type(xrange(0)) try: @@ -40,4 +43,4 @@ except TypeError: TracebackType = type(sys.exc_traceback) FrameType = type(sys.exc_traceback.tb_frame) -del sys, func, C, x # These are not for export +del sys, _f, _C, _x # Not for export |