8000 gh-120080: Accept ``None`` as a valid argument for direct call of the ``int.__round__`` by Eclips4 · Pull Request #120088 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-120080: Accept None as a valid argument for direct call of the int.__round__ #120088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 7, 2024
Prev Previous commit
Next Next commit
Fix indent
  • Loading branch information
Eclips4 committed Jun 5, 2024
commit dde13ead309435ce76da1c836a69ce64f65321a4
4 changes: 2 additions & 2 deletions Lib/test/test_float.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,8 @@ def test_round_with_none_arg_direct_call(self):
for val in [(1.0).__round__(None),
round(1.0),
round(1.0, None)]:
self.assertEqual(val, 1)
self.assertIs(type(val), int)
self.assertEqual(val, 1)
self.assertIs(type(val), int)

# Beginning with Python 2.6 float has cross platform compatible
# ways to create and represent inf and nan
Expand Down
0