[issue41750] unpractical printing of datetimes by the interpreter
J Rt
report at bugs.python.org
Wed Sep 9 05:48:58 EDT 2020
New submission from J Rt <jean.rblt at gmail.com>:
I think the way datetimes get printed by the interpreter is a bit unpractical. For example:
datetime.datetime(2020, 9, 9, 8, 0, tzinfo=<UTC>)
The reason for the inpracticality is that this cannot be put right into python back:
>>>datetime.datetime(2020, 9, 9, 8, 0, tzinfo=<UTC>)
File "<ipython-input-77-304f010bd0d1>", line 1
datetime.datetime(2020, 9, 9, 8, 0, tzinfo=<UTC>)
^
SyntaxError: invalid syntax
Would there be a way to make the output printed directly usable again in the interpreter? Printing datetime.datetime(2020, 9, 9, 8, 0, tzinfo=pytz.utc) for example, or something like that?
----------
components: Library (Lib)
messages: 376626
nosy: jean.rblt
priority: normal
severity: normal
status: open
title: unpractical printing of datetimes by the interpreter
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41750>
_______________________________________
More information about the Python-bugs-list
mailing list