Daniel Urban <urban.dani...@gmail.com> added the comment: Here is a new patch.
The name of the optional argument is "default_utcoffset" which is obviously too long, but I can't think a better name. Any suggestions? (I think simply "utcoffset" would be misleading, because the value of the argument is only used for naive instances.) In Modules/datetimemodule.c (in line 4375) I call Py_INCREF on the PyUnicode instance returned by PyArg_ParseTupleAndKeywords. I'm not sure this is the right thing to do. I'm doing it because the doc says that the reference count of an object returned by PyArg_ParseTupleAndKeywords shouldn't be decremented, and I think PyUnicode_AppendAndDel calls Py_XDECREF on its second argument. Can anyone correct or confirm me on this? Thanks. ---------- Added file: http://bugs.python.org/file17275/issue7584_2.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7584> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com