M. Dietrich <m...@pyneo.org> added the comment: i am not shure what the code snippet shall proove but shouldnt't it read
from datetime import datetime a_datetime = datetime.now() a_datetime = a_datetime.replace(microsecond = 1) iso_str = a_datetime.isoformat() b_datetime = datetime.strptime(iso_str, "%Y-%m-%dT%H:%M:%S.%f") assert(a_datetime == b_datetime) ? i general i would expect for each operation a reverse if possible to be complete. so if there is a strftime, i look for a strptime, if there is a isoformat, i like a isoparse. and to be complete i need a format tag for ms if there is a microseconds member in datatime object. ---------- nosy: +mdt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1982> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com