This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jean.rblt
Recipients jean.rblt
Date 2020-09-09.09:48:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599644937.99.0.824034115929.issue41750@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2020-09-09 09:48:58jean.rbltsetrecipients: + jean.rblt
2020-09-09 09:48:57jean.rbltsetmessageid: <1599644937.99.0.824034115929.issue41750@roundup.psfhosted.org>
2020-09-09 09:48:57jean.rbltlinkissue41750 messages
2020-09-09 09:48:57jean.rbltcreate