Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

Chris Angelico rosuav at gmail.com
Wed Jun 16 15:34:04 EDT 2021


On Thu, Jun 17, 2021 at 2:32 AM Dieter Maurer <dieter at handshake.de> wrote:
>
> Chris Angelico wrote at 2021-6-16 02:20 +1000:
> >On Wed, Jun 16, 2021 at 2:18 AM Dieter Maurer <dieter at handshake.de> wrote:
> >> As far as I know, there are no guarantees are the language level.
> >> There are some (partially documented) implementation details
> >> for CPython (which is just one possible implementation).
> >
> >Yes there are - plenty of them :) The example I gave is a language
> >guarantee.
>
> Would you point to the documentation location where this is guaranteed?
>

Probably somewhere in the tutorial where object identity is explained?
Not sure. It's pretty fundamental.

ChrisA


More information about the Python-list mailing list