"Peter Otten" <__pete...@web.de> a écrit dans le message de
news:mailman.34.1477663877.31204.python-l...@python.org...
ast wrote:
class T(type):
... def __new__(*args, **kw): return type.__new__(*args)
... def __prepare__(*args, **kw):
... print(kw)
... return {}
...
ast wrote:
> Hi
>
> On python doc here:
>
> https://docs.python.org/3.4/reference/datamodel.html
>
> it is said about __prepare__ metaclass's method:
>
> If the metaclass has a __prepare__ attribute, it is called as
> namespace = metaclass.__prepare
Hi
On python doc here:
https://docs.python.org/3.4/reference/datamodel.html
it is said about __prepare__ metaclass's method:
If the metaclass has a __prepare__ attribute, it is called as
namespace = metaclass.__prepare__(name, bases, **kwds)
where the additional keyword arguments, i