a small problem

Gerrit Holl gerrit.holl at pobox.com
Thu Jan 13 09:36:12 EST 2000


Thomas Wouters wrote on 947765114:
> On Wed, Jan 12, 2000 at 04:59:32PM +0100, Gerrit Holl wrote:
> 
> > People should hang around in comp.lang.c or even comp.lang.asm.i386 if
> > they care about speed.
> 
> No, they should be there if they _only_ care about speed. 

OK.

> Another amusing thing was that I wrote:
> 
> for x, in mylist:
> 
> to iter over the testlist (a list of single-item tuples.) I didn't
> consciously think about it, but when i reread it, i decided it couldn't be
> right. It would just be too obvious. There had to be a reason for it to be a
> special case of some kind, like perl has with the magic ++ operator on
> strings. Contrary to the string-++ operator in perl, though, it worked just
> as expected ;)

> <snip>
> > How would I do that without lambda's, if this code is in a method? Should
> > I nest two functions?
> 
> For a straight translation without lambda's you can _always_ use functions.
> nested, if you wish, but not necessarily. lambda's work _exactly_ like
> nested functions, only you cant use statements in them, only expressions.
> 
> But doing it without lambda is not the point -- if lambda wasn't there,
> there would possibly be a more convenient way to do such things, or even
> more speedy (like a module of functions, like operator, for use with map.
> basic things like adding the first element of each argument. Or something.)

Well, if Guido doesn't like them, and they occur almost nowhere in the
library, he might have another thing to do it.

> <snip>
> > lambda's are good, because otherwise, it wouldn't be possible to write
> > obfuscated code in Python... Can someone please rewrite the one-liner
> 
> You're missing the point. Guido does not believe obfuscated code is good.
> Why would Python need obfuscated code ? It goes through great pains(*), in
> fact, to make obfuscated code very hard.

I was making a joke ;-)

> (*)Admittedly mostly other peoples' pains, the ones who dislike forcefed
> indentation, for instance :)

Revenge... all those Perl scripts....... REVENGE!!
The Amsterdam Perl Mongers even have '@ $ %' in there logo, as if they
are proud of it... I don't know any Perl, but I can't understand how to
write a function that takes any kind of argument if you need to type
such a prefix...

> > > Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
> > Oh, help! My computer is infected! What should I do now?!
> 
> The usual cure is to install a less gullible mind, or indeed, any at all.
> But that is what the signature tries to do, so perhaps you can consider
> yourself cured ;)

:-)

regards,
Gerrit.

-- 
Please correct any bad English you encounter in my mail!
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O !M !V PS+ PE?
Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK-----




More information about the Python-list mailing list