Override 'and' and 'or'

Wildemar Wildenburger lasses_weil at klapptsowieso.net
Sun Oct 7 11:26:03 EDT 2007


Dekker wrote:
> Well... I have to live with the (binary) __and__, __or__ option and
> the user has to write:
> 
> SqlValueInt(4) & SqlValueInt(5) --> SqlOpAnd(SqlValueInt(4),
> SqlValueInt(5))
> 
> Thanks for your input, but __nonzero__ is not of any help in this
> case... I want to abuse the "magic" functions for some transformations
> and not some evaluation.
> 
Then again, you could always write a function that does this. I know, I 
know ...

/W



More information about the Python-list mailing list