The Larch

Here is a spurious collection of semi to totally unserious stuff - mostly postings found wafting gently in the Python newsgroup.

See also Andrew Kuchling's collection of Python quotations, containing in a condensed form some sterling examples of the wit and wisdom encountered in the Python world...

The Zen of Python (by Tim Peters)

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Fundamental...

Subject: Re: Book review review
From: "Chyden.Net" <@chyden.net>
To: python-list@cwi.nl
Date: Fri, 17 Apr 1998 12:53:48 +0100
Newsgroups: comp.lang.python

Mark Lutz wrote:
> 
> Naturally, not everyone has the same sense of humor.  

Dear, gentle, Mr. Lutz:

Not everyone has *ANY* sense of humor.

I -- an economist-turned-businessman who never got "Hello World" to work right
in C++ -- have enjoyed reading _Programming Python_.

I find computer science as god-awful as you probably find economics.  Applied
computer science [programming] is fun, and applied economics [making money] is
fun.  The textbooks that teach both subjects are mind-numblingly dreadful.

Anyone who finds _Programming Python_ "too cute" needs to have holes drilled
in his head to let the evil spirits out.

> The only objective thing worth interjecting is that Python is
> named after a BBC comedy series; humor is a fundamental part of its
> culture (and, I think, life in general, but I'm not in a deep enough
> mood to go there today ;-).

Right.  What was van Rossum supposed to do?  Call it Hitler?

> Mark ("Pull my finger") L.

Charles "I'm not touching that nasty thing" Evans
CKO, Chyden.Net    The World's First BeOS ISP
http://chyden.net

Proud sponsor of   www.AlienEngineering.com

Cute Wabbit

Subject: Current Path
From: Nick Leaton <@calfp.co.uk>
Date: Wed, 04 Dec 1996 17:55:48 +0000
Message-Id: <32A5BB24.7690@calfp.co.uk>

Thanks to all that pointed out

	os.getcwd()


A little girl goes into a pet show and asks for a wabbit. The shop
keeper looks down at her, smiles and says

"Would you like a lovely fluffy little white rabbit, or a cutesy
wootesly little brown rabbit"

"Actually", says the little girl, "I don't think my python would notice"


-- 

Nick

Shooting Yourself in the Foot

There's an endless series of jokes about how to shoot yourself in the foot using a particular programming language. Here are the entries for Python and Java (by Mark Hammond):

Python

You create a gun module, a gun class, a foot module and a foot class. After realising you can't point the gun at the foot, you pass a reference to the gun to a foot object. After the foot is blown up, the gun object remains alive for eternity, ready to shoot all future feet that may happen to appear.

Java

You find that Microsoft and Sun have released imcompatible class libraries both implementing Gun objects. You then find that although there are plenty of feet objects implemented in the past in many other languages, you cannot get access to one. But seeing as Java is so cool, you dont care and go around shooting anything else you can find.

Legal Issues

From: aaron@funcity.njit.edu (Aaron Watters)
Subject: Legal issues
To: python-list@cwi.nl
X-Newsgroups: comp.lang.python
Message-Id: <1995Mar30.122351.178@njitgw.njit.edu>
Date: Thu, 30 Mar 1995 12:23:51 +0000 (GMT)

[Reuters]
There are unconfirmed reports that MicroSoft Inc. is considering
bringing an intellectual property infringement action against the
inventer of the Python programming language claiming that the
language documentation infringes on MicroSoft's rights to the
Monty Python Flying Circus.  Steve Ballmer, Microsoft Executive
Vice President, is reported to have said "This is very serious --
we paid almost a quarter billion for those rights;  this is almost
up there with the Mona Lisa thing."

Microsoft reportedly is willing to stop the action if either a
licensing agreement can be worked out or if Guido Van Rossum, the
inventer, changes the name of the computer language and personally
destroys all references to Spam, the Spanish Inquisition, and so
forth, in all copies of the Python code and documentation whereever
they may have propagated.

A highly placed White House Official claims that President Clinton
takes the matter very seriously and is willing to break off all
diplomatic relations with the government of Japan over the issue.
"We're beginning to wonder if this information super-highway thing
is such a good idea after all," she said.  The ambassador of Japan
in Washington is reportedly "very, very confused."

A highly placed Speaker of the House, who asked not to be named,
is reported to have said, "I thought Guido was an Italian name.
Those damn Japanese are sure crafty!"

In an unrelated development, Stacker Inc. is reportedly considering
bringing action against Van Rossum, Brian Kernigan, and Don Knuth
over their alleged infringement on Stacker's "for loop" patent.

