473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

!wtf ellipsis

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
6 2027
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris Perkins | last post by:
Is there a reason why the ... notation as a literal for Ellipsis is only allowed inside a slice? Would allowing it elsewhere frighten the parser? Chris Perkins
9
by: Jerry Sievers | last post by:
Fellow Pythonists; I am totally puzzled on the use of slicing on mapping types and especially unsure on use of the Ellipsis... and slicing syntax that has two or more groups seperated by comma....
5
by: Sébastien Boisgérault | last post by:
Hi, Can anybody come up with a sensible argument that would explain why the following test should fail ? (Expected: nothing, Got: 42). cheers, S.B. ...
2
by: Mike - EMAIL IGNORED | last post by:
Consider: #include <syslog.h> // Open syslog in constructor. void MyClass:: MyMemberFunction(...) {
2
by: marss | last post by:
IE allows to show text that exceeds the container's boundaries as unfinished (by adding ellipsis). e.g.: <div style="text-overflow:ellipsis;overflow:hidden;width:20px">some long text</div>...
11
by: Kufa | last post by:
Hi, I have a class String which implements the const char*() operator. I was doing some tests today and did something like: String test( "hello world" ); printf( "%s\n", test ); // instead of...
7
by: Mr. SweatyFinger | last post by:
I downloaded t he time tracker starter kit. Now where the hell is it? honest to god what is the problem. And no it is not under "n ew project/ starter kits" I mean how much of a hassle can...
4
by: Olivier Matrot | last post by:
Hello, I'm in the process of writing a managed wrapper on legacy C++ code. I have to deal with methods that are using the ellipsis. For instance,the legacy method is : void CLog::Print (LPCSTR...
3
by: femina | last post by:
heres a sample program #include<iostream> using namespace std; void add(...) { cout<<"match using ellipsis"; } void add(int a,int b) { cout<<"a and b are"<<a<<b;
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.