[issue3208] function annotation for builtin and C function

Amaury Forgeot d'Arc report at bugs.python.org
Wed Jul 23 09:14:00 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

- A immmutable object may contain mutable members. Try with a tuple
containing a list.
Then, I don't think that something says that CFunctionObjects are
immutable. They don't have any modifiable attribute, until today!

- (Did I say "string"?) The new PyMethodDef::ml_annotations would not be
a char*, but a PyObject* member. If it is not possible to set it in the
static array, one could update the array in the module init function.

Anyway, for a SWIG module I think the best is to set the __annotations__
in the shadow python file. It seems more practical to build the dict there.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3208>
_______________________________________


More information about the Python-bugs-list mailing list