Toggle

Rustom Mody rustompmody at gmail.com
Thu Oct 9 14:42:13 CEST 2014


On Thursday, October 9, 2014 1:21:49 PM UTC+5:30, Peter Otten wrote:
> Rustom Mody wrote:
> > BTW is there some flag that can make them identical?

> No flag, but you can tweak that P:

> >>> import sys
> >>> sys.displayhook = print
> >>> "foo"
> foo
> >>> def f(): pass
> ... 
> >>> f()
> None

Yeah. Thats what I was looking for -- thanks!

With print as above:

>>> "Hello World\n"
Hello World

>>>



With default displayhook:

>>> "Hello World\n"
'Hello World\n'
>>>



More information about the Python-list mailing list