Python console rejects an object reference, having made an object with that reference as its name in previous line

Michael Torrie torriem at gmail.com
Mon Dec 15 00:38:10 EST 2014


On 12/14/2014 10:32 PM, Chris Angelico wrote:
> Did you actually test that?
> 
> Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> print("hello")
> hello
> 
> Since print is a keyword when not imported from future, there's no way
> for print(value) to be parsed as a function call.

Thought I had indirectly, since I've been using this print technique for
the last few days.  Good to know it works either way, though.  Guess the
future import is only to make not having parens and error.




More information about the Python-list mailing list