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

Discussion in 'Python' started by Terry Reedy, Aug 1, 2012.

  1. Terry Reedy

    Terry Reedy Guest

    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
     
    Terry Reedy, Aug 1, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    921
    Mark Rae
    Dec 21, 2006
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,072
    Smokey Grindel
    Dec 2, 2006
  3. nickname
    Replies:
    7
    Views:
    1,079
    Nobody
    Aug 26, 2009
  4. Dave Angel
    Replies:
    0
    Views:
    159
    Dave Angel
    Aug 1, 2012
  5. Dave Angel
    Replies:
    0
    Views:
    186
    Dave Angel
    Aug 1, 2012
Loading...

Share This Page