[Tutor] Is input a Python function or command?
Nathan Pinno
falcon3166 at hotmail.com
Mon Aug 1 04:05:33 CEST 2005
Thanks Luke. Saved me quite a headache. I will use in_file instead. Makes
more sense anyway.
----- Original Message -----
From: "luke p" <rabidpoobear at gmail.com>
To: "Nathan Pinno" <falcon3166 at hotmail.com>
Sent: Sunday, July 31, 2005 7:59 PM
Subject: Re: [Tutor] Is input a Python function or command?
why do you want to use input as a variable?
did you try testing it on the interactive prompt?
>>> input
(built-in function input)
>>>hello = "test"
>>>input()
hello
"test"
so yep it's a builtin function.
try to come up with more explanatory names.
or just name all your variables "tmp" and "temp" and "x".
or you can just overwrite the input function n the namespace.
I'm sure some people would consider these approaches evil, however, so
you probably shouldn't do it unless your code is for your use only.
HTH,
Luke
On 7/31/05, Nathan Pinno <falcon3166 at hotmail.com> wrote:
> Is input a Python function or command? I need to know because I'm planning
> to use it as a variable, and don't want to get an error.
>
> Thanks,
> Nathan
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
>
More information about the Tutor
mailing list