Collections of non-arbitrary objects ?

walterbyrd walterbyrd at
Sat Jun 23 19:45:34 CEST 2007

On Jun 22, 11:43 pm, Ben Finney <bignose+hates-s... at>

> Can you help us understand, by showing a use case that would in your
> estimation be improved by the feature you're describing?

Suppose you are sequentially processing a list with a routine that
expects every item to be of a certain type. Something in the list that
doesn't conform to the type could give you unexpected results, maybe
crash your application.

In python, as far as I know, there is nothing built into the language
to keep any type of item from being included in a list - or any such
structure. To me, that seems like a potentially vulnerability.
Especially since variables in python do not have to be explicitly
assigned - another variable that points to the same thing, could
change the data that a variable points to.

More information about the Python-list mailing list