Author itchyny
Recipients belopolsky, itchyny, p-ganssle
Date 2021-02-23.00:44:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I noticed another unexpectedeffect of the IGNORECASE flag. It enables some non-ascii characters to match against the alphabets.

>>> from datetime import datetime
>>> datetime.strptime("Apr\u0130l", "%B")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.9/", line 391, in _strptime
    month = locale_time.f_month.index(found_dict['B'].lower())
ValueError: 'apri̇l' is not in list

I expect time data does not match error. The ASCII flag will disable matching unexpected unicode characters.
Date User Action Args
2021-02-23 00:44:08itchynysetrecipients: + itchyny, belopolsky, p-ganssle
2021-02-23 00:44:08itchynysetmessageid: <>
2021-02-23 00:44:08itchynylinkissue43295 messages
2021-02-23 00:44:08itchynycreate