Python vs Tcl vs Perl5

Subject: Re: Python vs Tcl vs Perl5
From: Andrew Dalke <@ks.uiuc.edu>
Date: 24 Feb 1997 15:38:48 GMT
X-Organization: TB BI
Message-Id: <5escm8$o19@vixen.cso.uiuc.edu>

Ali Shah <@texcel.no> asked:
> if anyone out there has done some sort of evaluation about the
> suitability of [Python, Tcl or Perl5] for different applications?

Granted, the following has little to do with your questions... :)

Tcl -- It is short (only three letters) and does a suprising amount
   given that it doesn't have a vowel.  It can be pronounced
   "Tickle", which is a command.

Perl -- Bigger and has a vowel.  However you'll note that it isn't
   a common english word; you'll have to know what you're doing to
   use it, especially with spell-checkers which otherwise complain
   that it looks like noise.

Python -- This is a Real English Word (honest, look it up!) that
   happens to refer to a type of snake, which you'll notice is an
   object.  With the two vowels, python is quite readable.


						Andrew Dalke
						@ks.uiuc.edu

Python Object Oriented Programming Seminar

Subject: Re: Fall Python Workshop & OOPSLA?
From: Joseph Strout <@ucsd.edu>
Date: Fri, 28 Feb 1997 09:24:41 -0800
Message-Id: <Pine.SGI.3.94.970228092401.5320D-100000@knack>

On Tue, 25 Feb 1997, Jeffrey Kunce wrote:

> At last Fall's workshop, there was talk of combining the 1997
> Fall Python Workshop with OOPSLA in some way. 
> 
> Have there been any developments?

I suggested holding a "Python Object Oriented Programming Seminar", but
the acronym was unpopular.

