Re: [Tutor] Interactive escape sequences

2014-01-14 Thread Steven D'Aprano
On Tue, Jan 14, 2014 at 02:42:07AM -0500, Christian Alexander wrote: > Hello Tutorians, > > Why does the interactive prompt not recognize escape sequences in strings? > It only works correctly if I use the print function in python 3. > > >>> "Hello\nWorld" > "Hello\nWorld" I'm afraid that you a

Re: [Tutor] Interactive escape sequences

2014-01-14 Thread eryksun
On Tue, Jan 14, 2014 at 2:42 AM, Christian Alexander wrote: > > Why does the interactive prompt not recognize escape sequences in strings? > It only works correctly if I use the print function in python 3. > "Hello\nWorld" > "Hello\nWorld" Let's manually compile the following source string:

Re: [Tutor] Interactive escape sequences

2014-01-14 Thread Peter Otten
Christian Alexander wrote: > Hello Tutorians, > > Why does the interactive prompt not recognize escape sequences in strings? > It only works correctly if I use the print function in python 3. > "Hello\nWorld" > "Hello\nWorld" The way python shows objects in the interactive interpreter has

Re: [Tutor] Interactive escape sequences

2014-01-14 Thread Dave Angel
Alan Gauld Wrote in message: > On 14/01/14 07:42, Christian Alexander wrote: > >> Why does the interactive prompt not recognize escape sequences in >> strings? It only works correctly if I use the print function in python 3. >> >> >>> "Hello\nWorld" >> "Hello\nWorld" > > That depends on how y

Re: [Tutor] Interactive escape sequences

2014-01-14 Thread Alan Gauld
On 14/01/14 07:42, Christian Alexander wrote: Why does the interactive prompt not recognize escape sequences in strings? It only works correctly if I use the print function in python 3. >>> "Hello\nWorld" "Hello\nWorld" That depends on how you define "correctly"... When you evaluate an exp

[Tutor] Interactive escape sequences

2014-01-14 Thread Christian Alexander
Hello Tutorians, Why does the interactive prompt not recognize escape sequences in strings? It only works correctly if I use the print function in python 3. >>> "Hello\nWorld" "Hello\nWorld" -- Regards, Christian Alexander ___ Tutor maillist - Tut