Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Peter Otten
Steven D'Aprano wrote: > On Wed, Nov 27, 2013 at 09:45:20AM +0100, Peter Otten wrote: > >> I took the freedom to report it myself: >> >> http://bugs.python.org/issue19808 > > Thanks for reporting the issue! > > > [off-topic] > > You might like to know that the standard English idiom is "I to

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Rafael Knuth
> Does German have anything similar? (I presume you are German.) Ich nehme mir die Freiheit. (present) Ich habe mir die Freiheit genommen. (past) And in Polish: Pozwalam sobie. (present) PozwoliƂem sobie. (past) ;-) Cheers, Raf ___ Tutor maillist

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Steven D'Aprano
On Wed, Nov 27, 2013 at 09:45:20AM +0100, Peter Otten wrote: > I took the freedom to report it myself: > > http://bugs.python.org/issue19808 Thanks for reporting the issue! [off-topic] You might like to know that the standard English idiom is "I took the liberty" rather than "freedom". In g

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Mark Lawrence
On 27/11/2013 08:45, Peter Otten wrote: Rafael Knuth wrote: simple issue I couldn't find a solution for: YourName = input(str("What is your name?")) print("Hello", YourName) When executing the program, in case the user input is "for", "not", "True", "while" Python interprets that as a command

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Rafael Knuth
Thank you, Peter! On Wed, Nov 27, 2013 at 9:45 AM, Peter Otten <__pete...@web.de> wrote: > Rafael Knuth wrote: > >> simple issue I couldn't find a solution for: >> >> YourName = input(str("What is your name?")) >> print("Hello", YourName) >> >> When executing the program, in case the user input is

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-27 Thread Peter Otten
Rafael Knuth wrote: > simple issue I couldn't find a solution for: > > YourName = input(str("What is your name?")) > print("Hello", YourName) > > When executing the program, in case the user input is "for", "not", > "True", "while" Python interprets that as a command and changes the > input's co

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Steven D'Aprano
On Tue, Nov 26, 2013 at 04:57:56PM +, Alan Gauld wrote: > On 26/11/13 16:49, Peter Otten wrote: > > >>When executing the program, in case the user input is "for", "not", > >>"True", "while" Python interprets that as a command and changes the > >>input's color to the corresponding command. > ..

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Steven D'Aprano
On Tue, Nov 26, 2013 at 05:15:31PM +0100, Rafael Knuth wrote: > Hej there, > > simple issue I couldn't find a solution for: > > YourName = input(str("What is your name?")) > print("Hello", YourName) > > When executing the program, in case the user input is "for", "not", > "True", "while" Python

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Peter Otten
Alan Gauld wrote: > On 26/11/13 16:49, Peter Otten wrote: > >>> When executing the program, in case the user input is "for", "not", >>> "True", "while" Python interprets that as a command and changes the >>> input's color to the corresponding command. > ... >> >> Are you running the program insid

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Rafael Knuth
> OK, That's what you'd expect in 3.3 because raw_input is now input(). > > But in that case input() should not do anything with your input. > > Can you post a session showing the input and the odd behaviour? YourName = input(str("What is your name ?")) print("Hello", YourName) Exemplary input &

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Alan Gauld
On 26/11/13 16:49, Peter Otten wrote: When executing the program, in case the user input is "for", "not", "True", "while" Python interprets that as a command and changes the input's color to the corresponding command. ... Are you running the program inside idle? The (in this case unwanted) sy

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread ALAN GAULD
Please always use ReplyAll to include the list. > thanks - that's weird. I am using Python 3.3.0 and changed input() to >raw_input() but I get an error message now: > >NameError: name 'raw_input' is not defined OK, That's what you'd expect in 3.3 because raw_input is now input(). But in that c

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Peter Otten
Rafael Knuth wrote: > Hej there, > > simple issue I couldn't find a solution for: > > YourName = input(str("What is your name?")) > print("Hello", YourName) > > When executing the program, in case the user input is "for", "not", > "True", "while" Python interprets that as a command and changes

Re: [Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Alan Gauld
On 26/11/13 16:15, Rafael Knuth wrote: YourName = input(str("What is your name?")) print("Hello", YourName) When executing the program, in case the user input is "for", "not", "True", "while" Python interprets that as a command Sounds like you are using Python v2. You need to yuse raw_input()

[Tutor] Issue w/ string input "for", "not", "while", "else" etc.

2013-11-26 Thread Rafael Knuth
Hej there, simple issue I couldn't find a solution for: YourName = input(str("What is your name?")) print("Hello", YourName) When executing the program, in case the user input is "for", "not", "True", "while" Python interprets that as a command and changes the input's color to the corresponding