[ python-Bugs-1004698 ] Int Type Documentation incomplete

SourceForge.net noreply at sourceforge.net
Fri Aug 6 18:01:40 CEST 2004


Bugs item #1004698, was opened at 2004-08-06 12:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1004698&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Colin J. Williams (cjwhrh)
Assigned to: Nobody/Anonymous (nobody)
Summary: Int Type Documentation incomplete

Initial Comment:
__new__ and __newargs__ don't appear to be documented

c.mro() seems to show a circular definition.

Please see the examples below:
>>> c
<type 'int'>
>>> c.mro()
[<type 'int'>, <type 'object'>]
>>> c.__getnewargs__()
<method '__getnewargs__' of 'int' objects>
>>> c.__getnewargs__(21)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: descriptor '__getnewargs__' of 'int' object
needs an argument
>>> c.__getnewargs__(21)
(21,)
>>> c= 1+1j
>>> c
(1+1j)
>>> c.__getnewargs__(21)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: __getnewargs__() takes no arguments (1 given)
>>> c.__getnewargs__()
((1+1j),)
>>> c.__new__
<built-in method __new__ of type object at 0x1E0B1B40>
>>> c.__new__(ComplexType)
0j
>>> 

Colin W.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1004698&group_id=5470


More information about the Python-bugs-list mailing list