This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, ethan.furman, mark, serhiy.storchaka
Date 2014-08-02.18:39:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407004742.88.0.854945663648.issue22123@psf.upfronthosting.co.za>
In-reply-to
Content
This will be fragile because the behavior will be depend from the number of keyword argument. Hypothetic example:

>>> kwargs = {'a': 1}
>>> obj = object(**kwargs)
>>> obj.b = 2  # success
>>> kwargs = {}  # empty
>>> obj = object(**kwargs)
>>> obj.b = 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'object' object has no attribute 'b'

For now you need only one or two line of code to declare new class.

>>> class Object: pass
... 
>>> obj = Object()
>>> obj.a = 1
>>> obj.b = 2
History
Date User Action Args
2014-08-02 18:39:03serhiy.storchakasetrecipients: + serhiy.storchaka, barry, mark, ethan.furman
2014-08-02 18:39:02serhiy.storchakasetmessageid: <1407004742.88.0.854945663648.issue22123@psf.upfronthosting.co.za>
2014-08-02 18:39:02serhiy.storchakalinkissue22123 messages
2014-08-02 18:39:02serhiy.storchakacreate