[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7889fcb0697b by Martin Panter in branch '3.5':
Issue #26535: Correct docs regarding the struct buffer size
https://hg.python.org/cpython/rev/7889fcb0697b

New changeset 39dc2f39373d by Martin Panter in branch 'default':
Issue #26535: Merge struct doc from 3.5
https://hg.python.org/cpython/rev/39dc2f39373d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee: docs@python -> martin.panter
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Martin Panter

Martin Panter added the comment:

Indeed, let me try again

--
Added file: http://bugs.python.org/file42462/struct-size.v2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-04-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems you forgot to send a patch.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-04-14 Thread Martin Panter

Martin Panter added the comment:

Here is a new patch:

* Use “The buffer’s size in bytes” wording
* Avoid brackets inside brackets
* Fix the three unpack functions and corresponding methods
* Also fix doc strings

--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: patch review -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-12 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The proposed wording looks fine.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread Martin Panter

Martin Panter added the comment:

The patch looks good to me, though it should be applied to all three unpack 
functions and Struct methods, and the doc strings (struct.unpack.__doc__ etc).

An alternative wording is already used for struct.iter_unpack(): “the buffer’s 
size in bytes”. Maybe that is slightly clearer, but it’s no big deal.

--
stage: needs patch -> patch review
versions: +Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread Baji

Changes by Baji :


Added file: http://bugs.python.org/file42129/issue26535.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread Baji

Changes by Baji :


Removed file: http://bugs.python.org/file42125/issue26535.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread STINNER Victor

STINNER Victor added the comment:

Issue title: "Minor typo in the docs for struct.unpack"

I can say the same on issue26535.diff: there is a typo ;)

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread baji

baji added the comment:

Modified as suggested in the comments

--
keywords: +patch
nosy: +baji
Added file: http://bugs.python.org/file42125/issue26535.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-11 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Georg Brandl

Georg Brandl added the comment:

That sounds good to me. Maybe without so many parentheses :)

--
nosy: +georg.brandl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Antony Lee

Antony Lee added the comment:

I think mentioning calcsize is still helpful, so perhaps something like
"The buffer must contain exactly as many bytes (I think this is clearer than 
"the amount of data") as required by the format (this number can be obtained as 
`struct.calcsize(fmt)`)"?  (and likewise for "unpack_from" and "iter_unpack").

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +mark.dickinson, meador.inge

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I would remove "len(bytes) must equal " at all. len() can return a value not 
equal to the number of bytes contained in the buffer (e.g. for array('I')).

--
nosy: +martin.panter, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Antony Lee

New submission from Antony Lee:

The docstring of struct.unpack currently reads

Unpack from the buffer buffer (presumably packed by pack(fmt, ...)) according 
to the format string fmt. The result is a tuple even if it contains exactly one 
item. The buffer must contain exactly the amount of data required by the format 
(len(bytes) must equal calcsize(fmt)).

It should probably read "len(buffer) must equal calcsize(fmt)".

--
assignee: docs@python
components: Documentation
messages: 261538
nosy: Antony.Lee, docs@python
priority: normal
severity: normal
status: open
title: Minor typo in the docs for struct.unpack
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com