
On 7/13/16, Ben Finney <ben+python@benfinney.id.au> wrote:
Pavol Lisy <pavol.lisy@gmail.com> writes:
Questions around "only one possibilities how to write it" could be probably answered with this?
a<b a.__lt__(b)
The maxim is not “only one way”. That is a common misconception, but it is easily dispelled: read the Zen of Python (by ‘import this’ in the interactive prompt).
Rather, the maxim is “There should be one obvious way to do it”, with a parenthetical “and preferably only one”.
So the emphasis is on the way being *obvious*, and all other ways being non-obvious. This leads, of course, to choosing the best way to also be the one obvious way to do it.
Your example above supports this: the comparison ‘a < b’ is the one obvious way to compare whether ‘a’ is less than ‘b’.
-- \ “It is forbidden to steal hotel towels. Please if you are not | `\ person to do such is please not to read notice.” —hotel, | _o__) Kowloon, Hong Kong | Ben Finney
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
I don't support this lambda proposal (in this moment - but probably somebody could convince me). But if we will accept it then Unicode version could be the obvious one couldn't be?