El Monday, 14 de April de 2008 02:04:32 Jim Jewett escribió:
"var" by itself won't shove much off the screen. But changing from:
""" def fn(a=4): x=5 ... """ to: """ def fn(a=4):
var x var y var z
x=5 ... """
This looks kinda bloated to me. If I just want to do def f(b=2): # First assign x x=2*b # Now define function we'll use again later def fn(a=4): x=5 return a+x # and use x again. y = fn(x) Your idea would needlessly fill up lines here, because I'd have to declare x as local in the inner function (as I understand it). "When any function is defined, it's variables are local" is a nice and simple rule for me. (I'm sure there are some cases I miss, though... ) Best wishes, Arne -- Unpolitisch sein Heißt politisch sein Ohne es zu merken. - Arne Babenhauserheide ( http://draketo.de ) -- Weblog: http://blog.draketo.de -- Mein öffentlicher Schlüssel (PGP/GnuPG): http://draketo.de/inhalt/ich/pubkey.txt