Why and how "there is only one way to do something"?

bonono at gmail.com bonono at gmail.com
Thu Dec 15 09:11:07 EST 2005


Terry Hancock wrote:
> But that is precisely what it does mean -- Python's language
> design tries to be "reasonably minimal": there's usually one
> fairly easy way to do a task. Unintentionally, there may
> well be a half-dozen really hard ways to do it. The point of
> telling this to the potential coder is to suggest that "if
> it's hard, you're probably doing it the wrong way" and nudge
> them into looking at how the language designers have
> intended those problems to be solved.
Um, that is fine. However, what I usually see is like this :

C-programmer learning python :

Hi, where is condition ? true : false

someone prefer the if/else statement type:

Can't you see that the following is much more readable, stupid(well not
the exact word but tone in such a way like words of messy or elegant
etc.)

if condition:
  true
else:
  false




More information about the Python-list mailing list