Reference implementation for PEP 208 (coercion)

Sourceforge unloads are not working. The lastest version of the patch for PEP 208 is here: http://arctrix.com/nas/python/coerce-6.0.diff Operations on instances now call __coerce__ if it exists. I think the patch is now complete. Converting other builtin types to "new style numbers" can be done with a separate patch. Neil

Yes, this is preserved. (I'm spending most of my waking hours understanding this patch -- it is a true piece of wizardry.) --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum wrote:
The fact that coercion didn't allow detection of parameter order was the initial cause for my try at fixing it back then. I was confronted with the fact that at C level there was no way to tell whether the operands were in the order left, right or right, left -- as a result I used a gross hack in mxDateTime to still make this work... -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

Yes, this is preserved. (I'm spending most of my waking hours understanding this patch -- it is a true piece of wizardry.) --Guido van Rossum (home page: http://www.python.org/~guido/)

Guido van Rossum wrote:
The fact that coercion didn't allow detection of parameter order was the initial cause for my try at fixing it back then. I was confronted with the fact that at C level there was no way to tell whether the operands were in the order left, right or right, left -- as a result I used a gross hack in mxDateTime to still make this work... -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
participants (4)
-
Guido van Rossum
-
M.-A. Lemburg
-
Neil Schemenauer
-
Paul Barrett