Skip to content

introduce __floor__ and __ceil__ for int in Python 3#3306

Merged
JelleZijlstra merged 2 commits intopython:masterfrom
sinancepel:magic_numeric_methods
Oct 5, 2019
Merged

introduce __floor__ and __ceil__ for int in Python 3#3306
JelleZijlstra merged 2 commits intopython:masterfrom
sinancepel:magic_numeric_methods

Conversation

@sinancepel
Copy link
Contributor

In Python 3, int supports the __floor__ and __ceil__ magic methods - let's reflect this in typeshed.

The purpose of the change is to prevent abstract class initialization errors since int <: numbers.Integral, and numbers.Integral has these defined as abstract methods.

@JelleZijlstra JelleZijlstra merged commit cd418e9 into python:master Oct 5, 2019
@sinancepel sinancepel deleted the magic_numeric_methods branch October 7, 2019 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants