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/2002-April/022199.html below:

[Python-Dev] Re: PEP 285: Adding a bool type

[Python-Dev] Re: PEP 285: Adding a bool type [Python-Dev] Re: PEP 285: Adding a bool typeMark McEahern marklists@mceahern.com
Wed, 3 Apr 2002 12:26:32 -0600
[Ka-Ping Yee]
> What about this:
>
>     >>> d = {}
>     >>> d[0] = 'zero'
>     >>> d[False] = 'false'
>     >>> len(d)
>     1 or 2?

This returns:

  1

Just curious:  If you were using True and False as keys to a dictionary,
would you ever expect len(d) to return something > 2?

// mark





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