[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread Марк Коренберг
Марк Коренберг added the comment: Ok. This is minor fix, I will not fight for my point of view :) -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg271381 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray
R. David Murray added the comment: Looks correct to me as well. If you can think of a wording that would be clearer, Марк, that would be great, but it shouldn't make the docstring much wordier (we strive for conciseness in docstrings). That last phrase can't be just removed without omitting

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread R. David Murray
R. David Murray added the comment: Looks correct to me as well. If you can think of a wording that would be clearer, Марк, that would be great, but it shouldn't make the docstring much wordier (we strive for conciseness in docstrings). That the last phrase can't be just removed without omitt

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The docstring looks correct to me. The last phrase corresponds to the last paragraph that describes the signed keyword-only argument. Is there anyone else for whom the docstring looks wrong? -- ___ Python tracker

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread INADA Naoki
INADA Naoki added the comment: @mmarkk Do you read full docstring? It's documented very clearly. --- int.to_bytes(length, byteorder, *, signed=False) -> bytes Return an array of bytes representing an integer. The integer is represented using length bytes. An OverflowError is raised if the i

[issue27622] int.to_bytes(): docstring is not precise

2016-07-26 Thread Марк Коренберг
Марк Коренберг added the comment: So, in order to make documentation consistent, either new text should be added, or last phraze removed. That's what I think. -- ___ Python tracker

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread Марк Коренберг
Марк Коренберг added the comment: Well. Phrase `If signed is False and a negative integer is given, an OverflowError is raised.` describe onlyhalf of behaviour. It does not explain behaviour when `signed=True` and value is big enough to trigger exception, but not enough to trigger it when sign

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread INADA Naoki
INADA Naoki added the comment: docstring says: The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes. (Python 3.5.2) -- nosy: +methane ___ Python tracker

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread Марк Коренберг
Марк Коренберг added the comment: The docstring does not say, that positive values also may raise OverflowError if it can not fit into `(byte_count * 8) - 1` bits. -- ___ Python tracker ___

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread Марк Коренберг
Марк Коренберг added the comment: I mean when signed=True -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27622] int.to_bytes(): docstring is not precise

2016-07-25 Thread Марк Коренберг
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)