[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2019-08-26 Thread STINNER Victor
STINNER Victor added the comment: We could add a _PyTuple_Init() function to ensure that the empty tuple singleton is created as soon as possible, as call it early, in pycore_init_types(). -- ___ Python tracker

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2019-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed because several commenters found things to not like about it. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch shows a nice payoff from this short-cut, so go ahead and apply it. Still, I wish there were some aversion to posting a new patch every two days that alters twenty files all over the standard library. The rate of churn is alarming. -- nos

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1391 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes the empty tuple be allocated in static memory rather than dynamic memory, expose a reference to it as _PyTuple_Empty, and makes PyTuple_New(0) never raising exceptions. This allows to simplify the code. No longer need to call PyTuple_N