[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-09 Thread Paddy McCarthy
Paddy McCarthy added the comment: On 06/12/2012 14:31, Ezio Melotti wrote: Ezio Melotti added the comment: I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-09 Thread Ezio Melotti
Ezio Melotti added the comment: Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example http://docs.python.org/3/library/functions.html#all, or the itertools functions you mentioned). For this case

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-09 Thread Paddy McCarthy
Paddy McCarthy added the comment: On 09/12/2012 10:55, Ezio Melotti wrote: Ezio Melotti added the comment: Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Your example is comprehensive but not simple and obvious. I think better to keep it out of doc. -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16580

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-12-06 Thread Ezio Melotti
Ezio Melotti added the comment: I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? -- nosy: +ezio.melotti ___

[issue16580] Add examples to int.to_bytres and int.from_bytes

2012-11-29 Thread Paddy McCarthy
New submission from Paddy McCarthy: http://docs.python.org/3.3/library/stdtypes.html?highlight=to_bytes#int.to_bytes and http://docs.python.org/3.3/library/stdtypes.html?highlight=to_bytes#int.to_bytes would benefit from an example showing what they do based on simpler coding. I have such an