Problem with Lexical Scope

jslowery at gmail.com jslowery at gmail.com
Sat Dec 17 04:42:55 CET 2005


>>def lt(*fields):
>>    return collect(fields, lambda x, y: x < y)

>>def gt(*fields):
>>    return collect(fields, lambda x, y: x > y)

>>def gte(*fields):
>>    """ gte(field, ...) -> rule
>>    """
>>    return collect(fields, lambda x, y: x >= y)

>>etc...

>DRY ? ;-)

Do you mean by the doc string or the fact that I'm having to redeclare
built-in operations?




More information about the Python-list mailing list