Problem with Lexical Scope

jslowery at gmail.com jslowery at gmail.com
Fri Dec 16 22:42:55 EST 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