[issue21611] int() docstring - unclear what number is

2018-03-16 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Documentation for int constructor mentions __int__ but not __trunc__ ___ Python tracker _

[issue21611] int() docstring - unclear what number is

2018-03-16 Thread Dmitry Andreychuk
Dmitry Andreychuk added the comment: I created this issue almost 4 years ago. Looking at it now, I think that I was asking too much of that docstring. I believe it's current version quite sufficient. I would close the issue, but I'm not sure if it's up to me to decide. -- __

[issue21611] int() docstring - unclear what number is

2018-03-15 Thread Cheryl Sabella
Cheryl Sabella added the comment: Is this superseded by issue 26701? -- nosy: +csabella ___ Python tracker ___ ___ Python-bugs-list

[issue21611] int() docstring - unclear what number is

2014-08-28 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue21611] int() docstring - unclear what number is

2014-08-27 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue21611] int() docstring - unclear what number is

2014-06-02 Thread eryksun
eryksun added the comment: The constructor tries __trunc__ (truncate toward 0) if __int__ isn't defined. If __trunc__ doesn't return an instance of int, it calls the intermediate result's __int__ method. In terms of the numbers ABCs, numbers.Real requires __trunc__, which should return a numbe

[issue21611] int() docstring - unclear what number is

2014-06-01 Thread Dmitry Andreychuk
Dmitry Andreychuk added the comment: Now I see that my message may look like a suggestion to add an encyclopedic definition of number there. Sorry. Actually I was talking about requirements for user-defined types to make them work with int(). Something like: "If x has __int__() method return x

[issue21611] int() docstring - unclear what number is

2014-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think there should be a precise definition of what is > considered to be a number there. Sometimes "precise" definitions make the docs harder to use rather than easier. It is the goal of these docs to basically tell what int() does, not to provide a s

[issue21611] int() docstring - unclear what number is

2014-05-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, zach.ware type: -> enhancement versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ __

[issue21611] int() docstring - unclear what number is

2014-05-30 Thread Dmitry Andreychuk
New submission from Dmitry Andreychuk: https://docs.python.org/3.4/library/functions.html?highlight=int#int The docstring for int() function has these sentences: "If x is a number, return x.__int__()." "If x is not a number or if base is given..." Unfortunately the docstring doesn't describe ho