Yes! I hope this is a trend that continues. I remember this being quite confusing as a new Python developer. I was convinced there was something special about these kinds of camel cased methods.
Yes! I hope this is a trend that continues. I remember this being quite confusing as a new Python developer. I was convinced there was something special about these kinds of camel cased methods.
Not even a mention of PyO3?
I don’t understand why the most_recent
field is needed. Surely the most recent state can be derived from the order field and the unique constraint on it can prevent concurrency issues if the previous sequence is taken before the state change. The benefit would be that the transition history table could then be append only.
That looks like ISO8601 format so you can use fromisoformat to make the parsing a bit simpler. I’m not clear why you need to drop the microsecond part. Surely if one timestamp is a few microseconds past the second it is later.
d1 = datetime.fromisoformat(date1)
d2 = datetime.fromisoformat(date2)
return date1 if d1 > d2 else date2
Really!? We’re still doing GOTOs in 2023? That should just be a for loop over the collection of tests you want to write.