[Python-Dev] Re: Missing arguments in RE functions

Nicolas Fleury nidoizo at yahoo.com
Sat Sep 11 18:44:01 CEST 2004


Fredrik Lundh wrote:
>>I agree.  In fact, probably the line parameter should have been the first parameter for all 
>>functions
> 
> so where would you put the pattern?

Just after.  You "insert" the line parameter first, since it's the 
additional parameter to the pattern objects functions.  It's basically 
the input followed by everything to modify/search it.  I think it's 
better to insert it at first, since it's a mandatory argument, while it 
can be logical to have optional flags for patterns (and I'm not talking 
about the current request, but in general in API design).  But again, 
it's too late for that and I don't pretend my instinct is universal.

Regards,
Nicolas



More information about the Python-Dev mailing list