[Python-Dev] [Python 2.2 BUG] pickle/cPickle does not find slots (original) (raw)

Kevin Jacobs jacobs@penguin.theopalgroup.com
Fri, 15 Feb 2002 13:08:39 -0500 (EST)


On Fri, 15 Feb 2002, john coppola wrote:

Hi Kevin. I'm with you slots have great potential. First of all, I think it is a very bad idea that slots could be mutable.

They don't have to be mutable -- its more a relic of the implementation. e.g.:

class A(object): slots = ('a','b')

A.slots.append('c')

Traceback (most recent call last): File "", line 1, in ? AttributeError: 'tuple' object has no attribute 'append'

Of course, I think that this is something of a mistake, though I'll reserve final justment until after I've heard Guido's reasoning. Its clear that he has bigger plans for both the syntax and semantics (especially if you heard some of his off-hand remarks at IPC10).

-Kevin

-- Kevin Jacobs The OPAL Group - Enterprise Systems Architect Voice: (216) 986-0710 x 19 E-mail: jacobs@theopalgroup.com Fax: (216) 986-0714 WWW: http://www.theopalgroup.com