Title: RE: list Integer indexing dies??

[Ishwor]

#- >>> 'invalid'[0]
#- 'i'
#- >>> 123232[-1]
#- # Python should automagically infer here that user
#- # means indexing and *not* the number per se.
#- # (i mean list in context of the line :-) )

Python never should automagically infer nothing!

Type "import this" in the interactive interpreter and look at rule #2.


#- > IOW, the string is a sequence of characters, and the
#- integer is not sequence
#- > at all.
#- >
#-
#- strings are immutable sequence of collections in Python. Integers are
#- numbers. ;-)

Nop. Strings are not a sequence of collections, just a sequence of characters.

.       Facundo

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

ADVERTENCIA.

La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley.

Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo.

Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada.

Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje.

Muchas Gracias.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to