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_New(0), check it's result for errors, and clean up 
it after the use, you just can use a borrowed reference _PyTuple_Empty.

_PyTuple_Empty is for CPython internal use only.

----------
components: Interpreter Core
messages: 292274
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add _PyTuple_Empty and make PyTuple_New(0) never failing
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30162>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to