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

[Python-Dev] AutoNumber Enum

[Python-Dev] AutoNumber Enum [Python-Dev] AutoNumber EnumEthan Furman ethan at stoneleaf.us
Thu Jun 30 00:29:30 EDT 2016
On 06/29/2016 03:40 PM, Roberto Martínez wrote:

> Why the 'start' parameter default is 1? 0 (zero) is more consistent with
> other parts of the language: indexes, enumerate, range...

An excerpt from [1]:

> The reason for defaulting to 1 as the starting number and not 0 is that 0 is False in a boolean sense, but enum members all evaluate to True.

--
~Ethan~


[1] https://docs.python.org/3/library/enum.html#functional-api

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