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

[Python-Dev] enum instances

[Python-Dev] enum instancesNikolaus Rath Nikolaus at rath.org
Wed May 1 04:25:10 CEST 2013
On 04/30/2013 07:05 PM, Nikolaus Rath wrote:
> Larry Hastings <larry at hastings.org> writes:
>> On 04/29/2013 07:42 PM, Nikolaus Rath wrote:
>>> State is a class, it just inherits from enum. Thus:
>>>
>>> type(State) == type(enum) == type(EnumMetaclass)
>>> issubclass(State, enum) == True
>>>
>>
>> If you'd tried it, you'd have found that that isn't true.  enum has a
>> metaclass, EnumMetaclass.  Thus type(enum) == EnumMetaClass.
> 
> That is exactly what I wrote above.

Sorry, I must have read what I thought rather than what I wrote. You're
right, what I wrote was wrong.


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C
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