Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: why the different output in Eclipse and Python Shell? (http://www.velocityreviews.com/forums/t948903-re-why-the-different-output-in-eclipse-and-python-shell.html)

Terry Reedy 08-01-2012 06:39 AM

Re: why the different output in Eclipse and Python Shell?
 
On 8/1/2012 12:45 AM, levi nie wrote:
> my code in Eclipse:
>
> dict.fromkeys(['China','America'])


In Eclipse, I presume this prints nothing, as is normal for an editor.

> print "dict is",dict
>
> output: dict is <type 'dict'>


This is red herring. The shell does the same with that line. It is not
relevant to your question.

> dict.fromkeys(['China','America'])
>
> output:{'America': None, 'China': None}


The interactive interpreter echoes the result of evaluating expressions.

--
Terry Jan Reedy





All times are GMT. The time now is 03:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.