Re: where do I need to tab?

2007-10-20 Thread Scott David Daniels
Gabriel Genellina wrote: En Fri, 19 Oct 2007 23:24:30 -0300, Scott David Daniels ... OK, you have a mix of Python 3,0 and current (2.5.1) Python. All examples are OK for 2.5 You are absolutely correct. Sorry for the misinformation. I've been working on 2.3, 2.4, 2.5, and trying 3.0

Re: where do I need to tab?

2007-10-20 Thread Paul Hankin
On Oct 20, 3:00 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: print b if ((b a) and (b (a * b))) else a Everyone else has already pointed out that you need 2.5. As a matter of style, the above line can be written more cleanly: print b if a b a * b else a -- Paul Hankin --

where do I need to tab?

2007-10-19 Thread [EMAIL PROTECTED]
hi I'm following the python's translation of SICP: http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Python:Chapter_1 ... a = 3 b = a + 1 print a + b + (a * b) print (a == b) print b if ((b a) and (b (a * b))) else a everything was fine till this point, and I got:

Re: where do I need to tab?

2007-10-19 Thread Basilisk96
Tab is not the issue here. By my powers of deduction, I can see that you are running this code in Python version previous to 2.5, because the construct true_clause if condition else false_clause did not exist until 2.5. It's a neat little construct, I highly recommend you upgrade now :)

Re: where do I need to tab?

2007-10-19 Thread Gabriel Genellina
En Fri, 19 Oct 2007 23:24:30 -0300, Scott David Daniels [EMAIL PROTECTED] escribió: [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

Re: where do I need to tab?

2007-10-19 Thread Scott David Daniels
[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