News for hackers. Stuff that matters.
Re:Python: What the Hell is a Slot? by jrockway on Tuesday July 07, 2009 @06:30AM (#691242)
A nice feature, but it's too bad there is not a full instance metaclass for precisely controlling how each instance is stored. Perl and Common Lisp have this.
Re:Python: What the Hell is a Slot? by cpr on Tuesday July 07, 2009 @09:19AM (#691396)
Maybe I don't understand all that "full instance metaclass" implies, but if you use properties, you can control how each member is handled. With properties for each instance member, seems like you have total control.

Or is that just not convenient or powerful enough?

Re:Python: What the Hell is a Slot? by alphazero on Tuesday July 07, 2009 @10:11AM (#691475)
Given an unknown object, how would your program distinguish between meta-info and property?
Re:Python: What the Hell is a Slot? by kragen on Wednesday July 08, 2009 @02:08AM (#693407)
There is. ZODB uses it to provide software transactional memory. __slots__ is just a handy feature of the default metaclass, IIRC.