[issue3734] subclassing complex

2009-02-13 Thread Georg Brandl
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 ___

[issue3734] subclassing complex

2009-02-11 Thread Mark Dickinson
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.

[issue3734] subclassing complex

2009-02-10 Thread Daniel Diniz
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)

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
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 ___

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
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

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
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:

[issue3734] subclassing complex

2009-02-10 Thread Blair
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

[issue3734] subclassing complex

2008-08-29 Thread Blair
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