[Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread haael
Sorry if I am asking the obvious, but why are the aliases of set types not included in the 'types' module? I thought for a moment that they are just classes, but no, they introduce themselves as built-in types, just like any other standard Python type. print type(set([1, 2, 4])) type 'set'

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread Antoine Pitrou
On Mon, 25 Apr 2011 14:04:35 +0200 haael ha...@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

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread Fred Drake
On Mon, Apr 25, 2011 at 8:04 AM, haael ha...@interia.pl wrote: Sorry if I am asking the obvious, but why are the aliases of set types not included in the 'types' module? I thought for a moment that they are just classes, but no, they introduce themselves as built-in types, just like any other

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread haael
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: OK, makes sense, but in this case it would be handy to have some

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread Benjamin Peterson
2011/4/25 haael ha...@interia.pl: 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: OK, makes sense, but in this

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread exarkun
On 02:01 pm, ha...@interia.pl wrote: 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: OK, makes sense, but in this

Re: [Python-Dev] Why are there no 'set' and 'frozenset' types in the 'types' module?

2011-04-25 Thread haael
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: OK, makes sense, but in this case it would be handy to have some