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/2006-August/068205.html below:

[Python-Dev] dict containment annoyance

[Python-Dev] dict containment annoyance [Python-Dev] dict containment annoyanceGeorg Brandl g.brandl at gmx.net
Sat Aug 12 20:10:54 CEST 2006
tomer filiba wrote:
> [Aahz]
>> -1
>>
>> This is seriously no different from an attempt to do
>>
>> >>> a = {}
>> >>> a[ [] ] = 1
> 
> how so? i'm not trying to modify/store anything in a dict.
> i'm only testing if a certain object is contained in the dict.
> that's totally different.
> imagine this:
>>>> x = 6
>>>> x < 2
> am i trying to modify 'x' in any way? i'm only testing if x is
> less than 2.

The correct analogon is

 >>> x = []
 >>> x < 2

which currently works in Python, but won't in 3.0.

Georg

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