Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26336

Re: why the different output in Eclipse and Python Shell?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: why the different output in Eclipse and Python Shell?
Date 2012-08-01 02:39 -0400
References <CAEMsKDuUV9K0r3da2rvZVenMdFMvePSbHoK5NAa-t6gkBgQzQg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2807.1343803165.4697.python-list@python.org> (permalink)

Show all headers | View raw


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


Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: why the different output in Eclipse and Python Shell? Terry Reedy <tjreedy@udel.edu> - 2012-08-01 02:39 -0400

csiph-web