[Python-Dev] idea for data-type (data-format) PEP
greg.ewing at canterbury.ac.nz
Fri Nov 3 02:04:19 CET 2006
Alexander Belopolsky wrote:
> That's a question for Travis, but I would think that they would be
> immutable at the Python level, but mutable at the C level.
Well, anything's mutable at the C level -- the
question is whether you *should* be mutating it.
I think the datatype object should almost certainly
be immutable. Since it's separated from the data
it's describing, it's possible for one datatype
object to describe multiple chunks of data. So
you wouldn't want to mutate one in case it's being
used for something else that you don't know about.
More information about the Python-Dev