![](https://secure.gravatar.com/avatar/e572da4355c07804e3300bf879ffbe64.jpg?s=120&d=mm&r=g)
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