!wtf ellipsis

brianc at temple.edu brianc at temple.edu
Fri Aug 13 09:08:25 EDT 2004


One thing I like to use it for is a dummy variable to pass
into a loop. Say you want to find the lowest value in a list
of numbers:

l=[5,4,3,2,1]
lowest_value=Ellipsis
for i in l:
    if lowest_value > i:
        lowest_value=i

Like a positive infinity. Though it would be nice to have a
reciprocal negative infinity. 

-Brian

---- Original message ----
>Date: Fri, 13 Aug 2004 14:54:24 +0200
>From: Jonas Kölker <jonaskoelker at yahoo.com>  
>Subject: !wtf ellipsis  
>To: python-list at python.org
>
>so, I've read the manuals, done a few hacks, read the quick
reference.
>however, one thing still eludes me:
>
>what (the hell) is Ellipsis?
>what's it good for?
>how do I use it; how does the interpreter use it?
>
>... thanks everybody,
>
>Jonas Kölker
>
>----
>[ValueError: ASCII art sig block too ugly to live]
>
>-- 
>http://mail.python.org/mailman/listinfo/python-list


More information about the Python-list mailing list