[Tutor] object's attributes

Kent Johnson kent37 at tds.net
Fri Jan 2 20:29:35 CET 2009


On Fri, Jan 2, 2009 at 1:36 PM, Paul McGuire <ptmcg at austin.rr.com> wrote:

> The example you cited of creating a thin derived class from object, for the
> simple purpose of supporting dynamically assigned attributes, sometimes goes
> by the name Bag, from the Smalltalk object framework.

Another variation is Bunch, though perhaps namedtuple() makes this obsolete:
http://code.activestate.com/recipes/52308/

Kent


More information about the Tutor mailing list