Just remembered that input is for integers! Oops! Shouldn't have asked! And in_file makes more sense because I'm loading a file with it. ----- Original Message ----- From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Luke P" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" <tutor@python.org> Sent: Sunday, July 31, 2005 8:05 PM Subject: Re: [Tutor] Is input a Python function or command?
> Thanks Luke. Saved me quite a headache. I will use in_file instead. Makes > more sense anyway. > ----- Original Message ----- > From: "luke p" <[EMAIL PROTECTED]> > To: "Nathan Pinno" <[EMAIL PROTECTED]> > 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 <[EMAIL PROTECTED]> 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@python.org >> http://mail.python.org/mailman/listinfo/tutor >> >> >> > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor