enhancing 'list'

samwyse samwyse at gmail.com
Mon Jan 18 06:59:53 EST 2010


On Jan 17, 11:30 pm, Asun Friere <afri... at yahoo.co.uk> wrote:
> On Jan 18, 9:37 am, samwyse <samw... at gmail.com> wrote:
>
> > Consider this a wish list.  I know I'm unlikely to get any of these in
> > time for for my birthday, but still I felt the need to toss it out and
> > see what happens.
>
> > Lately, I've slinging around a lot of lists, and there are some simple
> > things I'd like to do that just aren't there.
>
> If memory serves me correctly, it has been possible to subclass 'built-
> in' types since Py2.2 or thereabouts.

True, but I've had bad experiences doing that.  See, for example,
http://groups.google.com/group/comp.lang.python/browse_thread/thread/10cfe2affc265ac
where I tried to subclass 'int'.  More importantly, subclassing means
that people have to keep re-inventing the same methods.  Having a
single implementation would save time, not to mention the speed
advantages of implementing them in the hosting language (C,
Java, .NET, etc).



More information about the Python-list mailing list