[Chicago] Can you write Perl in Python?

Martin Maney maney at two14.net
Thu Dec 29 04:50:31 CET 2005

On Wed, Dec 28, 2005 at 07:17:11PM -0600, Ian Bicking wrote:
> I also noticed this works for saving another character:
>    [str(i)for i in(0,1,2)]

     [str(i)for i in 0,1,2]

Tuples don't need parens, sometimes.  Hmmm, wonder if I overlooked one
of them things...

> And at least one lambda seems useful, because then you don't need a 
> "return".

Uhm... oh darn, I'm going to fall back into this tar pit, aren't I? 
Luckily we watached the Dune DVD already.

> Now I'm just wondering why Martin has backslashes in his code...

String literal that's actually a lookup table of small integer values. 
Well, actually it's small integers that are holding three *really*
small integers each, but you get the idea.  It costs less source bytes
to decode it than it saves over writing them as a tuple of decimal
integers.  It's a classic space-time tradeoff: I spent 'way too much
time encoding(1) the values in order to save a handful of bytes!

manual'ly compressing'ly yours...

(1) counting the time spent figuring out how to do that and get a net

One discharges fancy homunculi from one's scheme
by organizing armies of idiots to do the work.  -- Dennett

More information about the Chicago mailing list