[Python-de] Intervalle (War: Wie schreibe ich inf als Literal?)

Dinu Gherman gherman at darwin.in-berlin.de
Thu Mar 13 10:41:54 EST 2003


M.-A. Lemburg:

> Gibt's doch schon seit Ewigkeiten: slice(links,rechts).

Nicht wirklich...

Python 2.2.1 (#2, Sep 25 2002, 10:01:40)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>>
 >>> slice(0,10)+slice(10,20)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: unsupported operand types for +: 'slice' and 'slice'
 >>>
 >>> 5 in slice(0,10)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: iterable argument required
 >>>

Dinu

--
Dinu C. Gherman
......................................................................
"A whole generation has grown up with the idea that it is normal
for them to have no freedom." (Richard M. Stallman)





More information about the Python-de mailing list