Christopher Barker writes:
agreed. But we seem to be getting a mixed message here:
1) it's too coplex with too many variable that have to be thought through
s/too//g please. I haven't seen any explicit -1s yet, just "I'm not gonna do it myself for sure". @Aman Paul's discussion mirrors my own thought (or vice versa if you like, Paul -- you wrote it better than I could have).
and won't satisfy everyone anyway.
You've already admitted that.
and
2) It's just a simple one-liner
Those are kind of incompatible ideas ;-)
No, they aren't incompatible at all, because the "it" that refers to to a stdlib patch is a singleton that has to do it all, and the "it" that refers to one-liners is a fairly large plurality of one offs that do one thing well.
This feels to me not so different then math.isclose() -- not that complex, but complex enough that it's good to put a well thought through implementation in the stdlib.
In outline, yes, but math.isclose() is a single function with literally centuries of math thought behind it, and at least a century of numerical analysis. I don't think a projected indexable datetime.range object has quite the same literature backing up the discussion. So I want to see the discussion. Steve