[Patches] [ python-Patches-841461 ] Differentiation between Builtins and extension classes

SourceForge.net noreply at sourceforge.net
Thu Nov 13 09:39:16 EST 2003


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

Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
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.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=841461&group_id=5470



More information about the Patches mailing list