New updates needed for an old computer language humor piece

Nick Mathewson QnickQm at alum.mit.edu
Fri Nov 30 14:28:08 CET 2001


[comp.lang.{perl|logo} trimmed.]

In article <fPBN7.961$zX1.1625310 at typhoon.ne.mediaone.net>, Ric Werme wrote:
> The following wandered into my mail box for the first time in a year
> or two.  Since I've been learning a bit of Python this year, it seems
> to me an update is needed.

Basic Python
    You shoot yourself in the foot.

Python (Heavily Optimized)
    You save a reference to the getting-shot method of your foot so
    that you can shoot yourself over and over without having to take
    aim each time.

Python (<2.2 member lookup)
    You ask your foot about getting shot.  It doesn't know how to
    answer, so you check its address book.  There's nothing about
    getting shot there, so you ask your foot about Footness, and check
    Footness's address book.

Python (2.2 member lookup)
    You ask your foot about Footness, you ask Footness about "getting
    shot", and you tell "getting shot" about your foot.  This yields a
    bound getting-shot methods ready to convey bullets to your foot.

Python (Old-style iteration)
    You want to shoot the toes off your foot.  You train your foot to
    consider your toes as members of a list from one to five.  You
    count off, shooting at the toe your foot indicates.  When your
    foot complains that there is no sixth toe, your toes will be gone.

Python (New-style iteration)
    You want to shoot the toes off your foot.  You wiggle them one by
    one, shooting the wiggling toes.  When there are no more, you're
    done.

Python (With generators)
    You want to shoot the toes off your foot.  You ask your foot to
    tell you about all of your toes, but to please pause for a while
    after each one so you can shoot it.  After you shoot, your foot
    begins where it left off.

Python (c.l.py Flamewar version)
    "I've never held this kind of gun before, but its (indentation/
    floating-point semantics/__future__ directives) make me utterly
    certain that everyone who does must be shooting themselves in the
    foot!"

Python (Psyco version)
    Just as you're about to shoot yourself in the foot, your foot
    notices it's about to get shot by a bullet, the bullet notices
    it's about to hit your foot, and each immediately conforms to the
    other's shape.  Future foot-bullet contacts will be far faster.

Python (Time Machine version).
    You try to shoot yourself in the foot, only to realize that
    there's no need, since Guido thoughtfully shot you in the foot 
    years ago.


Apologies-to-Cyrano-ly Y'rs,

-- 
 Nick Matthewsen    <Q nick Q m at alum dot mit dot edu> 
 aa 1011011011       Remove Q's to respond.  No spam.



More information about the Python-list mailing list