On 2 Dec 2007, at 03:09, Neil Toronto wrote:

> Are there any use-cases for allowing namespace dicts (such as globals,
> builtins and classes) to have non-string keys? I'm asking because I'm
> planning on accelerating method lookups next, and the possibility of a
> key compare changing the underlying dict could be a major pain. (It  
> was
> a minor pain for globals.)

The only plausible use case I can think of might be wanting to use  
ints or longs as keys, though I've never seen it done.  Of course this  
would be trivial to code around and it seems very much a fringe case,  
so I'd be in favour of deprecating non-string namespace keys if it's  
going to make look-ups go faster.

        Cheers,
                Nicko

_______________________________________________
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