coding convention conversion
Ben Wolfson
wolfson at midway.uchicago.edu
Sat Dec 23 15:51:44 EST 2000
In article <slrn949c13.40l.grey at teleute.rpglink.com>,
Steve Lamb <morpheus at here.not.there> wrote:
>On Sat, 23 Dec 2000 01:29:00 +0000, Garry Knight <garryknight at bigfoot.com>
>wrote:
>>--------8X-cut here-----------------------------------------------
>>#!/usr/bin/perl
>>
>>while (<>) {
>> if (/^\s*def\s+\w+/) {
>> s/([A-Z])/_\l\1/g;
>> }
>> print;
>>}
>>--------8X-cut here-----------------------------------------------
>
> Anyone else find it ironic that someone is solving a problem using Perl in
>a Python group when the comparable Python would be an excellent exercise to
>perform? :)
Well, no: now you have to change every invocation of the function.
Also, wouldn't that give, if fed BarBaz, _bar_baz? I thought the goal was
bar_baz.
--
Barnabas T. Rumjuggler
I say, an object can move whether or not an "external (male, masculine)
force" chooses to act upon (rape) it!
-- David Zacuto
More information about the Python-list
mailing list