[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/68fc808bed9f

New changeset 21336392a680 by Serhiy Storchaka in branch '3.6':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/21336392a680

New changeset 1229de1ab5c8 by Serhiy Storchaka in branch 'default':
Issues #25909, #28211: Restored correct documentation of PyMapping_Items,
https://hg.python.org/cpython/rev/1229de1ab5c8

--

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems I was wrong. PyDict_Keys/PyDict_Values/PyDict_Items return a list in 
Python 3. Thus comments in Include/abstract.h were correct. Xiang Zhang noticed 
this in issue28211.

--

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2016-01-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e57949f5d0a9 by Senthil Kumaran in branch '3.5':
issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys and
https://hg.python.org/cpython/rev/e57949f5d0a9

New changeset 739e1b0032c6 by Senthil Kumaran in branch 'default':
merge from 3.5
https://hg.python.org/cpython/rev/739e1b0032c6

--
nosy: +python-dev

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2016-01-21 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the patch. I had to do some minor clarification like mention view 
types apply only to dict and also remove the sentence which mentioned those 
equivalent to list(o.values()) and list(o.items()) in the patch.

With those fixed, I have commited the change.

--
assignee: docs@python -> orsenthil
nosy: +orsenthil
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2016-01-01 Thread Sonali Gupta

Sonali Gupta added the comment:

The documentation in mapping.rst and the comments in abstract.h have been 
changed for PyMapping_Items, PyMapping_Keys and PyMapping_Values.

--
Added file: http://bugs.python.org/file41472/bug.patch

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2015-12-20 Thread Sonali Gupta

Sonali Gupta added the comment:

Should the sentence be removed completely?
> This is equivalent to the Python expression ``list(o.keys())``.

comments in Include/abstract.h are not absolutely correct too so should 
dictionary view be included in the return of PyMapping_Values, PyMapping_Keys 
and PyMapping_Items ??

--

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2015-12-20 Thread Sonali Gupta

Sonali Gupta added the comment:

The documentation now says that On success, return a list, a tuple or a 
dictionary view for PyMapping_Items, PyMapping_Values and PyMapping_Keys.

--
keywords: +patch
nosy: +mine0901
Added file: http://bugs.python.org/file41372/bug.patch

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2015-12-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +martin.panter, r.david.murray

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2015-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> This is equivalent to the Python expression ``list(o.keys())``.

This sentence is not correct.

And comments in Include/abstract.h are not absolutely correct too.

--

___
Python tracker 

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



[issue25909] Incorrect documentation for PyMapping_Items and like

2015-12-19 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The documentation and comments for PyMapping_Items, PyMapping_Keys and 
PyMapping_Values are not correct about return type.

The documentation says that return type is a list. For example for 
PyMapping_Items:

   On success, return a list of the items in object *o*, where each item is a 
tuple
   containing a key-value pair.  On failure, return *NULL*. This is equivalent 
to
   the Python expression ``list(o.items())``.

The comment in Include/abstract.h is more correct, it mentions tuple:

 On success, return a list or tuple of the items in object o,
 where each item is a tuple containing a key-value pair.
 On failure, return NULL.

Actually PyMapping_Items in 3.x can return a list, a tuple, or a dict view (for 
dict).

The same for PyMapping_Keys and PyMapping_Values.

--
assignee: docs@python
components: Documentation
messages: 256727
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Incorrect documentation for PyMapping_Items and like
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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