Single-line functions

Randall Hopper aa8vb at yahoo.com
Sat Apr 1 07:57:17 EST 2000


Magnus Lie Hetland:
 |Seems you can't begin more than one block on one line...
 |
 |For instance,
 |
 |  if 1: if 1: print "spam"
 |
 |doesn't work, although
 |
 |  if 1: print "spam"
 |
 |does.

Thanks.  I figured it was something like that.  Just didn't remember ever
reading that in the Python docs.  Digging further, I see that it is in Mark
Lutz's _Programming Python_.

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list