<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 6, 2017 at 3:07 PM, Paul Ganssle <span dir="ltr"><<a href="mailto:pganssle@gmail.com" target="_blank">pganssle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Here is the PR I've submitted:<br>
<br>
<a href="https://github.com/python/cpython/pull/4699" rel="noreferrer" target="_blank">https://github.com/python/<wbr>cpython/pull/4699</a><br>
<br>
The contract that I'm supporting (and, I think it can be argued, the only reasonable contract in the intial implementation) is the following:<br>
<br>
    dtstr = dt.isoformat(*args, **kwargs)<br>
    dt_rt = datetime.fromisoformat(dtstr)<br>
    assert dt_rt == dt                    # The two points represent the same absolute time<br>
    assert dt_rt.replace(tzinfo=None) == dt.replace(tzinfo=None)   # And the same wall time<br></blockquote><div><br></div><div><br></div><div>that looks good.</div><div><br></div><div>And I'm sorry, I got a bit lost in the PR, but you are attaching an "offset" tzinfo, when parsing an iso string that has one, yes?</div><div><br></div><div>I see this in the comments in the PR:</div><div><br></div><div><br></div><div><div>"""</div><div>This does not support parsing arbitrary ISO 8601 strings - it is only intended</div><div>as the inverse operation of :meth:`datetime.isoformat`</div></div><div>"""</div><div><br></div><div>I fully agree that that's the MVP -- but is it that hard to parse arbitrary ISO8601 strings in once you've gotten this far? It's a bit uglier than I'd like, but not THAT bad a spec.</div><div><br></div><div>what ISO8601 compatible features are not supported?</div><div><br></div><div>-CHB</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>