This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Differentiation between Builtins and extension classes
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, bobox, loewis
Priority: low Keywords: patch

Created on 2003-11-13 14:39 by bobox, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
modifiableFlag.diff bobox, 2003-11-13 14:39 This a diff from latest cvs
Messages (3)
msg44881 - (view) Author: Boris Boutillier (bobox) Date: 2003-11-13 14:39
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.
msg44882 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-11-11 13:27
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?
msg82019 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-14 12:09
Closing suggested.
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39542
2009-02-14 12:26:15loewissetstatus: open -> closed
resolution: works for me
2009-02-14 12:09:04ajaksu2setpriority: normal -> low
nosy: + ajaksu2
type: enhancement
messages: + msg82019
versions: + Python 2.7, - Python 2.4
2003-11-13 14:39:15boboxcreate