A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-December/075510.html below:

[Python-Dev] Non-string keys in namespace dicts

[Python-Dev] Non-string keys in namespace dicts [Python-Dev] Non-string keys in namespace dictsNicko van Someren nicko at nicko.org
Sun Dec 2 20:06:29 CET 2007
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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4