[EMAIL PROTECTED] wrote: > I'm following the python's translation of SICP: > http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Python:Chapter_1 > ... OK, you have a mix of Python 3,0 and current (2.5.1) Python.
> a = 3 > b = a + 1 Fine in all > print a + b + (a * b) Fine in all but 3.0 For 3.0, print becomes a function: print(a + b + (a * b)) > print (a == b) Fine in all > print b if ((b > a) and (b < (a * b))) else a Fine in 2.6, which isn't really out yet. Before 2.6: print (a, b)[b > a and b < a * b] 2.6 (actually yours should work in 2.6) and 3.0: print(b if b > a and b < a * b else a) -- http://mail.python.org/mailman/listinfo/python-list