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-June/025950.html below:

[Python-Dev] Dict constructor

[Python-Dev] Dict constructor [Python-Dev] Dict constructorWalter Dörwald walter@livinglogic.de
Wed, 26 Jun 2002 15:55:38 +0200
Barry A. Warsaw wrote:

>>>>>>"RH" == Raymond Hettinger <python@rcn.com> writes:
>>>>>
> 
>     RH> Second wild idea of the day:
> 
>     RH> The dict constructor currently accepts sequences where each
>     RH> element has length 2, interpreted as a key-value pair.
> 
>     RH> Let's have it also accept sequences with elements of length 1,
>     RH> interpreted as a key:None pair.
> 
> None might be an unfortunate choice because it would make dict.get()
> less useful.  I'd prefer key:1

How about key:True ?

Bye,
    Walter Dörwald





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