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


Groups > comp.lang.python > #82010

Re: dict turn to list at runtime unexpected!!!

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: dict turn to list at runtime unexpected!!!
Date 2014-12-05 12:43 -0500
Organization IISS Elusive Unicorn
References <e5012cb1-1820-4380-8e84-e8620481cc42@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.16631.1417801447.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, 4 Dec 2014 22:56:38 -0800 (PST), telnetgmike@gmail.com declaimed
the following:

>Why the following code gives me errors??? And why the print statement run 2 times? I'll be appreciated your helps, thanks,

	It runs twice because your "for tmp_kind" loop calls the function
twice.

	It fails the second time because your sort operation returns a list,
and you bound that list to the name of your dictionary the first time
through.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

dict turn to list at runtime unexpected!!! telnetgmike@gmail.com - 2014-12-04 22:56 -0800
  Re: dict turn to list at runtime unexpected!!! telnetgmike@gmail.com - 2014-12-04 23:37 -0800
  Re: dict turn to list at runtime unexpected!!! dieter <dieter@handshake.de> - 2014-12-05 08:42 +0100
  Re: dict turn to list at runtime unexpected!!! Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-12-05 12:43 -0500

csiph-web