Menu

#337 metaclass definition not recognized when indirect

open
nobody
None
5
2009-02-04
2009-02-04
No

When I do this:

class Foo(type):
def __init__(cls, classname, bases, dict_):
pass

all is well. But when I then do this:

class Bar(Foo):
def __init__(cls, classname, bases, dict_):
pass

the __init__ is error-highlighted, saying it should have self as first parameter. But this is valid, because Bar is a valid metaclass, because it is a subclass of Foo, which is a subclass of type.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.