![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Comparison of functions
From: Steven D'Aprano <steve@REMOVETHIScyber.com.au>
Date: Sat Jul 30 2005 - 20:18:02 CEST
On Sat, 30 Jul 2005 16:43:00 +0000, Adriano Varoli Piazza wrote:
> If you want to treat numbers as strings, why not convert them before
Because that changes the object and throws away information.
Here is a list, containing one complex number converted to a string, and
['1+1j', '2+2j'].
Now convert it back the way it was.
> Python is just saying "He's trying to sort complex
Python is quite happy to sort a list with one single complex number and
> You're trying to make it guess that you want them
Which has been my point all along: Python confuses the specific case of
As I've said, the two are similar enough that such a mistake is easy to
-- Steven.Received on Thu Sep 29 17:16:16 2005 |