Stefan Krah added the comment: Yes, it's guaranteed:
6.7.8 Initialization -------------------- 10) If an object that has automatic storage duration is not initialized explicitly, its value is indeterminate. If an object that has static storage duration is not initialized explicitly, then: - if it has pointer type, it is initialized to a null pointer; - if it has arithmetic type, it is initialized to (positive or unsigned) zero; - if it is an aggregate, every member is initialized (recursively) according to these rules; - if it is a union, the first named member is initialized (recursively) according to these rules. I'm changing the title so that people don't get the impression that anything is wrong with the initialization. The Py_CLEAR() changes are fine of course. ---------- title: Initialization of globals in stringobject.c and bytesobject.c -> Use Py_CLEAR() in stringobject.c and bytesobject.c _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17034> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com