<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Greetings,<br>
<p>Some time ago, I proposed adding a `.fromisocalendar` alternate
constructor to `datetime` (<a moz-do-not-send="true"
href="https://bugs.python.org/issue36004">bpo-36004</a>), with a
corresponding implementation (<a moz-do-not-send="true"
href="https://github.com/python/cpython/pull/11888">PR #11888</a>).
I advertised it on datetime-SIG some time ago but haven't seen
much discussion there, so I'd like to bring it to python-dev's
attention as we near the cut-off for new Python 3.8 features.</p>
<p>Other than the fact that I've needed this functionality in the
past, I also think a good general principle for the datetime
module is that when a class (time, date, datetime) has a
"serialization" method (.strftime, .timestamp, .isoformat,
.isocalendar, etc), there should be a corresponding <i>deserialization</i>
method (.strptime, .fromtimestamp, .fromisoformat) that constructs
a datetime from the output. Now that `fromisoformat` was
introduced in Python 3.7, I think `isocalendar` is the only
remaining method without an inverse. Do people agree with this
principle? Should we add the `fromisocalendar` method?<br>
<br>
Thanks,<br>
Paul<br>
</p>
</body>
</html>