... (ellipsis)
Mike McClain
mike.junk.46 at att.net
Thu May 31 22:26:48 EDT 2018
I'm having understanding the use if the ellipsis.
I keep reading that it is used in slices but every time I use it I get
'Syntax error' in 2.7 if 'Type error' in 3.2.
In python2.7:
l=range(15)
l[...:11]
Syntax error
l[3:...]
Syntax error
l[3:...:11]
Syntax error
In python3.2 it becomes 'Type error' but still doesn't give me
anything usable.
Is the ellipsis really useable in anything other than documentation or
does it actually have a function in python?
If the latter would someone please provide an example showing how it
is used?
Thanks,
Mike
--
I Don't care how little your country is, you got a right to run it like
you want to. When big nations quit meddling then the world will have peace.
- Will Rogers
More information about the Python-list
mailing list