I just got burned (wasted a good day or so) by the fact that PyDateTimeAPI wasn't initialized. The datetime.rst doc states (emphasis mine): Before using any of these functions, the header file :file:`datetime.h` must be included in your source (note that this is not included by :file:`Python.h`), and the macro :c:macro:`PyDateTime_IMPORT` must be invoked, *usually as part of the module initialisation function*. I thought that surely the datetime module itself would initialize that stuff. Why not? Is it so terribly expensive that the C API requires this rather weird hack? The code's been their for ages, so there must have been a good reason at one time. Is that reason still valid today? (I haven't programmed at the C API level for a good long while, or I'm sure I'd have encountered this before.) Thx, Skip -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170126/8f58ff1e/attachment-0001.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4