'python 3 types module
Why is the types module in Python 3 so small?
Python 2.7
>>> import types
>>> print(len([i for i in dir(types) if not i.startswith('__')]))
37
Python 3.2
>>> import types
>>> print(len([i for i in dir(types) if not i.startswith('__')]))
12
Solution 1:[1]
In Python 3.x, the types module removed all types that are already accessible via easier means like the builtin namespace. For example, you will see that ListType and IntType have been removed because you can simply access them via list and int respectively.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ToBeReplaced |
