[Python-Dev] list.sorted()

Ronald Oussoren oussoren at cistron.nl
Sun Dec 7 00:35:22 EST 2003


On 6 dec 2003, at 21:54, Raymond Hettinger wrote:

> The two disadvantages of having it as a classmethod are the mandatory
> list dot prefix and that it is confusing when called with an existing
> list:
>
>   [f(elem, arg) for elem in [3,2,1].sorted(anotherseq)]
>

The latter problem is a generic problem of class methods, e.g. 
someDict.fromKeys(seq). One way to fix this would be to make sure that 
class methods are no longer accessible through instances.

Ronald




More information about the Python-Dev mailing list