[Python-3000] __reduce__() and __reduce_ex__()

Guido van Rossum guido at python.org
Mon Feb 11 01:18:09 CET 2008


On Feb 10, 2008 1:01 PM, Raymond Hettinger <python at rcn.com> wrote:
> In Py3.0, would it be worth it to simplify this protocol by combining these two methods?  Always pass in a proto argument and the
> method can ignore it if it wants.

Yeah -- the _ex suffix on the name suggests that that's the API we
wanted but we'd already released a version with a suboptimal API...
:-( There are other uses of 'ex' or 'Ex' on APIs too I believe (maybe
in the C API). It may well be a convention I borrowed from Microsoft.
Any of these that you find are likely cleanup candidates.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list