Hi,

2012/3/8 Ethan Furman <et...@stoneleaf.us>:
>>> A little more experimentation shows that not all is well, however:
>>>
>>> --> dir(Test)
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in <module>
>>> TypeError: unorderable types: int() < str()
>>
>>
>> So what conclusion do you draw?
>
>
> That other changes (that have definitely been for the better) are making the
> 'feature' of non-string keys in namespace dicts less and less friendly.
>  Rather than letting it slowly fall into complete shambles we should go
> ahead and deprecate, then remove, that functionality.

Not that I disagree with the conclusion, but the obvious thing to do here
is to fix dir() and return only string attributes, i.e. those you can
access with getattr.

Cheers,

-- 
Amaury Forgeot d'Arc
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to