RE: [Python-Dev] Allowing slicing of iterators
[Guido van Rossum] #- > As a trivial example, here's how to skip the head of a #- zero-numbered list: #- > #- > for i, item in enumerate("ABCDEF")[1:]: #- > print i, item #- > #- > Is this idea a non-starter, or should I spend my holiday #- on Wednesday finishing #- > it off and writing the documentation and tests for it? #- #- Since we already have the islice iterator, what's the point? It seems #- to me that introducing this notation would mostly lead to confuse #- users, since in most other places a slice produces an independent #- *copy* of the data. I think that breaking the common idiom... for e in something[:]: something.remove(e) is a no-no... . Facundo Bitácora De Vuelo: http://www.taniquetil.com.ar/plog PyAr - Python Argentina: http://pyar.decode.com.ar/ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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.
participants (2)
-
Batista, Facundo
-
Nick Coghlan