[docs] [issue37684] list.extend docs inaccurate

wim glenn report at bugs.python.org
Fri Jul 26 12:09:31 EDT 2019


wim glenn <wim.glenn at gmail.com> added the comment:

Raymond,

I understand that consecutive appends could potentially trigger multiple resizes behind the scenes, and so it's not really showing that extend is more like a bulk update as you mentioned. That's a good point!

However I think it's a more important consideration to make sure the equivalent actually gives a correct *result*. Can you suggest an alternative code snippet to use which is correct, or perhaps soften the language claiming that the code is equivalent?

For what it's worth, the stdtypes.html docs writes that extend is "for the most part the same as" the slice assignment:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37684>
_______________________________________


More information about the docs mailing list