STINNER Victor added the comment:
+ if (!nstar) {
+ /* There are no positional arguments on the stack or in in a
+ sequence that was unpacked. */
+ return PyTuple_New(0);
+ }
It's possible that stararg is already an empty tuple. Is it worth to use it?
+ if (!nstar) {
+ if (stararg != NULL && PyTuple_CheckExact(stararg)) {
+ Py_INCREF(stararg);
+ return stararg;
+ }
+ else {
+ /* There are no positional arguments on the stack or in in a
+ sequence that was unpacked. */
+ return PyTuple_New(0);
+ }
+ }
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com