[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
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
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/
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,
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
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
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
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
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
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
[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
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
[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
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
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
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 =
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
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
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
[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
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
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
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
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...
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
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
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...
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]) *
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
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
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
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
[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
[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
* [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
[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
36 matches
Mail list logo