__coerce__ vs. new-style classes

Hallvard B Furuseth h.b.furuseth at usit.uio.no
Mon Aug 2 11:45:52 EDT 2004


Why do new-style classes disable __coerce__()?
It seems cumbersome to have to write a whole set of methods (e.g.
__add__, __radd__, etc.) to get the same effect.  Is there some way to
automatically generate those methods, or are we simply not supposed to
do coercion for some reason?

-- 
Hallvard



More information about the Python-list mailing list