On Mon, 19 Jun 2006 22:02:55 +0000 (UTC), Dimitri Maziuk
<[EMAIL PROTECTED]> wrote:

>Yet Another Dan sez:
>
>... Requiring an array index to be an integer is considered a typing 
>> problem because it can be checked based on only the variable itself, 
>> whereas checking whether it's in bounds requires knowledge about the array.
>
>You mean like
> subtype MyArrayIndexType is INTEGER 7 .. 11
> type MyArrayType is array (MyArrayIndexType) of MyElementType
>

If the index computation involves wider types it can still produce
illegal index values.  The runtime computation of an illegal index
value is not prevented by narrowing subtypes and cannot be statically
checked.

George
--
for email reply remove "/" from address
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to