Issue1152994

classification
Title:
Type: Severity: normal
Components: None Versions:
Milestone:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: bzimmer Nosy List: bzimmer, johahn
Priority: normal Keywords: patch

Created on 2005-02-27.19:11:45 by johahn, last changed 2005-02-28.16:58:40 by johahn.

Files
File name Uploaded Description Edit Remove
type complex.patch johahn, 2005-02-28.16:58:40 make PyComplex a new-style class
Messages
msg2422 (view) Author: Johan M. Hahn (johahn) Date: 2005-02-27.19:11:45
Some details:

__builtin__.complex(int), __builtin__.complex(int, int) and 
PyComplex.J should probably be removed.

Since complex.real is a data member and not a function, 
I had to use PyGetSetDescr. For that I needed an 
accessor method, getReal(), and that it was public. 

complex.__cmp__ is no longer exposed to jython 
(conformant with cpython).

complex.__complex__ is no longer exposed.

The 'boolean init' parameter in PyComplex.complex_new 
should probably be removed (for clarity) since it is always 
false. (Similar in every unmutable type.)

Where are __coerce__, __doc__, __eq__, __ge__, 
__gt__, __le__, __lt__, __ne__, __reduce__ ?
msg2423 (view) Author: Johan M. Hahn (johahn) Date: 2005-02-27.19:37:18
Logged In: YES 
user_id=887415

I should also point out that I didn't understand much of the 
complex.exposed file. And that I just copied int.exposed 
without really understand anything. I have NOT tried to use it. 
Is there any README file?
msg2424 (view) Author: Johan M. Hahn (johahn) Date: 2005-02-27.21:04:00
Logged In: YES 
user_id=887415

hmm.. wait with applying this one... I just noted a fault in it 
and I'm working on it... looks like complex_new() arg parsing 
is a mess :-|
msg2425 (view) Author: Brian Zimmer (bzimmer) Date: 2005-02-28.05:44:00
Logged In: YES 
user_id=37674

There's a write up available here:

http://www.jython.org/cgi-bin/wiki/NewStyleClasses
msg2426 (view) Author: Johan M. Hahn (johahn) Date: 2005-02-28.16:58:39
Logged In: YES 
user_id=887415

Done. 

Btw, none of the errors below has to do with this patch. Just 
thought you'd like to know them anyway.

10 tests failed
['test063', 'test217', 'test238', 'test287', 'test308', 'test312', 
'test313', 'test363', 'test366', 'test369']
History
Date User Action Args
2005-02-27 19:11:45johahncreate