[Python-checkins] python/dist/src/Lib pickle.py,1.141,1.142

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Mon, 03 Feb 2003 10:10:15 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23466

Modified Files:
	pickle.py 
Log Message:
_slotnames(): exclude __dict__ and __weakref__; these aren't real
slots even though they can be listed in __slots__.


Index: pickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** pickle.py	3 Feb 2003 16:59:48 -0000	1.141
--- pickle.py	3 Feb 2003 18:10:09 -0000	1.142
***************
*** 882,886 ****
      for c in cls.__mro__:
          if "__slots__" in c.__dict__:
!             names += list(c.__dict__["__slots__"])
      return names
  
--- 882,887 ----
      for c in cls.__mro__:
          if "__slots__" in c.__dict__:
!             names += [name for name in c.__dict__["__slots__"]
!                            if name not in ("__dict__", "__weakref__")]
      return names