By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,042 Members | 998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,042 IT Pros & Developers. It's quick & easy.

!wtf ellipsis

P: n/a
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]

Jul 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Jonas Kölker wrote:
what (the hell) is Ellipsis?
what's it good for?
how do I use it; how does the interpreter use it?


Alex Martelli gave me the following explanation a while ago:

http://groups.google.com/groups?selm...40news1.tin.it

Peter

Jul 18 '05 #2

P: n/a
On Fri, 13 Aug 2004 14:54:24 +0200, rumours say that Jonas Kölker
<jo**********@yahoo.com> might have written:
what (the hell) is Ellipsis?
what's it good for?


Peter provided a link answering your questions. As a side note, I have
used Ellipsis instead of None as a very handy last item put in queues in
threaded programs (after all, "ellipsis" means "absence" or "lack" in
English :) Thus I avoid creating dummy classes to mark the end of
data...
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
Jul 18 '05 #3

P: n/a
Christos TZOTZIOY Georgiou wrote:
Peter provided a link answering your questions. As a side note, I
have
used Ellipsis instead of None as a very handy last item put in queues
in
threaded programs (after all, "ellipsis" means "absence" or "lack" in
English :) Thus I avoid creating dummy classes to mark the end of
data...


But as a sentinel, why would it be superior to None?

--
__ Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ If you don't take chances, you can't do anything in life.
-- Michael Spinks
Jul 18 '05 #4

P: n/a
On Fri, 13 Aug 2004 16:35:34 -0700, rumours say that Erik Max Francis
<ma*@alcyone.com> might have written:
Christos TZOTZIOY Georgiou wrote:
Peter provided a link answering your questions. As a side note, I
have
used Ellipsis instead of None as a very handy last item put in queues
in
threaded programs (after all, "ellipsis" means "absence" or "lack" in
English :) Thus I avoid creating dummy classes to mark the end of
data...

[Erik]But as a sentinel, why would it be superior to None?


I wouldn't choose the word "superior to", rather "more fitting than"
IMO; that's because I associate None with "no value", and Ellipsis with
"end of values".

PS Irrelevant, but I just thought that it's probably too late to ask
whether any Pythonistas are here in Athens for the Olympic games, in
order to buy them a beer or another drink of their choice :)
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
Jul 18 '05 #5

P: n/a
Christos "TZOTZIOY" Georgiou <tz**@sil-tec.gr> wrote in message news:<vo********************************@4ax.com>. ..
On Fri, 13 Aug 2004 14:54:24 +0200, rumours say that Jonas Kölker
<jo**********@yahoo.com> might have written:
what (the hell) is Ellipsis?
what's it good for?


Peter provided a link answering your questions. As a side note, I have
used Ellipsis instead of None as a very handy last item put in queues in
threaded programs (after all, "ellipsis" means "absence" or "lack" in
English :) Thus I avoid creating dummy classes to mark the end of
data...


It's funny, I always understood ellipsis ('...') as a kind of a
wildcard or abbreviation mark, rather than absence mark. For example,
you'd write:

a[1], a[2], ..., a[N]

which means "all values from a[1] to a[N]" or something like that.

But then of course it's just a symbol...

AdSR
Jul 18 '05 #6

P: n/a
AdSR wrote:
It's funny, I always understood ellipsis ('...') as a kind of a
wildcard or abbreviation mark, rather than absence mark. For example,
you'd write:

a[1], a[2], ..., a[N]

which means "all values from a[1] to a[N]" or something like that.

But then of course it's just a symbol...


It's an indication that something was removed or abbreviated. In
mathematics, it has the same meaning, but it's often used in the context
of showing a pattern and then removing unnecessary elements (after the
pattern is obvious), so it tends to get the implied meaning of "and so
on."

--
__ Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ Suffering is a journey which has an end.
-- Matthew Fox
Jul 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.