| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
PyMapping_Keys and PyMapping_Values. Based on patch by Xiang Zhang.
|
| |
| |
| |
| | |
PyMapping_Keys and PyMapping_Values. Based on patch by Xiang Zhang.
|
| | |
|
| |
| |
| |
| | |
Issue #27213.
|
| |
| |
| |
| |
| | |
Revert change "Issue #27213: Reintroduce checks in _PyStack_AsDict()", pushed
by mistake.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with
single tuple or dict.
* Restored more informative error messages for incorrect var-positional and
var-keyword arguments.
* Removed code duplications in _PyEval_EvalCodeWithName().
* Removed redundant runtime checks and parameters in _PyStack_AsDict().
* Added a workaround and enabled previously disabled test in test_traceback.
* Removed dead code from the dis module.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27810: Add a new calling convention for C functions:
PyObject* func(PyObject *self, PyObject **args,
Py_ssize_t nargs, PyObject *kwnames);
Where args is a C array of positional arguments followed by values of keyword
arguments. nargs is the number of positional arguments, kwnames are keys of
keyword arguments. kwnames can be NULL.
|
| |
| |
| |
| |
| | |
Use _PyCFunction_FastCallKeywords() in ceval.c: it allows to remove a lot of
code from ceval.c which was only used to call C functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27830: Add _PyObject_FastCallKeywords(): avoid the creation of a
temporary dictionary for keyword arguments.
Other changes:
* Cleanup call_function() and fast_function() (ex: rename nk to nkwargs)
* Remove now useless do_call(), replaced with _PyObject_FastCallKeywords()
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Issue #27841: Add _PyObject_Call_Prepend() helper function to prepend an
argument to existing arguments to call a function. This helper uses fast calls.
Modify method_call() and slot_tp_new() to use _PyObject_Call_Prepend().
|
| |
| |
| |
| |
| |
| | |
Issue #27830: Similar to _PyObject_FastCallDict(), but keyword arguments are
also passed in the same C array than positional arguments, rather than being
passed as a Python dict.
|
| |
| |
| |
| |
| | |
Issue #27848: use Py_ssize_t rather than C int for the number of function
positional and keyword arguments.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27809:
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
|
| |
| |
| |
| |
| |
| | |
Issue #27128: arg=>args, kw=>kwargs.
Same change for PyEval_CallObjectWithKeywords().
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #27128: Add _PyObject_FastCall(), a new calling convention avoiding a
temporary tuple to pass positional parameters in most cases, but create a
temporary tuple if needed (ex: for the tp_call slot).
The API is prepared to support keyword parameters, but the full implementation
will come later (_PyFunction_FastCall() doesn't support keyword parameters
yet).
Add also:
* _PyStack_AsTuple() helper function: convert a "stack" of parameters to
a tuple.
* _PyCFunction_FastCall(): fast call implementation for C functions
* _PyFunction_FastCall(): fast call implementation for Python functions
|
|
|
|
|
|
| |
PyMapping_Values in Include/abstract.h and Doc/c-api/mapping.rst.
Patch contributed by Sonali Gupta.
|
|
|
|
|
|
| |
Also document that the separate functions that delete objects are preferred;
using PyObject_SetAttr(), _SetAttrString(), and PySequence_SetItem() to
delete is deprecated.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
which returned an invalid result (result+error or no result without error) in
the exception message.
Add also unit test to check that the exception contains the name of the
function.
Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
error messages and comments.
|
| |
| |
| |
| | |
error messages and comments.
|
| |
| |
| |
| |
| | |
PyObject_CallMethod() now changed to `const char*`.
Based on patches by Jörg Müller and Lars Buitinck.
|
| | |
|
| |
| |
| |
| | |
to docs.
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and lifetime issues of dynamically allocated Py_buffer members (#9990)
as well as crashes (#8305, #7433). Many new features have been added
(See whatsnew/3.3), and the documentation has been updated extensively.
The ndarray test object from _testbuffer.c implements all aspects of
PEP-3118, so further development towards the complete implementation
of the PEP can proceed in a test-driven manner.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #12834: Fix incorrect results of memoryview.tobytes() for
non-contiguous arrays.
- Issue #5231: Introduce memoryview.cast() method that allows changing
format and shape without making a copy of the underlying memory.
|
|
|
|
| |
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84391 | antoine.pitrou | 2010-09-01 14:58:21 +0200 (mer., 01 sept. 2010) | 5 lines
Issue #3101: Helper functions _add_one_to_C() and _add_one_to_F() become
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
........
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://svn.python.org/python/branches/py3k
........
r73735 | benjamin.peterson | 2009-07-01 03:45:12 +0200 (Mi, 01 Jul 2009) | 1 line
remove comment about PyNumber_Int
........
r73736 | hirokazu.yamamoto | 2009-07-01 04:24:13 +0200 (Mi, 01 Jul 2009) | 1 line
Added svn:ignore.
........
|
| | |
|
| | |
|
| |
| |
| |
| | |
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|