from future import pass_function

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Thu Jul 26 08:42:19 CEST 2012


Am 26.07.2012 07:20, schrieb Michael Hrivnak:
> If we want pass(), then why not break() and continue()?  And also
> def() and class()?  for(), while(), if(), with(), we can make them all
> callable objects!
>
> Except that they are control statements.  They are not objects, they
> have no type, and they can never be evaluated in an expression.  And
> most importantly, there is no value to be gained by making them
> objects.

pass is not a control statement, it is just a placeholder to make it 
explicit that there is nothing else to be expected here.

Uli



More information about the Python-list mailing list