Lists and Tuples

G

Greg Ewing (using news.cis.dfn.de)

Douglas said:
You'll be fine. The only thing you have to watch out for is that some
rude folks here might call you names.

That would add some spice to Python's error messages...

Python 3.7 (#1, Sep 31 2007, 14:19:37)
[GCC 5.6.7] on slartibartfast
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
HumiliationError: The programmer is a pink-faced baboon (tuple used where
list would be more appropriate)
 
G

Greg Ewing (using news.cis.dfn.de)

Ron said:
Items in lists and not in tuples: ....
And Items in tuples and not in lists:

And chicks on blocks but not on clocks...
 
R

Roy Smith

Douglas said:
You'll be fine. The only thing you have to watch out for is that some
rude folks here might call you names.

That would add some spice to Python's error messages...

Python 3.7 (#1, Sep 31 2007, 14:19:37)
[GCC 5.6.7] on slartibartfast
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
HumiliationError: The programmer is a pink-faced baboon (tuple used where
list would be more appropriate)

In MVP (Microsoft Visual Python), the "auto-correct" function would just
silently change the ()'s to []'s as you typed them. If you tried to
change them back, clippy would pop up on the screen and say, "You seem
to be trying to do something un-pythonic. Would you like some
assistance?". If you tried to make clippy go away, it would offer to
"install this critical security patch immediately".
 
D

Douglas Alan

Greg Ewing (using news.cis.dfn.de) said:
Douglas Alan wrote:
That would add some spice to Python's error messages...
Python 3.7 (#1, Sep 31 2007, 14:19:37)
[GCC 5.6.7] on slartibartfast
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
HumiliationError: The programmer is a pink-faced baboon (tuple used where
list would be more appropriate)

Hmmm, could I catch the exception and then continue on anyway? Kind
of like casting away const in C++?

|>oug
 
J

John La Rooy

That would add some spice to Python's error messages...

Python 3.7 (#1, Sep 31 2007, 14:19:37)
[GCC 5.6.7] on slartibartfast
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
HumiliationError: The programmer is a pink-faced baboon (tuple used where
list would be more appropriate)
Hmmm..Sep 31? Should I file a bug report? ;o)


John
 
A

Arthur

In MVP (Microsoft Visual Python), the "auto-correct" function would just
silently change the ()'s to []'s as you typed them. If you tried to
change them back, clippy would pop up on the screen and say, "You seem
to be trying to do something un-pythonic. Would you like some
assistance?". If you tried to make clippy go away, it would offer to
"install this critical security patch immediately".

Give some credit.

The unitype system will have been inplemented by then.

One's decoded DNA sequence will be accessed (some people thought web
services would be a bust, back in aught 3), with reference to which,
one's intentions are determined.

Programming now called "hinting". CH4E.

Art
 
A

Arthur

I actually see the point also, with direct relevance to Lists and
Tuple tutorial semantics, to the extent that I am confused whether
instances of different classes are of the same "type".

I have considered no. By inheriting from object and creating something
new from it I am creating a custom type. I thought. I think this
impression comes from my little experinece with other languages. And
since the way I use lists are to group instances of different classes,
which may have nothing in common other than a single method of the
same name, I have considered my lists to be of heterogenous type.
Which is why I have been confused by the language to describe the
prototypical use of lists.

Art
 
S

Skip Montanaro

Greg> And chicks on blocks but not on clocks...

Through three cheese trees, three free fleas flew...

Skip
 
G

Greg Ewing (using news.cis.dfn.de)

John said:
Hmmm..Sep 31? Should I file a bug report? ;o)

You're failing to take into account the (highly controversial)
International Calendar Reform of 2006, which gave all months
the same number of days. Python was, of course, the first
language to have its datetime module updated to conform with
the new standard.

(Microsoft Java++#.NET was updated too, but in a subtly
incompatible way -- all their months were given 30
days instead.)
 
F

Fredrik Lundh

Greg said:
You're failing to take into account the (highly controversial)
International Calendar Reform of 2006, which gave all months
the same number of days. Python was, of course, the first
language to have its datetime module updated to conform with
the new standard.

(Microsoft Java++#.NET was updated too, but in a subtly
incompatible way -- all their months were given 30
days instead.)

it's well known (at least to insiders) that the bug in MSJPCS.NET was the
reason for the reform.

a "32 days is better for computers" alternative was brought forward by the
usual suspects (IBM, Sun, etc, plus a bunch of bloggers hellbent on teaching
Dave Winer a lesson), but was, as usual, largely ignored by everyone else.

31 might be due to a EU translation error, but I'm not sure. I also hear that
the french edition of the standard uses 13 days.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top