[issue5211] Fix complex type to avoid coercion in 2.7.

Mark Dickinson report at bugs.python.org
Wed Feb 3 15:12:10 CET 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Yes, I'd certainly be interested in reviewing a patch.  Though the current behaviour is at most a minor wart, and since it's gone in Python 3.x the motivation to fix it isn't huge. :)

> Where as I think gumtree wants the xcomplex case to behave as
> the xfloat case, e.g. ...

Yes, that was what I was proposing.  But as you point out, the new behaviour wouldn't even match the behaviour of Python 3.x, so it really wouldn't be a terribly useful change.

> However, if we are going to do that then we might as well just
> backport the whole removal of coercion.

That's not really an option:  it has the potential to break existing code that uses coercion.  Removing coercion in Python 2.x would require at least a PEP plus one version's worth of DeprecationWarning.  And given that it currently looks as though Python 2.8 isn't likely to happen at all, that would likely be a wasted effort.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5211>
_______________________________________


More information about the Python-bugs-list mailing list