Commit Graph

4 Commits

Author SHA1 Message Date
Tim Abbott
6da0bcec4c Fix argument type for datetime.now. (#268)
It seems to actually take a tzinfo argument, not its subclass
timezone.
2016-06-06 15:21:11 -07:00
Ran Benita
eab591bb08 Change datetime.datetime.astimezone tz argument type from timezone to tzinfo (#186)
timezone inherits from tzinfo, so using tzinfo is more general (and e.g.
pytz types inherit directly from tzinfo).

This is the correct type, as quoted from astimezone's code:

    elif not isinstance(tz, tzinfo):
        raise TypeError("tz argument must be an instance of tzinfo")
2016-05-06 08:06:22 -07:00
Tim Abbott
920def0b1e Fix datetime.timedelta() argument types to be floats. 2016-01-26 16:30:15 -08:00
Guido van Rossum
8c2118bace Move contents of builtins/* to stdlib/*. This simplifies finding stubs. 2016-01-12 12:53:18 -08:00