Skip to content

Is support for __round__() missing at the moment? #13069

Answered by jimmo
shovnyk asked this question in Core Development
Discussion options

You must be logged in to vote

@shovnyk __round__ is not supported. This appears to be a deliberate decision, see e.g. #3610

And @andrewleech is correct, round(x) implicitly does float(x) which will call x.__float__.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@shovnyk
Comment options

Comment options

andrewleech
Nov 26, 2023
Collaborator Sponsor

You must be logged in to vote
1 reply
@jimmo
Comment options

Answer selected by shovnyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants