[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread Timothy Cardenas
Timothy Cardenas added the comment: Ahhh i see now. Even the simple case "class Foo(bar='baz'): pass" fails. I misunderstood the documentation then. I thought that python 3 introduced a new interface for all classes when it actually just introduced the option to add keyword arguments to your

[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread R. David Murray
R. David Murray added the comment: Yes, this is exactly analogous to object.__init__ not accepting arguments, but subclasses being free to do so. ABCMeta *does* adopt the contract. keyword arguments to the class constructor are not accepted unless you write a meta class that accepts them. P

[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread Yury Selivanov
Yury Selivanov added the comment: > Wouldn't it be much easier and technically correct for the core ABCMeta > library to adopt the same interface contract for class creation introduced in > python3? No, it would not be technically correct. For the same reason, object.__init__ does not accept

[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread Timothy Cardenas
Timothy Cardenas added the comment: Hmm Ok. You are right i can do the following: from collections import UserDict from abc import ABCMeta class MetaMyDict(ABCMeta): @classmethod def __prepare__(cls, name, bases, **kwargs): return {} def __new__(mcls, name, bases, namespa

[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread R. David Murray
R. David Murray added the comment: ABCMeta does not support arbitrary keyword arguments, that is correct. If you want keyword arguments to be handled, you need to write your own metaclass that does so. (I'm pretty sure I'm reading the PEP correctly...if not I'm sure one of the other core dev

[issue24183] ABCMeta classes do not support the **kwargs standard class interface

2015-05-13 Thread Timothy Cardenas
New submission from Timothy Cardenas: Summary: Any class that derives from the ABCMeta class doesn't support keyword variable arguments as defined here :https://www.python.org/dev/peps/pep-3115/. Expected: If i define a simple class that derives from ABCMeta that has a kwarg the class should