On Wed, 6 Mar 2002, Bob Miller wrote:

> Perl Pluses
> 
>       Parsing the input was easier in Perl.  I used the
>       exact same regular expressions in both, but the Perl
>       seemed a lot easier.

Is it because Python\'s regex flavor require\'s you
\"escape\" everything\?

>       First time I've ever used the print statement in a nontrivial
>       way.  Worked pretty well in this case.  Wouldn't be as clean
>       if I didn't have whitespace around each calculated value.
>

One feature of python that I've become quite fond of lately is the ability
to hand the string interpolation operator a dictionary and have it
properly format stuff without messing around with print tuples.
 
> I'm still new to Python.  If you can see ways to write it better,
> I'd appreciate the criticism.  If you can see ways to write the
> Perl better, that's cool too.

O, kbob, stop being so darn modest, you're a better programmer than most
of us on this list even aspire to be. I learn something new whenever you
post code to the list, this time that a. I can read more perl than I
realized (or maybe this perl is more lucid than most) b. I've been
developing bad habits even in python, and not structuring my code enough.

Thank you for the lesson Sensei.

 > 
> -- 
> Bob Miller                              K<bob>
> kbobsoft software consulting
> http://kbobsoft.com                     [EMAIL PROTECTED]
> 

http://www.efn.org/~laprice        ( Community, Cooperation, Consensus
http://www.opn.org                 ( Openness to serendipity, make mistakes
http://www.efn.org/~laprice/poems  ( but learn from them.(carpe fructus ludi)

Reply via email to