On Sat, 25 Oct 2008 18:20:46 -0400, Terry Reedy wrote: > Lie Ryan wrote: > > >> <anotherrandommusing> >> Since python is dynamic language, I think it should be possible to do >> something like this: >> >> a = list([1, 2, 3, 4, 5], implementation = 'linkedlist') > > For this to work, the abstract list would have to know about all > implementations of the abstraction.
# Sorry the last message is truncated because of an "accident" /the exact syntax isn't really important/ /abstract type and implementation separation is the important point/ Actually, if I want to force it, that syntax could work using the same magic used by event-based systems: registration. Although I agree it might be a bit cumbersome to do registration for something like this, but as I've said before, exact syntax is not really important. -- http://mail.python.org/mailman/listinfo/python-list