[Patches] [ python-Patches-722462 ] __class__ assignment for list and dict
SourceForge.net
noreply@sourceforge.net
Wed, 16 Apr 2003 07:18:11 -0700
Patches item #722462, was opened at 2003-04-16 08:29
Message generated for change (Comment added) made by gvanrossum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=722462&group_id=5470
Category: Core (C code)
Group: Python 2.3
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Jiba (jiba)
Assigned to: Nobody/Anonymous (nobody)
Summary: __class__ assignment for list and dict
Initial Comment:
This patch fixes the bug #712975
It also fixes an error: when calling
compatible_for_assignment() in object_set_class(), old
and new arguments were reversed (no consequence, but
quite confusing).
The following is now allowed:
- __class__ assignment on a list or a dict, as long as
the new type is a subtype whose subtype_dealloc will
call the list / dict dealloc,
- __class__ assignment on a subtype of list or dict,
as long as the subtype have:
- no new slots
- no weaklist
- no dict
- no __del__
test_class_assignment.py is a PyUnit test case for this
feature.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2003-04-16 10:18
Message:
Logged In: YES
user_id=6380
I'm rejecting this; it's too complicated and I don't care
about the functionality. Sorry.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=722462&group_id=5470