STINNER Victor <vstin...@python.org> added the comment:

> If we can keep functions that don't modify the object to accept const 
> PyObject* it will help make things safer in the long run.

In my experience, trying to add "const" is quite painful, since the "const" has 
to be propagated to all functions called by the modified function. Python never 
used "const" with "PyObject*" because they are *so many* functions which really 
modify objects on purpose.

I don't see how adding "const" would help this issue "Make PyObject an opaque 
structure in the limited C API". If you consider that something should be 
changed, please open a *separated* issue.

----------

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

Reply via email to