In <[EMAIL PROTECTED]>, walterbyrd
wrote:

> On Jun 22, 11:43 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> 
>> 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.

It raises an exception.  What want you an "typed list" to do when a wrong
object is put into it?  Raising an exception?  So all you change is the
point in time when the exception is raised.

> 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.

But this doesn't really change with a "typed list".  It's easy to take
an object and completely replace all its attributes so it behaves very
different.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to