bpo-34158: Documentation UTC offset update by christopheNan · Pull Request #8377 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, we are wildly inconsistent in this document.

From the fromisoformat documentation (which I wrote 😳):

Specifically, this function supports strings in the format(s)
YYYY-MM-DD[*HH[:MM[:SS[.mmm[mmm]]]][+HH:MM[:SS[.ffffff]]]],
where * can match any single character.

That uses both fff and mmm in the same format string.

moment.js uses SS for fractional seconds, but I find that very confusing.

I think that f is most consistent with the %f notation in str{f,p}time, and avoids the question of whether it should be [.mmm[.uuu]].