home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / Software / psp8 / Data1.cab / types.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2003-04-22  |  3.1 KB  |  92 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.2)
  3.  
  4. '''Define names for all type symbols known in the standard interpreter.
  5.  
  6. Types that are part of optional modules (e.g. array) are not listed.
  7. '''
  8. from __future__ import generators
  9. import sys
  10. NoneType = type(None)
  11. TypeType = type
  12. ObjectType = object
  13. IntType = int
  14. LongType = long
  15. FloatType = float
  16.  
  17. try:
  18.     ComplexType = complex
  19. except NameError:
  20.     pass
  21.  
  22. StringType = str
  23.  
  24. try:
  25.     UnicodeType = unicode
  26.     StringTypes = (StringType, UnicodeType)
  27. except NameError:
  28.     StringTypes = (StringType,)
  29.  
  30. BufferType = type(buffer(''))
  31. TupleType = tuple
  32. ListType = list
  33. DictType = DictionaryType = dict
  34.  
  35. def _f():
  36.     pass
  37.  
  38. FunctionType = type(_f)
  39. LambdaType = type((lambda : None))
  40.  
  41. try:
  42.     CodeType = type(_f.func_code)
  43. except RuntimeError:
  44.     pass
  45.  
  46.  
  47. def g():
  48.     yield 1
  49.  
  50. GeneratorType = type(g())
  51. del g
  52.  
  53. class _C:
  54.     
  55.     def _m(self):
  56.         pass
  57.  
  58.  
  59. ClassType = type(_C)
  60. UnboundMethodType = type(_C._m)
  61. _x = _C()
  62. InstanceType = type(_x)
  63. MethodType = type(_x._m)
  64. BuiltinFunctionType = type(len)
  65. BuiltinMethodType = type([].append)
  66. ModuleType = type(sys)
  67. FileType = file
  68. XRangeType = type(xrange(0))
  69.  
  70. try:
  71.     raise TypeError
  72. except TypeError:
  73.     
  74.     try:
  75.         tb = sys.exc_info()[2]
  76.         TracebackType = type(tb)
  77.         FrameType = type(tb.tb_frame)
  78.     except AttributeError:
  79.         pass
  80.  
  81.     tb = None
  82.     del tb
  83.  
  84. SliceType = type(slice(0))
  85. EllipsisType = type(Ellipsis)
  86. DictProxyType = type(TypeType.__dict__)
  87. del sys
  88. del _f
  89. del _C
  90. del _x
  91. del generators
  92.