[Python-checkins] CVS: python/dist/src/Misc NEWS,1.202,1.203
Barry Warsaw
bwarsaw@users.sourceforge.net
Tue, 14 Aug 2001 11:35:04 -0700
Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv706
Modified Files:
NEWS
Log Message:
Document the new semantics for setting and deleting a function's
__dict__ attribute. Deleting it, or setting it to a non-dictionary
result in a TypeError. Note that getting it the first time magically
initializes it to an empty dict so that func.__dict__ will always
appear to be a dictionary (never None).
Closes SF bug #446645.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.202
retrieving revision 1.203
diff -C2 -d -r1.202 -r1.203
*** NEWS 2001/08/12 22:25:01 1.202
--- NEWS 2001/08/14 18:35:02 1.203
***************
*** 16,19 ****
--- 16,25 ----
write filters for these warnings).
+ - A function's __dict__ (aka func_dict) will now always be a
+ dictionary. It used to be possible to delete it or set it to None,
+ but now both actions raise TypeErrors. It is still legal to set it
+ to a dictionary object. Getting func.__dict__ before any attributes
+ have been assigned now returns an empty dictionary instead of None.
+
Library