[New-bugs-announce] [issue27622] int.to_bytes(): docstring is not precise

Марк Коренберг report at bugs.python.org
Tue Jul 26 02:20:37 EDT 2016


New submission from Марк Коренберг:

Docstring says:

The signed keyword-only argument determines whether two's complement is
used to represent the integer.  If signed is False and a negative integer
is given, an OverflowError is raised.

But actually, 

    (130).to_bytes(1, 'big', signed=True)

will also trigger OverflowError

----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 271327
nosy: docs at python, mmarkk
priority: normal
severity: normal
status: open
title: int.to_bytes(): docstring is not precise
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27622>
_______________________________________


More information about the New-bugs-announce mailing list