[ python-Bugs-1004698 ] Int Type Documentation incomplete

SourceForge.net noreply at sourceforge.net
Sat Aug 7 20:14:02 CEST 2004


Bugs item #1004698, was opened at 2004-08-06 12:01
Message generated for change (Comment added) made by cjwhrh
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.

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

>Comment By: Colin J. Williams (cjwhrh)
Date: 2004-08-07 14:14

Message:
Logged In: YES 
user_id=285587

The first two seem to be missing from the Reference Doc.

This third is more a matter of puzzlement.

c is of TypeInt
c.mro() returns <type 'int'> as the first item in its list.

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

Comment By: Michael Hudson (mwh)
Date: 2004-08-07 11:42

Message:
Logged In: YES 
user_id=6656

It's hard to make out which specific bug you are reporting, or even 
if you are reporting a specific bug.  Can you please clarify?

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

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