According to the stubs, datetime.datetime.strptime returns a datetime. However, it actually returns the type of the class. So if I subclass datetime and call the subclass's strptime method, I get back an instance of the subclass and not a datetime object, violating the return type constraint.
According to the stubs,
datetime.datetime.strptimereturns adatetime. However, it actually returns the type of the class. So if I subclassdatetimeand call the subclass'sstrptimemethod, I get back an instance of the subclass and not adatetimeobject, violating the return type constraint.