[issue15390] PEP 3121, 384 refactoring applied to datetime module
Antoine Pitrou
report at bugs.python.org
Tue Aug 14 21:09:58 CEST 2012
Antoine Pitrou added the comment:
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_DateTimeType);
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_DeltaType);
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_TimeType);
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_TimeZoneType);
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_DateType);
+ Py_CLEAR(_datetimemodulestate(m)->PyDateTime_TZInfoType);
Style nit: I would really store the module state pointer in a variable here, instead of repeating _datetimemodulestate(m) every line.
(same in other places, such as the module init function)
+PyObject* _Get_State(struct PyModuleDef*);
I'm not sure why a module should define such generic a function, and especially not without a "Py" prefix.
Besides, review comments from issue15653 apply here.
----------
nosy: +pitrou
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15390>
_______________________________________
More information about the Python-bugs-list
mailing list