Feature Requests item #1637926, was opened at 2007-01-17 18:51
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1637926&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: kxroberto (kxroberto)
Assigned to: Nobody/Anonymous (nobody)
Summary: Empty class 'Object'

Initial Comment:
An empty class 'Object' in builtins, which can be instantiated (with optional 
inline arguments as attributes (like dict)), and attributes added. Convenience 
- Easy OO variable container - known to pickle etc.

http://groups.google.com/group/comp.lang.python/msg/3ff946e7da13dba9

http://groups.google.de/group/comp.lang.python/msg/a02f0eb4efb76b24

idea:

class X(object):
    def __init__(self,_d={},**kwargs):
        kwargs.update(_d)
        self.__dict__=kwargs
class Y(X):
    def __repr__(self):
        return '<Y:%s>'%self.__dict__

------

x=X(spam=1) 
x.a=3




Robert

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1637926&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to