New submission from Simon Law:
The documentation in Python 2.7, 3.2, and 3.3 claim that:
PyObject* PySequence_Fast(PyObject *o, const char *m)
Return value: New reference.
Returns the sequence o as a tuple, unless it is already a tuple or list, in
which case o is returned...
Unfortunately, the code does this in Objects/abstract.c:
v = PySequence_List(it);
And the header file in Include/abstract.h matches the documentation:
PyAPI_FUNC(PyObject *) PySequence_Fast(PyObject *o, const char* m);
/*
Returns the sequence, o, as a tuple, unless it's already a
tuple or list.
*/
----------
components: Interpreter Core
messages: 174633
nosy: sfllaw
priority: normal
severity: normal
status: open
title: Documentation claims that PySequence_Fast returns a tuple, when it
actually returns a list.
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16395>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com