Overloading the "and" operator

Robert Kern rkern at ucsd.edu
Sun Mar 13 01:39:05 EST 2005


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
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the Python-list mailing list