Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Thomas Heller Newsgroups: comp.lang.python Subject: Re: Problems with subclassing enum34 Date: Fri, 28 Jun 2013 17:32:10 +0200 Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net UQvTrJC6P3gNTCjwBtMtIgy9Crz82X3aKSpBWlY1Nzqx0UZnk= Cancel-Lock: sha1:Y2fBw3adDRKQaQbpUSR8eENB0Wk= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: Xref: csiph.com comp.lang.python:49380 Am 28.06.2013 17:25, schrieb Thomas Heller: > Robert Kern: > >> >> enum.EnumMeta uses super() in its __new__() implementation but >> _ctypes.PyCSimpleType doesn't. Thus, only >> _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the >> order of the two might work. >> > > Robert found the problem but I'm unsure if there is a solution. > Also I'm unsure whether this is a bug in ctypes or in enum or if > they are simply incompatible. I forgot to mention that switching the order of metaclasses didn't work. Thomas