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

[Python-Dev] AutoNumber Enum

[Python-Dev] AutoNumber EnumLarry Hastings larry at hastings.org
Wed Jun 29 16:28:48 EDT 2016
On 06/29/2016 01:01 PM, Ivan Levkivskyi wrote:
> It looks like the values in AutoNumberEnum are consecutive integers 
> 1,2,3,...
> Have you considered an option (keyword argument) to change this to 
> powers of two 1,2,4,8,...?

Why would you want that?  I remind you that this descends from Enum, so 
its members won't be directly interchangeable with ints. Presumably you 
want a bitfield enum, and those should descend from IntEnum.

TBH I'd prefer the AutoNumberEnum *not* have this feature; it's already 
a little too magical for my tastes.


//arry/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160629/5b1e164d/attachment.html>
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