[ijs] > > > I *really* hope the answer to this one is, "don't do that".
[Alexander Belopolsky] > > That's not an option because people already *do* [1] that and they won't > > stop. > > Neither they will stop using datetime.combine() [2] or datetime.replace() > > [3] > > or tolerate if those methods start raising exceptions. [Ethan Furman] > If the default is True (or False), then this won't be a problem. It will > only be None when explicitly asked for. > > `time` can just store the flag, and when it is combined with a date the flag > should be checked and if None and the resulting datetime doesn't exist or is > ambiguous an exception can be raised. A time with a non-constant-offset tzinfo is always ambiguous, and can have an arbitrary number of possible offsets. There are several time zones with at least three possible offsets for a given time in the last 10 years. How on earth do you define the meaning of a time with a non-constant tzinfo attached? Or does it only mean something when it's recombined with a date? ijs _______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
