[issue3734] subclassing complex

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied doc patch in r69573. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue3734] subclassing complex

2009-02-11 Thread Mark Dickinson
Mark Dickinson 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. Please see issue 5

[issue3734] subclassing complex

2009-02-10 Thread Blair
Blair 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 problem could be resol

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
Mark Dickinson 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: +patch nosy: +georg.br

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
Mark Dickinson 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 use coercion; t

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: I'll take a look. -- assignee: -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list maili

[issue3734] subclassing complex

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

[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 le