[issue3208] function annotation for builtin and C function

Haoyu Bai report at bugs.python.org
Thu Jul 24 08:46:05 CEST 2008


Haoyu Bai <divinekid at gmail.com> added the comment:

I found the explanation of why buitl-ins are immutable:

For the curious: there are two reasons why changing built-in classes is 
disallowed. First, it would be too easy to break an invariant of a 
built-in type that is relied upon elsewhere, either by the standard 
library, or by the run-time code. Second, when Python is embedded in 
another application that creates multiple Python interpreters, the 
built-in class objects (being statically allocated data structures) are 
shared between all interpreters; thus, code running in one interpreter 
might wreak havoc on another interpreter, which is a no-no.

(From http://www.python.org/download/releases/2.2.3/descrintro/)

Is the statement still valid for current version of Python?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3208>
_______________________________________


More information about the Python-bugs-list mailing list