| Store | Cart

[Python-Dev] can't set attributes of built-in/extension type

From: Guido van Rossum <gui...@python.org>
Sat, 23 Feb 2008 17:04:04 -0800
On Sat, Feb 23, 2008 at 4:55 PM, Neal Becker <ndbecker2 at gmail.com> wrote:
> There is some discussion on this subject, archived here:>  http://permalink.gmane.org/gmane.comp.python.general/560661>>  I wonder if anyone could shed some light on this subject?>>  (Or, help me understand, what is the difference between a type that I create>  using python C api and a python class?)

This is prohibited intentionally to prevent accidental fatal changes
to built-in types (fatal to parts of the code that you never though
of). Also, it is done to prevent the changes to affect different
interpreters residing in the address space, since built-in types
(unlike user-defined classes) are shared between all such
interpreters.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)

Recent Messages in this Thread
Neal Becker Feb 24, 2008 12:55 am
Guido van Rossum Feb 24, 2008 01:04 am
Neal Becker Feb 24, 2008 02:49 pm
Guido van Rossum Feb 24, 2008 05:11 pm
"Martin v. L÷wis" Feb 24, 2008 04:49 am
Greg Ewing Feb 24, 2008 07:35 am
Messages in this thread