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
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
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
[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
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
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
[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
>
[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
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.
--
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
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.
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
Maybe you should initialize a before using it? :)
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo