On 6/3/2017 5:03 PM, Ben Finney wrote:
Jon Forrest <nob...@gmail.com> writes:

I'm learning about Python. A book I'm reading about it

Can you say which book, and where in the book it says this?

With all due respect, I'd rather not. The author has been very
responsive when I raised this issue, and I don't want to make
him look bad.

To phrase it that way might be slightly misleading, though. It is *not*
true, for example, to say that the characters in the string already
exist as objects.

That's exactly what I was thinking, and why I raised the issue.

I think, rather, that you may have an incorrect understanding of a
sequence. The objects produced by an operation on a sequence – a slice,
or iterating the sequence – do not necessarily exist as distinct objects
before that operation.

I wasn't thinking so much about the objects produced by an operation
on a sequence as I was about when the sequence is created. A trivial
sequence is

"abc"

As I understand it, this is one object, not three. The original excerpt
implies the later.

Jon


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to