Re: Why tuples use parentheses ()'s instead of something else like 's?

2005-01-06 Thread Timo Virkkala
[EMAIL PROTECTED] wrote: I can't thank you enough for your reply and for everyones' great info on this thread. The end of your email gave a rock solid reason why it is impossible to improve upon ()'s for tuples Actually, you missed the point. The parentheses don't have anything to do with

Re: Why tuples use parentheses ()'s instead of something else like 's?

2005-01-01 Thread edin . salkovic
Roy Smith wrote: In article [EMAIL PROTECTED], Reinhold Birkenfeld [EMAIL PROTECTED] wrote: + being an operator Looks more like a smiley for guy wearing a bowtie :)), I had a nice laugh with this one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Ed Leafe
On Dec 29, 2004, at 3:38 PM, Rocco Moretti wrote: So to summarize: Commas define tuples, except when they don't, and parentheses are only required when they are necessary. Exactly! Now can we clear anything else up for you? ;-) ___/ / __/ / / Ed Leafe http://leafe.com/

Computer text recognition (was. Re: Why tuples use parentheses ()'s instead of something else like 's?)

2004-12-30 Thread Nick Coghlan
Ed Leafe wrote: Exactly! Now can we clear anything else up for you? ;-) How about a computer program than can correctly count the number of letter E's in your signature? :) Cheers, Nick. I like the sig, if you hadn't guessed. . . -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane,

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Alex Martelli
John Roth [EMAIL PROTECTED] wrote: ... and division. We've allowed ourselves to be limited by the ASCII character set for so long that improving that seems to be outside of most people's boxes. APL didn't allow itself to be limited that way. Anybody who's used it can hardly be accused to

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Alex Martelli
Dan Sommers [EMAIL PROTECTED] wrote: ... I was pretty sure that « and » were guillmots, but google sure preferred the sea bird when I asked it. They're guillemets (with an e); this is a [relatively] well-known Adobe SNAFU. (A quick google search or two failed to find an authoritative

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Alex Martelli
Jeff Shannon [EMAIL PROTECTED] wrote: ... to remember and type some arcane alt-keycode formula to be able to do basic scripting would be obnoxious, to say the least. Most keyboards worldwide provide decent support for the ASCII character set (though some add a few extra national

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Reinhold Birkenfeld
Alex Martelli wrote: Jeff Shannon [EMAIL PROTECTED] wrote: ... to remember and type some arcane alt-keycode formula to be able to do basic scripting would be obnoxious, to say the least. Most keyboards worldwide provide decent support for the ASCII character set (though some add a few

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Alex Martelli
Carl Banks [EMAIL PROTECTED] wrote: Alex Martellix wrote: I think a tiny minority of today's architecture and sculpture can rightfully be compared with the masterpieces of millennia past. Not that I disagree with your overall point, but I suspect a tiny minority of the architecture and

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-30 Thread Jeff Shannon
Alex Martelli wrote: Carl Banks [EMAIL PROTECTED] wrote: Then again, millenia past didn't have Frank Gehry (i.e., the Perl of modern architecture). Uhm -- I count the Guggenheim Museum in Bilbao among the _successes_ of modern architecture... I'll give you the Bilbao Guggenheim, which (at least

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Brian Beck
[EMAIL PROTECTED] wrote: Wouldn't it have been better to define tuples with 's or {}'s or something else to avoid this confusion?? Well, to comment on the part that nobody else did... and are binary operators, a la 3 1, one two and {}'s are clearly already used for dictionaries. -- Brian Beck

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Steve Holden
Marius Bernklev wrote: * [EMAIL PROTECTED] Perhaps ()'s are a good idea for some other reason I don't know? One-element tuples are written as (4,). And, even there, the parenthesis is only required when it would otherwise be embiguous: x = 4, x (4,) print 4, 4 regards Steve -- Steve

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread John Roth
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tuples are defined with regards to parentheses ()'s as everyone knows. To expand on what Alex Martelli said: Tuples don't use parentheses except for the special case of the empty tuple. Those are expression parentheses. The two most

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Grant Edwards
On 2004-12-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. Except they're not. x = 1,2,3,4 type(x) type 'tuple' Tuples are defined by the infix comma operator. -- Grant Edwards grante

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Roy Smith
In article [EMAIL PROTECTED], Grant Edwards [EMAIL PROTECTED] wrote: On 2004-12-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. Except they're not. x = 1,2,3,4 type(x) type 'tuple' Tuples are defined by

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread John Roth
Roy Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In article [EMAIL PROTECTED], Grant Edwards [EMAIL PROTECTED] wrote: On 2004-12-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. Except they're not. x =

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Roy Smith
John Roth [EMAIL PROTECTED] wrote: If Python had originally been invented in a unicode world, I suppose we wouldn't have this problem. We'd just be using guillemots for tuples (and have keyboards which made it easy to type them). I suppose the forces of darkness will forever keep Python

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Reinhold Birkenfeld
Roy Smith wrote: John Roth [EMAIL PROTECTED] wrote: If Python had originally been invented in a unicode world, I suppose we wouldn't have this problem. We'd just be using guillemots for tuples (and have keyboards which made it easy to type them). I suppose the forces of darkness will

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Grant Edwards
On 2004-12-29, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already... http://www.seabird.org/education/animals/guillemot.html

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Rocco Moretti
[EMAIL PROTECTED] wrote: Why tuples use parentheses ()'s instead of something else like 's? Please enlighten me as I really want to know. So to summarize: Commas define tuples, except when they don't, and parentheses are only required when they are necessary. I hope that clears up any

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Reinhold Birkenfeld
Grant Edwards wrote: On 2004-12-29, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already... http://www.seabird.org/education/animals/guillemot.html

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Roy Smith
In article [EMAIL PROTECTED], Reinhold Birkenfeld [EMAIL PROTECTED] wrote: + being an operator Looks more like a smiley for guy wearing a bowtie -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Grant Edwards
On 2004-12-29, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already... http://www.seabird.org/education/animals/guillemot.html

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Dan Sommers
On 29 Dec 2004 21:03:59 GMT, Grant Edwards [EMAIL PROTECTED] wrote: On 2004-12-29, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already...

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread [EMAIL PROTECTED]
There just isn't enough neat-looking punctuation in the ASCII character set. Alex I can't thank you enough for your reply and for everyones' great info on this thread. The end of your email gave a rock solid reason why it is impossible to improve upon ()'s for tuples *There simply isn't

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread [EMAIL PROTECTED]
Brian I am so thankful for your reply and for Alex's and everyone else's on this thread. (See my reply to Alex.) This email may seem minor but it was bugging me for months. You just pointed out what I should have remembered on my own... *'s wouldn't have been a perfect choice because they

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Steve Holden
Dan Sommers wrote: On 29 Dec 2004 21:03:59 GMT, Grant Edwards [EMAIL PROTECTED] wrote: On 2004-12-29, Reinhold Birkenfeld [EMAIL PROTECTED] wrote: Perl6 experiments with the use of guillemots as part of the syntax. As if Perl didn't look like bird-tracks already...

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Aahz
In article [EMAIL PROTECTED], Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Reinhold Birkenfeld [EMAIL PROTECTED] wrote: + being an operator Looks more like a smiley for guy wearing a bowtie You know Ben Yalow? -- Aahz ([EMAIL PROTECTED]) *

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Grant Edwards
On 2004-12-29, Dan Sommers [EMAIL PROTECTED] wrote: They're guillemets (with an e); this is a [relatively] well-known Adobe SNAFU. Ah. Googling for guillemots punctuation did turn up enough hits that it didn't occur to me that I was using the wrong spelling. -- Grant Edwards

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Roy Smith
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Aahz) wrote: In article [EMAIL PROTECTED], Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Reinhold Birkenfeld [EMAIL PROTECTED] wrote: + being an operator Looks more like a smiley for guy wearing a bowtie You know

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-29 Thread Aahz
In article [EMAIL PROTECTED], Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Aahz) wrote: In article [EMAIL PROTECTED], Roy Smith [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Reinhold Birkenfeld [EMAIL PROTECTED] wrote: + being an operator

Why tuples use parentheses ()'s instead of something else like 's?

2004-12-28 Thread [EMAIL PROTECTED]
Tuples are defined with regards to parentheses ()'s as everyone knows. This causes confusion for 1 item tuples since (5) can be interpreted as a tuple OR as the number 5 in a mathematical expression such as x = (5) * (4+6). Wouldn't it have been better to define tuples with 's or {}'s or

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-28 Thread Hans Nowak
[EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. This causes confusion for 1 item tuples since (5) can be interpreted as a tuple OR as the number 5 in a mathematical expression such as x = (5) * (4+6). No, (5) is always the number 5. To make a

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-28 Thread Leif K-Brooks
[EMAIL PROTECTED] wrote: Wouldn't it have been better to define tuples with 's or {}'s or something else to avoid this confusion?? The way I see it, tuples are just a way of having a function return multiple values at once. When you think of them that way, you don't even need parenthesis: def

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-28 Thread Marius Bernklev
* [EMAIL PROTECTED] Perhaps ()'s are a good idea for some other reason I don't know? One-element tuples are written as (4,). -- Marius Bernklev URL: http://www.ping.uio.no/~mariube/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuples use parentheses ()'s instead of something else like 's?

2004-12-28 Thread Alex Martelli
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Tuples are defined with regards to parentheses ()'s as everyone knows. Well, then, everyone knows wrong: x = 1, 2, 3 x is a tuple. The _commas_ make it one -- parentheses don't matter. An _empty_ tuple uses parentheses, (), as there's nowhere to