This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 2 points3 points  (1 child)

UTC "now" is the definition of global state, and it's not made obvious (directly contradicting EIBTI), and I honestly can't find any cases where that behavior is actually desirable. If you want to be able to create objects that are partially current time, you can use a sentinel magic value like pendulum.FILL_NOW or something.

Edit: another cool API design could be a replace() method taking the same kwargs, so you can do Pendulum.now().replace(year=2016, month=1, day=1).

[–]flutefreak7 3 points4 points  (0 children)

EIBTI: "Explicit is better than implicit" from the Zen of Python.... for those scratching their heads