Re: Overloading the "and" operator

2005-03-13 Thread Terry Reedy
"Fredrik Bertilsson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am trying to overload the "and" operatior, but my __and__ method is > never called. That is because, properly speaking, 'and' and 'or' are, in Python, in-line flow-control keywords (related to 'if' and 'else'),

Re: Overloading the "and" operator

2005-03-12 Thread Robert Kern
Fredrik Bertilsson wrote: I am trying to overload the "and" operatior, but my __and__ method is never called. __and__ overloads the "&" operator. The "and" keyword cannot be overloaded. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allo

Overloading the "and" operator

2005-03-12 Thread Fredrik Bertilsson
I am trying to overload the "and" operatior, but my __and__ method is never called. The code look like this: class Filter: column = "" operator = "" value = "" def __init__(self, col, op, val): self.column = col self.operator = op