[New-bugs-announce] [issue30155] Add ability to get/set tzinfo on datetime instances in C API
Anthony Tuininga
report at bugs.python.org
Mon Apr 24 11:27:26 EDT 2017
New submission from Anthony Tuininga:
Right now there is no documented way to create a datetime instance with a tzinfo instance. The documented macros all hard code the value Py_None for the tzinfo parameter. Using the PyObject_Call() method instead of the macro for creating a datetime instance is ~5x slower.
In addition, there is no macro or method for getting the tzinfo from an existing datetime instance. Perhaps creating DATE_GET_TZINFO and TIME_GET_TZINFO would be acceptable?
The enhancement 10381 (http://bugs.python.org/issue10381) would also be needed.
I can provide a GitHub PR if that would be helpful. I first want to make sure that such an effort would be appreciated!
----------
components: Library (Lib)
messages: 292230
nosy: atuining
priority: normal
severity: normal
status: open
title: Add ability to get/set tzinfo on datetime instances in C API
type: enhancement
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30155>
_______________________________________
More information about the New-bugs-announce
mailing list