Message335616
Datetime has many methods that "serializes" an instance to some other format - toordinal, timestamp, isoformat, etc. Most methods that "serialize" a datetime have a corresponding method that "deserializes" that method, or another way to reverse the operation:
- strftime / strptime
- timestamp / fromtimestamp
- isoformat / fromisoformat
- toordinal / fromordinal
- timetuple / datetime(*thetuple[0:6])
However, as I found out when implementing `dateutil.parser.isoparse`, there is no simple way to invert `isocalendar()`.
I have an implementation as part of dateutil.parser.isoparse:
https://github.com/dateutil/dateutil/blob/master/dateutil/parser/isoparser.py#L297
If there are no objections, I'd like to add an implementation in CPython itself. Thinking the name should be `fromisocalendar`. |
|
Date |
User |
Action |
Args |
2019-02-15 14:28:36 | p-ganssle | set | recipients:
+ p-ganssle, lemburg, belopolsky |
2019-02-15 14:28:36 | p-ganssle | set | messageid: <1550240916.35.0.451510247621.issue36004@roundup.psfhosted.org> |
2019-02-15 14:28:36 | p-ganssle | link | issue36004 messages |
2019-02-15 14:28:36 | p-ganssle | create | |
|