Patches item #841461, was opened at 2003-11-13 15:39
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=841461&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Boris Boutillier (bobox)
Assigned to: Nobody/Anonymous (nobody)
Summary: Differentiation between Builtins and extension classes

Initial Comment:
Some checks in the C code are done to avoid
modification by the user of builtin classes.
Unfortunately this also affects C-extension classes.
Since addition of the hackcheck, this is more and more
difficult to write a  not too obscure workaround for
extension classes. Moreover the HeapType flag is used
far beyond its original purpose, as described in object.h.

The proposed change is to add a new flag, "Modifiable"
that indicates if the class can be modified by the
python user ( ie if he can set attributes, change
classes, change bases). Builtins won't have it,
heaptype objects will always have it and extension
classes can chose.

The flag addition is backward compatible, and binary
compatible.

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

>Comment By: Martin v. Löwis (loewis)
Date: 2006-11-11 14:27

Message:
Logged In: YES 
user_id=21627

Can you please give an example of a problem solved by this
patch? What is the extension type, what code would the user
like to execute, and what error is reported on an attempt to
do so?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=841461&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to