Here is an example of the error that I am facing:
In [1]: from functools import partial
In [2]: from datetime import datetime
In [3]: datetime.strptime("2/3/2016", "%m/%d/%Y")
Out[3]: datetime.datetime(2016, 2, 3, 0, 0)
In [4]: partial(datetime.strptime, "%m/%d/%Y")("2/3/2016")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-d803aff4879c> in <module>
----> 1 partial(datetime.strptime, "%m/%d/%Y")("2/3/2016")
~/miniconda3/envs/ROS/lib/python3.6/_strptime.py in _strptime_datetime(cls, data_string, format)
563 """Return a class cls instance based on the input string and the
564 format string."""
--> 565 tt, fraction = _strptime(data_string, format)
566 tzname, gmtoff = tt[-2:]
567 args = tt[:6] + (fraction,)
~/miniconda3/envs/ROS/lib/python3.6/_strptime.py in _strptime(data_string, format)
360 if not found:
361 raise ValueError("time data %r does not match format %r" %
--> 362 (data_string, format))
363 if len(data_string) != found.end():
364 raise ValueError("unconverted data remains: %s" %
ValueError: time data '%m/%d/%Y' does not match format '2/3/2016'
How do I get datetime.strptime to behave properly using partial? Is this a problem with how I am using partial or how I am using datetime.strptime?