Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius

On Mon, 2 Dec 2019, 23:55 Guido van Rossum, <gu...@python.org> wrote:

>
> Also, + is already overloaded enough (numbers, strings, sequences) and we
> don't need yet another, different meaning. The | operator should be known
> to most users from sets (which are introduced before dicts in the official
> Python tutorial).
>
> I don't particularly care about learnability or discoverability in this
> case -- I don't think beginners should be taught these operators as a major
> tool in their toolbox (let them use .update()), and for anyone wondering
> how to do something with a dict without access to the official docs,
> there's always help(dict). The natural way of discovering these would be
> through tutorials, reading of the library docs, or by reading other
> people's code, not by trying random key combinations in the REPL.
>

My feel about that is to favour the + operator. Technically | is better but
mimicking lists, + might sound better. It follows the general trend in Py.

<<I don't think beginners should be taught these operators as a major tool
in their toolbox>>

True, fits more of a "Python Tricks" session but sometimes according to the
audiance level it is tempting to just mention it since it's one line away.

<<The natural way of discovering these would be through tutorials, ..., not
by trying random key combinations in the REPL.>>

*smile*

>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/PJQLV6UJFUPWJFK4ROR67FJOWMRKBDAL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to