Re: Perl

[prev] [thread] [next] [lurker] [Date index for 2003/09/12]

From: dagbrown (Dave Brown)
Subject: Re: Perl
Date: 04:43 on 12 Sep 2003
In article <20030911171413.817FF41473@xxxxxxx.xx.xxxxxxx.xxx>,
Peter Da Silva <peter@xxxxxxx.xxx> wrote:
: You're using a bad metric: one line of Perl is not the equivalent
: of one line of C. C is barely a step above assembler, and Perl is
: one of the most subtle and complex scripting languages around. 

One of my cow-orkers is quite a well-known Python advocate.

He solved one of my problems thus:

Put this:
        class exit:
            def __repr__(self):
              import sys
              sys.exit()
        exit = exit()
        import __builtin__
        __builtin__.quit = __builtin__.exit = exit
        del exit

into ".../lib/python${VERSION}/site-packages/sitecustomize.py".

You know what that does?  That makes it so that typing "exit" at
Python's interactive mode actually EXITS THE FUCKING PROGRAM
instead of delivering a lecture about how it REALLY wants you to
send an EOF at it instead.

You tell me what the hell it does.  I'm not entirely sure myself.
It looks like Deep Magic to me.

--Dave
-- 
"But it sounds so much more entertaining that way!  From the lines above, I
imagine him in a circus ring doing a lion-tamer act.  That's a lot more
appealing than hanging around with sick people.  Then the disciples come on
in a tiny car, parp parp, and the doors fall off." -- Malcolm Ray, on Jesus
There's stuff above here

Generated at 14:02 on 01 Jul 2004 by mariachi 0.52