[Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module? (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Mon Apr 25 14:52:20 CEST 2011
- Previous message: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?
- Next message: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 25 Apr 2011 14:04:35 +0200 haael <haael at interia.pl> wrote:
Sorry if I am asking the obvious, but why are the aliases of set types not included in the 'types' module?
Because there's no reason to include them, since they are already in the root (builtins) namespace.
You'll notice that in Python 3, the "types" module only contains types which are not obviously accessed through easier means:
dir(types) ['BuiltinFunctionType', 'BuiltinMethodType', 'CodeType', 'FrameType', 'FunctionType', 'GeneratorType', 'GetSetDescriptorType', 'LambdaType', 'MemberDescriptorType', 'MethodType', 'ModuleType', 'TracebackType', 'builtins', 'cached', 'doc', 'file', 'name', 'package']
Regards
Antoine.
- Previous message: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?
- Next message: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]