◐ Shell
clean mode source ↗

Message 143922 - Python tracker

I think the integer objects documentation could be clearer on a
couple of points:

  - Despite being listed under "Concrete Objects Layer", some
    functions implicitly accept anything with an __int__()
    method. Currently only the PyLong_AsLong() documentation
    states this explicitly.

    The patch clearly distinguishes between functions that
    duck type and functions that don't. 

  - The patch replaces "is greater than *_MAX" instances with
    "out of bounds" to include the other error condition
    "is less than *_MIN".


Additionally, the patch fixes comments in longobject.c that
don't state the duck typing behavior.