[Python-bugs-list] [ python-Bugs-485678 ] Use of __del__ on descriptors ambiguous

noreply@sourceforge.net noreply@sourceforge.net
Wed, 28 Nov 2001 21:44:18 -0800


Bugs item #485678, was opened at 2001-11-26 08:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485678&group_id=5470

Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 7
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Guido van Rossum (gvanrossum)
Summary: Use of __del__ on descriptors ambiguous

Initial Comment:
When deleting an attribute described by a descriptor 
implemented in Python, the descriptor's __del__ method 
is called by the slot_tp_descr_set dispatch function.  
This is bogus -- __del__ already has a different 
meaning.  This should be renamed to __delete__.

(XXX Should we also rename __get__ and __set__ to 
something more descriptive, e.g. __descr_get__ and and 
__descr_set__?  Or maybe we should use __prop_ as a 
prefix?)


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-11-28 21:44

Message:
Logged In: YES 
user_id=6380

Here's a patch that renames the method to __delete__. 
Anyone got problems with checking this in?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=485678&group_id=5470