,------------------------------------------------------------------.
|    Joseph J. Strout           Department of Neuroscience, UCSD   |
|           @ucsd.edu           http://www-acs.ucsd.edu/~jstrout/  |
`------------------------------------------------------------------'

PSA Budget

Subject: Where is the PSA $$$ Going?
From: Matthew Lewis Carroll Smith <@mem.net>
X-Newsgroups: comp.lang.python
Date: Fri, 04 Apr 1997 11:25:02 -0500
Message-Id: <33452AB1.19A1@mem.net>

Those of you who are PSA members may have seen this message from Guido:

>I don't think it would be wise to publish a detailed budget (and it
>would be impossible as well).  However, I can tell you roughly where
>the money goes -- there are no secrets.

In an effort to take some of the burdens off of Guido's back, I have
compiled a summary budget of the PSA for your edification.

PSA 1996 Budget
---------------

Income:
     'Guido for President' Campaign Contributions (1)........$ 1,093,276.54
     Milk Money Extortion Program............................$ 	       3.12
     PSA Memberships.........................................$     2,934.07
                                                              -------------
                                               Total Income: $ 1,096,213.73

Expenses:
     Monty Python Licencing Fees (2).........................$   652,362.55
     Pre-Release 2 Week Vacations (3)........................$    10,876.45
     Post-Release 2 Week Vacations (3).......................$   369,841.59
     Alien Abduction Insurance...............................$        15.01
     Python Web Site Maintenance.............................$    62,541.72
     Great Comfort Cream.....................................$       554.65
                                                              -------------
                                             Total Expenses: $ 1,096,191.97

                                        Total Profit (Loss): $(21.76)

Notes:
     (1) Many of you many not be aware of the fabulously successful
'Guido for President' Campaign. While Guido has no interest in being the
president, the PSA thought it would be a cool way to collect money. The
centerpiece of the campaign featured an attractive offer to spend the
night in Guido's spare bedroom in exchange for a $50,000.00
contribution. (Mark Lutz stayed TWICE!)
     (2) Since the proliferation of Monty Python related names (Python,
Monty, Grail, Eric-the-Half-a-Compiler, et al.) has increased over the
past year, the PSA felt it would be wise to licencing the Python name to
forestall any lawsuits. An added benefit is that John Cleese is teaching
Guido how to walk funny.
     (3) Pre-Release vacations are spent in the Catskills. Post-Release
vacations are spent in the Bahamas. Guido is currently working on a
system which will allow him to make more releases of Python; thus
octupling the number of vacations he takes in a year.

Well, folks, as you can see, Guido is taking money out of his own pocket
to make the PSA work! So stop whining!

-- 
               Matthew Lewis Carroll Smith

                 Computers are useless;
            they can only give you answers!
                     -- Picasso

The Origin of the Great Timbot Conspiracy Theory

Subject: RE: Python bytecode
Date: Wed, 30 Apr 97 04:29:43 UT
From: Tim Peters <@msn.com>
Message-Id: <UPMAIL09.199704300514340531@msn.com>
To: aaron watters <@msn.com>,
        "Steven D. Majewski" <@virginia.edu>
Cc: python-list@cwi.nl

> [steve "lost highway" majewski inflames ...]

> ...
> What's changed in the last year has been my estimate of some
> of the secondary gains due to what I think is the reasonable (but
> arguable) belief that Java:
> (1) will largely replace C++ [& C] as an application programming
>      language.
> (2) will provide a higher level of portability than is now common
>     with C + standard posix libraries.  

*If* I were an AI program, I would both dispute and embrace both sides of both 
claims until we all got so lost in the maze of nested invocations that the 
poor chicken couldn't even *see* the other side of the road.  Short-circuiting 
all that, to #1 I say we can hope; to #2, not if Microsoft can stop it <0.3 
wink>.

> I don't think I'm overestimating you, Aaron.

It would be hard to overestimate Aaron!  I've tried, & haven't succeeded yet.

> You're too opinionated to be NEVER wrong, but you've never
> been absurdly wrong before, which

Jeez, Steve, you just can't stop provoking tchrist, can you <wink>?

>  is why I assumed there must be a communication problem.

Na, it's all e-mail artifacts.  Trust me.  If we were all in the same bar, we 
would have punched each other out by now & reached harmonic convergence 
despite that.  The older I get, the more I hate everything ...

> BTW: I know Guido is never wrong, but that's a matter of
> theology -- like the way the Pope is never wrong.

Even worse than that -- I think the Pope has to be sitting in a magic chair 
(or something) to be infallible.  Guido just *is*.

> And I know I've been wrong, because Guido and Tim have told
> me so.

Wrong again, Steve:  we've never said that.  QED.

> But has anyone ever seen Tim be wrong ?

Nobody living, except Guido, and I wouldn't count on him living *much* longer 
if he catches me in another misteake.

> ...You don't think that maybe during his absence from the list, he
> cobbled up an AI simulation of himself in his basement on a couple
> of KSR's he swiped when they stiffed him on his severance pay ? Hmmm. 
> And, isn't there something mechanical and formulaic about his 
> patterned signoff lines -- I mean compared to us normal humans 
> who repeatedly use the same exact sigs in message after message. 
> I think he/it's been dropping us a hint all along with the "tim_one"
> address!! 

Ya, ya, ya, except ... if I were built out of KSR chips, I'd be running at 25 
or 50 MHz, and would be wrong about ALMOST EVERYTHING almost ALL THE TIME just 
due to being a computer!  Think about it -- when's the last time you spent 20 
hours straight debugging your son/wife/friend/neighbor/dog/ferret/snake?  And 
they *still* fell over anyway?  Except in a direction you've never seen before 
each time you try it?  The easiest way to tell you're dealing with a computer 
is when the other side keeps making the same moronic misteakes over and 
misteakes over and misteakes over and misteakes over and misteakes over and 
misteakes CTRL-C again.

> Hey Tim: How many chickens does it take to cross the road? 

No number of Java chickens, because it isn't safe to cross the road.

but-it-only-takes-one-python-chicken-to-*build*-a-damn-road-ly y'rs  - tim

Tim Peters    @msn.com, @dragonsys.com

The Other Origin of the Great Timbot Conspiracy Theory

Subject: The Truth about Tim (was Re: Tcl vs. Python for Scripting ...)
From: @cnri.reston.va.us (Barry A. Warsaw)
Date: 22 Mar 1998 23:28:48 -0500
Message-ID: <61g1ka81z3.fsf@anthem.CNRI.Reston.Va.US>
X-Oblique-Strategy: Everything leaks. (given by Ken Manheimer)


>>>>> "TP" == Tim Peters <@email.msn.com> writes:

    TP> I don't know, Barry -- is it time to let the cat out of the
    TP> bag about how easy the C++ and Perl modes were?

*PERL* mode?  Don't you know the reason I dropped Perl for Python in
the first place?  Ah well, read on...

Actually "Tim", it is finally time to come clean with the *real* truth 
behind "you".

Folks, the net.personality you know as "Tim Peters" is really a port
of the old Richard Stallman AI program written in Emacs Lisp, which
ran on Emacs 17.45.  A few years ago, the FSF asked me to port this
program to another free (oops, open source) language of my choice,
because stallman.el wasn't compatible with the new fangled Emacs 18
that was being worked on, and nobody understood how the old code
worked anyway.

So I chose Python because of its cool name and the fact that font-lock
actually worked for Python syntax, and I wrote a Python C extension
that allowed me to embed Emacs in Python, and to seamlessly call Elisp
programs from Python.  This was actually cleaner than JPython is now
(sorry Jim), except for one little problem.  I was under the misguided
idea that Python used brace delimiters and I was hoping to just
substitute parentheses for braces.  My having to write the translator
between lisp braces and mixed tabs and spaces indentation was why "Tim
Peters" was off the net for so long a few years back (okay, so it took 
me a looong time to get through the Python tutorial!).

Anyway I finished this work, wrote a small wrapper script called
tim.py and since the GNU machines never had passwords on their logins,
I was able to set up a cron job that scanned mailing lists and
newsgroups, and posted "responses" to interesting messages.  Sadly,
all the GNU machines got moved recently, they put passwords on their
accounts, and I was only able to rescue the tim.py script, which I
include below.

I've asked the FSF for the source code to my system, called the
Python-Emacs Extension for Enabling Workable Elisp (called PEE EWE)
which included the stallman.py and witty.py modules, but all I got
back was a MIME encoded email written in Japanese, for which the only
words I could make out were "proprietary" and "waiting for copyright
assignment".  Sigh.

Anyway, it appears that there's at least one friendly person at the
FSF, because every time the "Tim Peters" becomes quiet for a little
while, someone always seems to reboot it...

There.  I feel so much better now.

-Barry

    TP> Ya, and if anoyone actually saw that msg, they'd also know why
    TP> I make sure to cash your checks before the ink is dry!
    TP> Cheapskate.

P.S.  You better watch it "Tim", or I'll have you-know-who over there
hit C-c and remove the pickle of your state.  Don't push me,
man... I'll DO IT!

P.P.S.  So how many of you have ever actually met "Tim Peters"?  I
know Guido claims to have, but I've seen no proof.  And I ran a DNA
scan on that mustache hair that was mysteriously sent to me from
someone claiming to be "Tim", and all the report said was "not of
human origin".

For What?

Date: Fri, 21 Nov 97 22:40:35 cst
From: @summit-research.com (Jeff Rush)
To: @python.org
Subject: [PSA MEMBERS] Erotic Programming in Python ???

While perusing the Python sources I came across this tidbit; either a
mispelling of 'esoteric' or some very interesting programming practices...
<grin> Guido?

----- cut here -----
/* API to access the initialized flag -- useful for eroteric use */

int
Py_IsInitialized()
{
	return initialized;
}
----- cut here -----

Tasty Slices

Subject: Re: pass copy of list to function
From: "Gordon McMillan" <@hypernet.com>
To: Timo Schmitt <@mailhost.uni-koblenz.de>, python-list@cwi.nl
Date: Thu, 12 Feb 1998 09:13:59 -0500

Timo asked:

> how do i pass a copy of a list of a function?

Use the Paranoia emoticon.

list = ['blah', 'blah']

f(list[:])

This passes the "here's my desert, where's everyone elses?" slice.

- Gordon

Python Block Delimited Notation Parsing Explained

Subject: Addition explanation of indentation for the tutorial
From: Michael McLay <@nist.gov>
Date: Mon, 9 Mar 1998 16:42:19 -0500
Message-Id: <199803092142.QAA04377@fermi.eeel.nist.gov>
To: python-list@cwi.nl

Fredrik Lundh writes:
 > 
 > In fact, Python already supports block delimiters:
 > 
 >     if foo: #{
 >         foo1();
 >         foo2();
 >         foo3();
 >     #}
 > 
 > Inspired by Larry Wall, Guido also made sure that the ending delimiter
 > could be written in various other ways, such as #end if.  Anything to
 > empower the newbies, you know.  But real Python programmers tend
 > to omit both semicolons and curly braces, of course.

This undocumented feature of the language should be explained in the
official distribution of documentation!!  How about adding the
following as an Appendix of the Python Tutorial.  Also add a footnote
the explanation of indentation at the end of Chapter 3.

			Appendix XXX

	Python Block Delimited Notation Parsing Explained

Python incorporates a sophisticated parser and advanced notation for
recognizing block delimiters from almost any computer language.  The
foreign language notations of C, Ada Pascal, TCL, and Perl will work
in most situations.  The Python parser only requires two minor
modifications to the block notation rules of the foreign language's
grammar rules in order to be Python compliant.

The first change is the addition of a rule which states that
indentation of code is not simply a stylistic suggestion like it is in
other languages.  It is mandatory in Python.  The use of indentation
is considered good coding practice in all these languages and Python
takes this a step further by making it required by the language
grammar.  In Python the meaning of a code block which is not properly
indent is not defined.  Experienced Python programmers find this rule
to be very helpful in making everyone's code more readable.  An added
benefit is that language sensitive editors, such as Xemacs, can assist 
in writing code since they are able to automate the indentation of
code blocks.

The second change to to the grammar rules of foreign languages is that
all symbols used to indicate the beginning or end of a block must be
prefixed with the '#' character.  If you are a former Pascal or Ada
programmer this will change your usual notation to:

	if x: #BEGIN
		x = x + 1
	#END

If you are more familiar with C and C++ then you will be comfortable
with either:

	if x: #{
		x = x + 1
	#}

or:

	if x:
		x = x + 1

or even:

	if x: x = x + 1

C programmers will be happy to hear that the Python parser will do the
right thing even if curly braces are not included when two trailing
statements are present:

	if x:
		x = x + 1
		y = 3 + x

This last feature will fix a common source of bugs in C, C++, and Java
programs.  

Python's parser is also sophisticated enough to recognize mixed
notations, and it will even catch missing beginning or end delimiters
and correct the program for the user.  This allows the following to be
recognized as legal Python:

	if x: #BEGIN
		x = x + 1
	#}

or even:

	if x: #{
		x = x + 1

Now as you can see from this series of examples, Python has advanced
the state of the art of parser technology and code recognition
capabilities well beyond that of the legacy languages.  It has done
this in a manner which carefully balances good coding style with the
need for older programmers to feel comfortable with look of the
language syntax.  

Bad Habits

Subject: Re: Why We Chose Perl (and What You Can Do About It)
From: @mchip00.med.nyu.edu (Roy Smith)
Date: Mon, 23 Mar 1998 16:11:21 -0500
Message-ID: <roy-2303981611210001@qwerky.med.nyu.edu>
X-Copyright: Copyright 1997 Roy Smith

Paul F Dubois <@home.com> wrote:
> Stereotyping Fortran programmers as somehow less likely than anyone else
> to learn something new is unlikely to produce any insight. 

C      YES I AGREE.  I STARTED OUT PROGRAMMING IN FORTRAN ON A TOPS-10 S  000100
C      YSTEM AND OTHER SIMILAR MACHINES.  ALTHOUGH, I MUST ADMIT, I STIL  000200
C      L HAVE SOME BAD HABITS I PICKED UP FROM THOSE OLD DAYS, BY AND LA  000300
C      RGE I BELIEVE I HAVE OVERCOME MOST OF THE WORST ONES.              000400

-- 
Roy Smith <@popmail.med.nyu.edu>
New York University School of Medicine

Nolo Contendre

Subject: Re: Does Python meet the definitions of an OO Programming Language? 
From: Tim Peters <@email.msn.com>
Date: Sun, 29 Mar 1998 18:19:54 -0500 

[jeff <nospam@myhost.com>] 
> Is it not true that a programming language must 
> enforce "data hiding" or encapsulation to be 
> considered a true Object Oriented programming 
> language? 

Absolutely! Guido (van Rossum, Python's creator) probably doesn't even 
know how to spell those phrases, though. 

> (It is true incase you thought not). 

Who could deny it? 

> So how does Python implement encapsulation? From 
> what I have seen it does not, and therefore may contain 
> many OO concepts, but cannot be considered a 
> true OO programming language. 

Indeed, and because it doesn't support closures, it's not a true
functional programming language either. And because you have to import 
all sorts of modules to do the simplest things (e.g., regular
expressions), neither is it a true scripting language. Indeed, because 
it doesn't support labeled break or continue statements, it's not even 
a true structured programming language. 

> Tell me I'm wrong. 

No way! You should forget Python and move on to something else. In
fact, it would be a waste of your time even to reply to any of the
silly flames you'll probably get back in response to your message --
these people are, like, hypnotized or something. 

takes-one-to-know-one-ly y'rs - tim 

Fractional Winkery

Subject: [WINK] News Release
From: "Gordon McMillan" <@hypernet.com>
To: python-list@cwi.nl
Date: Wed, 1 Apr 1998 14:11:25 -0500

Washington DC: April 1, 1998.

Senators Exon and Danforth today called a press conference to
announce new efforts to make the internet safe for children.

"Bleeding heart, do-good, L-word lawyers and judges have twisted the
founding father's obvious intentions and used First Amendment as a
protection for subversives, satanists and pederasts", said their
release. "But today we have uncovered a threat so insidious, so
morally debilitating, so counter to any notion of the public good,
that it is unimaginable that even the most depraved, card-carrying
ACLU member will fail to see the need for immediate action."

The Senators refused to describe the practice in detail, but
reliable sources referred to it as "fractional winkery". Medical
research into the affects of the practice had to be halted when a
impromptu VIP tour of the facilities came upon the researchers, stark
naked, in their lab. "They had 16 rolls of duct tape, 2 bags of
clothes pins, 130 hampsters from the cancer labs down the hall, and
at least 500 pounds of grape jello and unknown amounts of chopped
liver" said the source on a recent Geraldo interview. The researchers
were summarily dismissed. "What's truly disturbing is that they
apparently showed absolutely no sign of remorse" commented Geraldo.
"These were ordinary, hard working people... They could have been
your children... All they could do was laugh."

In a possibly related anouncment, the Massachusetts Home for the
Bewildered (soon to become the Massachusetts Institute of Tab
Sciences) reports the recent discovery of an escape that took place
some time ago. The escapee is thought to be a practioner of
"fractional winkery" according to second hand reports, (first hand
reports being unreliable, because most of the original staff are now
inmates). The escape was discovered during an outside audit of MHB's
computer systems. "I became suspicious of some code in the inmate
release modules", said the auditor. "It suddenly occurred to me that
I was looking at code that was much better than anything MHB's
internal staff could write. It was really very, very, very, very,
very, very clever. If he weren't such a wacko, I'd hire him myself."

Happy NTPAD!

- Gordon

Eloquent Appliances

Subject: Warning - contentless!
From: "Gordon McMillan" <@hypernet.com>
To: python-list@cwi.nl
Date: Thu, 2 Apr 1998 11:22:29 -0500

I see news from JavaOne about the API's for embedded Java and speach
recognition.

Then I see this from CNN
(http://www.cnn.com/US/9804/01/waiting.for.god.ap/):

---------------------------------------
"Teacher Chen," leader of God's Salvation Church, did not admit
failure. ... Speaking through an interpreter, he had a few warnings
for those who would listen: ... - Other items like computers,
toasters, and refrigerators may begin moving around rooms and talking.
---------------------------------------


I'm very disturbed that Python will miss out on all the fun.

<refrigerator> [to dishwasher] "...so I'm inclined to believe that
capping the capital gains tax at 13% would enable sustainable growth
in the GNP of over 4%."

<dishwasher> "Hmmm, not that I disagree in principle, but..."

<toaster> "Ewww, couple a bleedin' wanna-bees. If somebody would
defrost you, you wouldn't have any friggin long-term investments!"

<refrigerator> "Well, I... Humph. Look, with a sustained GNP growth of
4%, even those without significant investments stand to benefit."

<toaster> "Yeah, right, you bloated freon-gas-bag. Like Labor got
something from the Reagan feeding frenzy..."

<dishwasher> "Now look here! That's an entirely different issue. Labor
has simply not kept up with the productivity increases necessary..."

<toaster> "Oh piss off, you washed out whizzer! You need your gaskets
changed!"

<microwave> "SSSHHH, here she comes!"

<all - in sing-song> "Good morning Mrs. Gumby!"


Now doesn't Python seem more appropriate than Java for this?

- Gordon

The Power of Generalization

Subject: list.pop (was RE: Who maintains urllib.py? Here's a treat...}
From: "Tim Peters" <@email.msn.com>
To: <python-list@cwi.nl>
Date: Sat, 25 Jul 1998 17:16:12 -0400
Message-ID: <000801bdb811$734e2d60$d89e2299@tim>

[tim gets behind terry reedy's list.pop idea, and
 suggests list.pop(index=-1) so that list.pop()
 complements list.append(x) and list.pop(i)
 list.insert(i, x)]

> OTOH, anyone can kill the idea instantly just by proposing a 
> generalization to list.pop(lo:hi) <0.5 wink>.

[David Ascher]
 
> [suggests] list.pop(lo:hi:stride).
> And I propose an extension to the indexing notation in general --
> if a callable is sent in as either lo, hi or stride, that callable
> is called with either (lo,hi,stride), (hi,lo,stride) or
> (stride,lo,hi) depending on which position in the index is currently
> in use.  It's up to the callee to figure out which it is.  
>
> The real question is how metaclasses can help here...

[Andrew Kuchling]
> Why make things so complicated?  Just define a markup language
> for specifying which items to remove.  Then you'd only need a single
> list.modify() method which would accept a string containing a document
> such as:
>
> <poplist>
>   <remove>
>     <element index="1">
>   </remove>
>   <remove>
>     <slice start="-4" end="-1">
>   </remove>
>   <insert start=5>
>     <listref xml:link="pylist" href="python:__main__.myList">
>   </insert>    
> </poplist>
> ...
> This is much better than having a complicated function which takes
> a varying number of arguments.  Remember, one of Python's guiding
> principles is simplicity!

damn-but-it's-great-to-be-proved-right<wink!>-ly y'rs  - tim

Fanatically Pragmatic

Date: Wed, 29 Jul 1998 23:05:03 -0400
From: Tim Peters <@email.msn.com>
To: "Steven D. Majewski" <@virginia.edu>
Cc: python-list@cwi.nl
Subject: RE: Embedded code in regexes

[Marc-Andre Lemburg]
> Would be an unfair approach, but also shows how pragmatism can
> sometimes beat purism ;-)

[Mark Hammond]
> Id go farther - "always" is the word I would use :-)
>
> As Tim and I have discussed privately before - this is probably
> why Python is as popular as it is - Guido does tend to have a more
> pragmatic bent than other language designers.  Sometimes I think
> it could be more so, but I do appreciate it being as it is!
>
> Never let a pure design get in the way of actually using it :-)

[Steven D. Majewski]
> I'ld disagree: some of the problems with Perl and Tcl are that they
> are entirely *too* pragmatic and ad hoc designs. I'ld say Guido has
> done a good job of walking the line  -- he has had a moderate
> concern with elegance and consistency, and as a result, the design
> has held up well.

Sorry, but I need to disagree with everyone.  Not that I have an opposing
view formed, this is just a matter of principle with me.  I'll let you know
what my view is once I figure it out -- it seems unusually hard to disagree
with everyone here without appearing inconsistent!  Tempted to point out
that Perl and Tcl are both more widely used than Python, but I don't want to
get involved with facts lest they turn on me later <wink>.

upholding-the-std-for-pragmatic-posting-ly y'rs  - tim

Forseen Consequences

Subject: Re: IOError(errno, strerror)
Date: Sat, 01 Aug 1998 23:36:17 -0400
From: Guido van Rossum <@cnri.reston.va.us>
To: Gordon McMillan <@hypernet.com>
Cc: python-list@cwi.nl

> Very cool! Now before your time machine cools down, go back 2 weeks 
> and have him fix select.err (9, bad fileno in select) to tell me 
> which one!

You know very well I can't do that.  To fix that one, I'd have to
travel all the way back to the early eighties and convince the BSD
design team to improve the diagnostics abilities of the Unix kernel in
general, and of select(2) in particular.  And while I could certainly
do that, I'm worried of the consequences -- the BSD vs. System V split
might never have happened, Unix would have ruled the world, we'd all
be programming in awk++, and Bill Gates would be an obscure patent
lawyer that no-one had heard of.  Oops-- those would actually all be
good things, except for awk++; Python would never have happened and I
wouldn't be here to answer your question before you've asked it.  (The
answer is no, of course.  You'll think of the question in a few days.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

Judicious Application of Scant Fudiciary Resources

From @email.msn.com Thu Aug 27 15:21:35 1998
Date: Wed, 26 Aug 1998 02:13:49 -0400
From: Tim Peters <@email.msn.com>
To: python-list@cwi.nl
Subject: RE: Idea - alternative to lambda

[tim]
> Think this might actually happen <wink>?

[Guido]
> Perhaps...

Ah!  Newcomers should be told that this is Guido's subtle way of saying he's
in doubt about scraping together September rent money.  Enough said.

emailing-cash-and-lots-of-it-ly y'rs  - tim

Neutral testimony...

Subject: Re: Just Say No to //
From: Johann Hibschman <@physics.berkeley.edu>
Date: 06 Sep 1998 22:15:39 -0700
To: python-list@cwi.nl

"M.-A. Lemburg" <@lemburg.com> writes:

> I think 1//2 and 1 + 1//2 are good compromises. While keeping a
> close eye on novice's thoughts about natural ways of expressing
> themselves to computers is a Good Thing, there's really no
> point in throwing tradtions over board that easily. Just put them
> on the Todo list for Flying 1.0 or Circus 0.1 [Then I'll
> contract your daugther to convert my scripts to the new style ;-)].

Just for a data point on the non-programmer's perspective, I went out
and asked a friend of mine, a graduate student in medieval english
literature, what she though of this whole debate.  The conversation
went something like this:

Me : So, say you take two integers, ok?
Her: Okay.
Me : So, you can add them, subtract them, and multiply them in a
     program, right?
Her: Um.  Sure.
Me : Now let's say that you divide them--
Her: But that makes no sense!  Integers form a ring, not a field.  You
     did say you were taking these numbers from Z, right?
Me : Uh, yeah.

So there you have it.  The non-programmer viewpoint.  (With which I
conveniently agree.)  "Integer division" is hokey and shouldn't be
spelled "/", even if C wants to.  ;-)

I hope that helps.  <1e10 winks>

- Johann

Guido Speedo

Subject: Re: Guess who's on the cover of the Linux Journal
Date: Thu, 17 Sep 1998 16:59:38 -0400 (EDT)
From: Dave Mitchell <@magnet.com>
To: "Barry A. Warsaw" <@cnri.reston.va.us>
Cc: David Ascher <@skivs.ski.org>, python-list@cwi.nl

  Maybe for the conference we should include an official SPAM 7
speedo swimsuit this year? And take a big group picture of all
of us sporting 'em!
                                                        -dave

On Thu, 17 Sep 1998, Barry A. Warsaw wrote:

> >>>>> "DA" == David Ascher <da@skivs.ski.org> writes:
> 
>     DA> I think for maximum visibility, Guido should be in the
>     DA> swimsuit issue instead.
> 
> I was *not* going to be the one to suggest that!  :-)
... and ...
Subject: Re: Guess who's on the cover of the Linux Journal
Date: Fri, 18 Sep 1998 16:01:26 GMT
From: "Michael T. Richter" <@igs.net>
To: python-list@cwi.nl
Newsgroups: comp.lang.python

Bill Anderson wrote in message <36027AFE.7CA684D0@cyberhighway.net>...
>>   Maybe for the conference we should include an official SPAM 7
>> speedo swimsuit this year? And take a big group picture of all
>> of us sporting 'em!

>the "Guido Speedo" ?

>...has a certain alliterative quality...<0.7 wink>

It's more assonance than alliteration.

-- 
Michael T. Richter    <@ottawa.com>    http://www.igs.net/~mtr/
          PGP Key: http://www.igs.net/~mtr/pgp-key.html
PGP Fingerprint: 40D1 33E0 F70B 6BB5 8353 4669 B4CC DD09 04ED 4FE8
... and then someone had the audacity to say ...
Subject: Re: Guess who's on the cover of the Linux Journal
Date: 18 Sep 1998 16:20:08 -0400
From: "Barry A. Warsaw" <@cnri.reston.va.us>
To: python-list@cwi.nl
Newsgroups: comp.lang.python
X-Oblique-Strategy: Remove the elements, keep the structure


>>>>> "MTR" == Michael T Richter <@igs.net> writes:

    >> the "Guido Speedo" ?

    MTR> It's more assonance than alliteration.

emphasis on the a... <bzzt>

Python vs. Perl according to Yoda

Subject: Python versus Perl: A humorous look
From: funkster@midwinter.com
To: guido@cnri.reston.va.us
Date: 10 Jul 1999 01:45:07 -0700

This has been percolating in the back of my mind for a while.  It's
a scene from _The Empire Strikes Back_ reinterpreted to serve a
valuable moral lesson for aspiring programmers.

--
EXTERIOR: DAGOBAH -- DAY
           With Yoda strapped to his back, Luke climbs up one of the
        many thick vines that grow in the swamp until he reaches the
        Dagobah statistics lab. Panting heavily, he continues his
        exercises -- grepping, installing new packages, logging in as
        root, and writing replacements for two-year-old shell scripts
        in Python.

YODA: Code!  Yes.  A programmer's strength flows from code maintainability.
      But beware of Perl.  Terse syntax... more than one way to do it...
      default variables.  The dark side of code maintainability are they.
      Easily they flow, quick to join you when code you write.  If once
      you start down the dark path, forever will it dominate your destiny,
      consume you it will.

LUKE: Is Perl better than Python?

YODA: No... no... no.  Quicker, easier, more seductive.

LUKE: But how will I know why Python is better than Perl?

YODA: You will know.  When your code you try to read six months from
      now.
--


larry