On Thu, Jun 14, 2018 at 12:04 AM, Mikhail V <mikhail...@gmail.com> wrote:
> On Wed, Jun 13, 2018 at 2:15 AM, Greg Ewing <greg.ew...@canterbury.ac.nz> 
> wrote:
>> Mikhail V wrote:
>>>
>
>> My feeling is that inserting is not a frequent enough operation
>> to warrant having its own operator, especially not when there
>> is already a syntax that does the same thing.
>
> Depends on what you count as 'insert' - append is one case of insert ;)
> (logically seen)
>
> Sorry for repeating myself, the idea was that the default meaning is append(),
> i.e. normal operator usage on list:
>
> L1 = L2 ^ item        - would be same as
> L1 = L2.append(item)

Not sure exactly what your intention here is, because list.append
mutates the list and returns None. Does "L2 ^ item" mutate L2 in
place, or does it construct a new list? If it mutates in place, does
it return the same list? Or if doesn't, how is it different from "L2 +
[item]", which is a much more logical spelling of list addition?

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to