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/2013-April/125611.html below:

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library

[Python-Dev] PEP 435 -- Adding an Enum type to the Python standard library [Python-Dev] PEP 435 -- Adding an Enum type to the Python standard libraryGuido van Rossum guido at python.org
Fri Apr 26 19:36:08 CEST 2013
On Fri, Apr 26, 2013 at 10:33 AM, Glenn Linderman <v+python at g.nevcal.com> wrote:
> On 4/25/2013 9:19 PM, Guido van Rossum wrote:
>
> On Thu, Apr 25, 2013 at 8:39 PM, Glenn Linderman <v+python at g.nevcal.com>
> wrote:
>
> an enumeration of objects whose class defines __call__ would
> not be so weird.
>
> Seriously? You'd complexificate the basic usage in order to cater for
> such an esoteric use case? The *only* use cases that matter at all for
> enum values are ints and strings, and even the latter could be
> considered a luxury when compared to other languages' enums.
>
>
> No, I'd look for a solution/implementation that doesn't divide objects into
> "plain" and "esoteric" cases. Py3 now treats everything as objects. So an
> enumeration should be able to deal with any object as a value.

I think you've lost track of the Zen of Python.

--
--Guido van Rossum (python.org/~guido)
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