[Python-ideas] Operator for inserting an element into a list

Mikhail V mikhailwas at gmail.com
Fri Jun 15 21:18:06 EDT 2018


On Sat, Jun 16, 2018 at 3:47 AM, Michael Selik <mike at selik.org> wrote:

> One of those links was discussing extend, not append.

Yes and so what? Does this makes it automatically not related to
the wish to choose more compact spelling, despite it is not
recommended way. What is different with append?
Similar posts are in topics about append and anything else actually,
e.g.:

i = i +1
i +=1

You can find enough evidence that people prefer i += 1.



> The other wanted a
> repeated append, best solved by a list comprehension.

I think yuo should reread that one more thoroughly - I'll even paste here
the text:
"""
When appending longer statements to a list, I feel append becomes
awkward to read [...]

Though append works just fine, I feel it is less clear than:
mylist[i] = 2*math.pi*radius*math.cos(phi[i])
""""
So your claim this ^ is not relevant?!

Seriously I am starting to get tired of that style of conversation.
I provided you links - you are not pleased again.




>
> On Fri, Jun 15, 2018, 5:40 PM Mikhail V <mikhailwas at gmail.com> wrote:
>>
>> On Sat, Jun 16, 2018 at 3:26 AM, Michael Selik <mike at selik.org> wrote:
>> >
>> >
>> > On Fri, Jun 15, 2018, 5:24 PM Mikhail V <mikhailwas at gmail.com> wrote:
>> >>
>> >> there is just nothing against append() method.
>> >
>> >
>> > Then why break the Zen: there should be only one obvious way?
>>
>> I think the question could be applied to 99% proposals
>>
>> >> But I see from various posts in the web and SO - people just want to
>> >> spell
>> >> it compact, and keep the 'item' part clean of brackets.
>> >
>> >
>> > If you're going to cite things, please link to them.
>>
>> Want to force me to work? :)
>>
>> I made pair of links already in previous posts, not directly
>> telling concrete wishes, but shows approximately the picture.
>>
>>
>> Something more concrete maybe:
>>
>> https://stackoverflow.com/a/3653314/4157407
>> https://stackoverflow.com/q/13818992/4157407


More information about the Python-ideas mailing list