Dave Challis <sui...@gmail.com> added the comment:
My mistake, it appears to be related to the OS it's running on rather than the
version (I just happened to test with different versions on different OSes).
On Mac OS X (with 3.6.2):
>>>
New submission from Dave Challis <sui...@gmail.com>:
Tested in python 3.6.2:
>>> import datetime
>>> datetime.datetime.min.strftime('%Y')
'1'
Expected output:
'0001'
This means that strftime and strptime aren't necessarily symmetric, e.g.:
>&g
New submission from Dave Challis:
This occurred when attempting to decode invalid UTF-8 bytes using
errors='replace', then attempting to lowercase the produced unicode string.
This was also tested in python 2.7, but it doesn't occur there.
Code to reproduce:
x =
b'\xe2\xb3\x99\xb3\xd1\x9f
New submission from Dave Challis:
When attempting to detect the presence of CSV headers, delimiters are passed to
a regex function without escaping, which causes an exception if a delimiter
which has meaning in a regex (e.g. '+', '*' etc.) is used.
Code to reproduce:
import csv
s