> I stripped your code down to the essence. See attachment. > For the user your approach then becomes: > > class grouping: > __metaclass__ = autoattr > def __init__(self, x, y, z): > pass
No. This is clearly NOT what I had in mind. I translated your original proposal which introduced a punctuation syntax '.x' for constructor parameters forcing the interpreter to create equally named object attributes into a naming convention that can be handled by a metaclass customizer. The grouping.__init__ above does exacly nothing according to my implementation. I would never accept dropping fine-tuning capabilities. The "auto_" prefix is all the declarative magic. > My __autoinit__ suggestion would result in (assuming object supports > this by default): > > class grouping(object): > def __autoinit__(self, x, y, z): > pass > > I think that's far more intuitive. Being intuitive is relative to someones intuition. Kay -- http://mail.python.org/mailman/listinfo/python-list