Re: simple perl program in python gives errors

2006-02-01 Thread Dan Lowe
On Feb 1, 2006, at 7:59 AM, Tim Roberts wrote: > Dan Lowe <[EMAIL PROTECTED]> wrote: >> >> Not sure if you typo'd that, but that should read: >> >> a += 20 * 14 >> print a > > Did you try to run that? Well, I did, but I had given 'a' a value first. And now I'm thinking that I may have

Re: simple perl program in python gives errors

2006-02-01 Thread Tim Roberts
Dan Lowe <[EMAIL PROTECTED]> wrote: > >Not sure if you typo'd that, but that should read: > >a += 20 * 14 >print a Did you try to run that? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: simple perl program in python gives errors

2006-01-31 Thread Dan Lowe
On Jan 31, 2006, at 8:28 AM, morris carre wrote: > [EMAIL PROTECTED] a écrit : >> >> $a += 20 * 14; >> print $a; > > a = 20 * 14 > print a > > where's the problem ? Not sure if you typo'd that, but that should read: a += 20 * 14 print a -dan -- I am not a vegetarian

Re: simple perl program in python gives errors

2006-01-31 Thread morris carre
[EMAIL PROTECTED] a écrit : > I am a little annoyed at why such a simple program in Perl is causing > so much difficulty for python, i.e: > > $a += 20 * 14; > > print $a; > a = 20 * 14 print a where's the problem ? -- http://mail.python.org/mailman/listinfo/python-list

Re: simple perl program in python gives errors

2006-01-30 Thread Tom Anderson
On Mon, 30 Jan 2006, Grant Edwards wrote: > On 2006-01-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> i was hoping one didnt have to initialize variables because perl >> defaults their value to zero. Also I noticed if I initialize a variable >> as 0 , then I can only do integer math not f

Re: simple perl program in python gives errors

2006-01-30 Thread Grant Edwards
On 2006-01-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i was hoping one didnt have to initialize variables because perl > defaults their value to zero. Repeat after me: "Python is not Perl. Python is not Perl. Python is not Perl. Python is not Perl. Python is not Perl. Python is not Perl

Re: simple perl program in python gives errors

2006-01-30 Thread John Zenger
[EMAIL PROTECTED] wrote: > Also I noticed if I initialize a variable > as 0 , then I can only do integer math not floating math. this just > seems kind of backward as I am used to php and perl which dont require > such strict rules. > Not quite: >>> foo = 0 >>> foo += 122 >>> print foo 122 >

Re: simple perl program in python gives errors

2006-01-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I am a little annoyed at why such a simple program in Perl is causing > so much difficulty for python, i.e: > > $a += 20 * 14; > > print $a; > Yes, an annoying feature of the Python interpreter is that it doesn't always interpret Perl correctly. You will fin

Re: simple perl program in python gives errors

2006-01-30 Thread squash
i was hoping one didnt have to initialize variables because perl defaults their value to zero. Also I noticed if I initialize a variable as 0 , then I can only do integer math not floating math. this just seems kind of backward as I am used to php and perl which dont require such strict rules. --

Re: simple perl program in python gives errors

2006-01-30 Thread kishkin
Of course Grant Edwards is right, but I thought that your programm is something like this: a += 20 * 14 print a and I thought that this is your perl program: $a += 20 * 14 print $a Funny i

Re: simple perl program in python gives errors

2006-01-30 Thread Christoph Haas
On Monday 30 January 2006 17:52, [EMAIL PROTECTED] wrote: > I am a little annoyed at why such a simple program in Perl is causing > so much difficulty for python, i.e: > > $a += 20 * 14; > > print $a; a = 0 a += 20 * 14 print a Seems to be more a problem for you than for Python.

Re: simple perl program in python gives errors

2006-01-30 Thread Grant Edwards
On 2006-01-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am a little annoyed at why such a simple program in Perl is causing > so much difficulty for python, Ah, well, there's your problem. Python doesn't run Perl programs. It runs Python programs. If you write your program in Python in

Re: simple perl program in python gives errors

2006-01-30 Thread kishkin
Maybe you should initialize a before using it? :) -- http://mail.python.org/mailman/listinfo/python-list