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/2000-July/005423.html below:

[Python-Dev] Re: \ud800 crashes interpreter (PR#384)

[Python-Dev] Re: \ud800 crashes interpreter (PR#384)Ka-Ping Yee ping@lfw.org
Tue, 4 Jul 2000 14:40:21 -0700 (PDT)
On Tue, 4 Jul 2000, M.-A. Lemburg wrote:
> 
> The reasoning at the time was that dictionaries should accept
> Unicode objects as keys which match their string equivalents
> as the same key, e.g. 'abc' works just as well as u'abc'.
[...]
> According to the docs, objects comparing equal should have the
> same hash value, yet this would require the hash value to be
> calculated using the default encoding and that
> would not only cause huge performance problems, but could
> effectively render Unicode useless,

Given the new 7-bit-ASCII-as-default-encoding-for-8-bit-strings
convention, shouldn't just hashing the character values work
fine?  That is, hash('abc') should == hash(u'abc'), no conversion
required.


-- ?!ng




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