Ordering python sets

Lie Ryan lie.1296 at gmail.com
Sun Oct 26 08:33:52 EDT 2008


On Sat, 25 Oct 2008 21:50:36 -0400, Terry Reedy wrote:

> Lie Ryan wrote:
>> On Sat, 25 Oct 2008 18:20:46 -0400, Terry Reedy wrote:
> Then why do you object to current
>    	mylist = linkedlist(data)
> and request the harder to write and implement
>    	mylist = list(data, implementation = 'linkedlist')

I don't wholly object it. I think it's fine but can be improved.

I tend to be more inclined on this side though:

mylist = list.linkedlist(data) # or list<othersymbol>linkedlist(data)
as syntax sugar for
mylist = list(data, implementation = 'linkedlist')

this kinds of syntax magnify the fact that linkedlist is a choice of 
implementation for list abstract type. The current syntax makes no 
indication whatsoever that linkedlist is anything related to list.




More information about the Python-list mailing list