[Python-checkins] CVS: python/nondist/peps pep-0232.txt,1.11,1.12

Barry Warsaw bwarsaw@users.sourceforge.net
Tue, 14 Aug 2001 10:52:08 -0700


Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv23092

Modified Files:
	pep-0232.txt 
Log Message:
Resolution of SF bug # 446645 changes the semantics for __dict__ when
deleting it or getting an attribute before any have been set.
Previously, __dict__ could be None or {}, but now it must be a
dictionary (can never be None), and del'ing it is illegal.

Code changes to be made soon.


Index: pep-0232.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0232.txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pep-0232.txt	2001/08/14 15:45:26	1.11
--- pep-0232.txt	2001/08/14 17:52:06	1.12
***************
*** 56,63 ****
  
      A function object's __dict__ can also be set, but only to a
!     dictionary object or None (e.g. setting __dict__ to UserDict
!     raises a TypeError).  Deleting a function's __dict__ attribute is
!     equivalent to setting it to None.  If no function attributes have
!     ever been set, the function's __dict__ will be None.
  
  
--- 56,63 ----
  
      A function object's __dict__ can also be set, but only to a
!     dictionary object.  Deleting a function's __dict__, or setting it
!     to anything other than a concrete dictionary object results in a
!     TypeError.  If no function attributes have ever been set, the
!     function's __dict__ will be empty.