Lies in education [was Re: The "loop and a half"]
Julien Salort
listes at salort.eu
Fri Oct 13 10:59:19 EDT 2017
Le 12/10/2017 à 17:57, bartc a écrit :
> With a const struct, you are stopped from directly modifying elements,
> but if an element is a pointer, nothing stops you writing to what the
> pointer points to, unless that has a const target too. And then you've
> going to have problems doing normal updates. This constness just
> insinuates itself everywhere.
That is not very different from the mutable/immutable concept in Python,
is it ?
A tuple is immutable, but if it contains a mutable object, nothing
prevents you from mutating it.
Does it mean you think the mutable/immutable concept of Python is flawed?
Julien
More information about the Python-list
mailing list