Georg Brandl ge...@python.org added the comment:
Applied doc patch in r69573.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3734
___
Mark Dickinson dicki...@gmail.com added the comment:
[gumtree]
[...] does not offer
a solution to the original problem, which was rooted in a need to
provide special behaviour based on the numeric types. I made the
original posting because I hoped that this problem could be resolved.
Daniel Diniz aja...@gmail.com added the comment:
Confirmed in trunk. Here's a copy-n-past'able testcase:
class xcomplex( complex ):
def __new__(cls,*args,**kwargs):
return complex.__new__(cls,*args,**kwargs)
def __coerce__(self,other):
t = complex.__coerce__(self,other)
Mark Dickinson dicki...@gmail.com added the comment:
I'll take a look.
--
assignee: - marketdickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3734
___
Mark Dickinson dicki...@gmail.com added the comment:
So there's a hint about what's happening here at the bottom of the section
http://docs.python.org/reference/datamodel.html#id5
of the docs, where it says:
In the current implementation, the built-in numeric types int, long and
float do not
Mark Dickinson dicki...@gmail.com added the comment:
I think this issue comes down to a doc fix, though I've opened issue 5211
for anyone who fancies having a go at removing coercion from the complex
type.
Here's a doc patch.
--
assignee: marketdickinson - georg.brandl
keywords:
Blair bidih...@gmail.com added the comment:
While Mark Dickinson's patch fixes the documentation, it does not offer
a solution to the original problem, which was rooted in a need to
provide special behaviour based on the numeric types. I made the
original posting because I hoped that this
New submission from Blair [EMAIL PROTECTED]:
The following is quoted from the Python docs (ref/numeric_types):
Note: If the right operand's type is a subclass of the left operand's
type and that subclass provides the reflected method for the operation,
this method will be called before the left