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

Michael Selik mike at selik.org
Thu Jun 14 18:04:49 EDT 2018

There's nothing wrong with your ideas if you were designing a language from
scratch. However, Python has a long history and many tools and uses for the
same operators you are considering. And even has a current "insert"
operator (slice assignment).

When adding a new feature, you need to consider if you're duplicating
current functionality and if a 2nd "obvious" way is worth breaking the Zen.

Also, consider whether your "intuitive" design is following or breaking a
de-facto standard established elsewhere in the language.

For example, if you're making a file format decoder, you should create
functions "load" and "dump" to behave like every other file format decoder
module. Don't re-invent or we'll end up with too many "standards" and the
language will become hard to remember.

In case I need to clarify:
1. You're duplicating current clear and more flexible syntax.
2. Your proposed operators are confusing when compared with their meanings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180614/22aaf913/attachment.html>

More information about the Python-ideas mailing list