ENH: Implement round dunder methods for Timestamp and Timedelta
- [x] closes #58071
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

pre-commit.ci autofix Makes sense, I apologize, I was too hasty to make a PR.
Should I close this and wait until a decision is made? I would recommend closing this PR until discussion in the issue has resolved > I don't think `__round__` should be implemented for these objects. Since `round` is only well specified for numeric values, I think it's too opaque to apply for datelike objects.

@mroeschke @MarcoGorelli @rhshadrach 

Hello, I was the one that created the issue.

There is already an implementation of a round method for timedelta 

pd.Timedelta.round('s') works. (https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.round.html)
so round(pd.Timedelta) feel intuitive and just need to be added ?

(I'm going on again because I still use the fix I made here https://github.com/pandas-dev/pandas/issues/58071 on my production server and I would be happy to not have to handle this manually but to see the library handle it). > so round(pd.Timedelta) feel intuitive and just need to be added ?

As commented above (https://github.com/pandas-dev/pandas/pull/58081#discussion_r1545673887):

> If this just happens to work due to an implementation detail in CPython, then it seems to me to be an abuse of the Python API and could break in the future.

Do you disagree that making `round(pd.Timedelta)` work as it's implemented in this PR is an abuse of the Python API?

Alternatively, if you are wanting the signature to be something like `def __round__(self, n=None):` and have the `n` mean seconds, then I am still of the opinion expressed in https://github.com/pandas-dev/pandas/issues/58071#issuecomment-2028743089 and quite negative on adding this.  So because round(td, n=5) isn't really clear, you don't want to implement round(td).
I understand your point of view.

I disagree that it's a good enough reason to not do it.
with or without this feature, round(td, n=5) would crash.
by doing this feature, hundreds/thousand of developers throughs ages would feel the library even more intuitive with round(td).
But the philosophical defense is understandable. It feels like the defense of a C++ dev rather than python dev but I understand.

Have a nice day boys and thanks for this library (I use it every day at work and I love it !<3)
