Is Perl *that* good? (was: How's ruby compare to it older bro
Peter Hansen
peter at engcorp.com
Tue Apr 27 07:25:35 EDT 2004
Peter Maas wrote:
> Peter Hansen wrote:
>
>> I guess it would be interesting to pose the question back to
>> them "If you could not use regexes in Perl, would you still
>> like to program in it?" or "If you couldn't use mysql in PHP
>> would you still use it?"
>>
>> What similar question, if any, would be a difficult one for
>> us Python types?
>
> If you could not use block indentation in Python, would you
> still like to program in it? :-)
The way I indent my braces (the One True Way ;-), I wouldn't
really mind, I suppose:
def install(name)
{
if os.path.exists(name)
{
path, ext = os.path.splitext(name)
if ext == '.zip'
{
try
{
x = Extractor(name)
path = os.path.join(x.extract(), path.replace('_', '.'))
}
finally
{
x.close()
}
}
else
{
path = name
}
}
}
-Peter
More information about the Python-list
mailing list