Collections of non-arbitrary objects ?

Eduardo "EdCrypt" O. Padoan eduardo.padoan at gmail.com
Mon Jun 25 11:11:00 EDT 2007


> I don't think there is anything wrong with the data structures that
> exist in python. I was just wondering if there was a structure that
> would restrict a collection to only allow certain types. The
> "restrictedlist" class discussed in another thread may be the sort of
> thing I was looking for.


Just remenber that if you write a library using such a thing, your
(consenting adults) users will not be able to store objects in your
list that implement (part of) the interface of the type that you
restricted.


-- 
EduardoOPadoan (eopadoan->altavix::com)
Bookmarks: http://del.icio.us/edcrypt



More information about the Python-list mailing list