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

2012-08-01 Thread Terry Reedy
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

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

2012-08-01 Thread Dave Angel
On 08/01/2012 12:45 AM, levi nie wrote: my code in Eclipse: dict.fromkeys(['China','America']) print dict is,dict output: dict is type 'dict' my code in Python Shell: dict.fromkeys(['China','America']) output:{'America': None, 'China': None} Output in Python Shell is what i wanna,but

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

2012-08-01 Thread Prasad, Ramit
my code in Eclipse: dict.fromkeys(['China','America']) print dict is,dict output: dict is type 'dict' my code in Python Shell: dict.fromkeys(['China','America']) output:{'America': None, 'China': None} Output in Python Shell is what i wanna,but why not in Eclipse?

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

2012-08-01 Thread Dave Angel
On 08/01/2012 11:26 AM, Prasad, Ramit wrote: my code in Eclipse: dict.fromkeys(['China','America']) print dict is,dict output: dict is type 'dict' my code in Python Shell: dict.fromkeys(['China','America']) output:{'America': None, 'China': None} Output in Python Shell is what i

why the different output in Eclipse and Python Shell?

2012-07-31 Thread levi nie
my code in Eclipse: dict.fromkeys(['China','America']) print dict is,dict output: dict is type 'dict' my code in Python Shell: dict.fromkeys(['China','America']) output:{'America': None, 'China': None} Output in Python Shell is what i wanna,but why not in Eclipse? --