On 06/30/2012 08:39 PM, Thomas 'PointedEars' Lahn wrote: > Peter Otten wrote: > >> If you spell it >> >> def is_valid_password(password): >> return mud.minpass <= len(password) <= mud.maxpass >> >> it is even easier to see that you are performing an interval check. > > This is probably a tautology around here, but *what* *a* *great* > *programming* *language*. >
Personally, I don't like this feature of the language. I find a ternary operator that uses symbols that can also be binary operators confusing and inconsistent with the way operators usually work/the way terms are usually associated. It has the charm of being something you'd "naturally" write in the context of non-programming mathematics, at the cost of being very odd indeed in the context of programming in general and Python in particular. -- http://mail.python.org/mailman/listinfo/python-list