[pyar] carateristicas ocultas (o no muy conocidas) de python
Hystrix
ego en hystrix.com.ar
Vie Jul 16 17:58:36 ART 2010
> el operador elipsis
>
> http://stackoverflow.com/questions/101268/hidden-features-of-python/112316#112316
>
mire en los links que pasaste pero no entiendo como funciona el elipsis.
Python 2.6.4 (r264:75706, Mar 3 2010, 13:47:56)
[GCC 3.4.6 (Gentoo Hardened 3.4.6-r2 p1.5, ssp-3.4.6-1.0,
pie-8.7.10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = range(100)
>>> a[1:2, ..., 10]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not tuple
>>> a = tuple(range(100))
>>> a[1:2, ..., 10]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: tuple indices must be integers, not tuple
>>>
que estoy haciendo mal?
--
Hystrix
More information about the pyar
mailing list