Skip to content

to allow "default" parameter in min and max issue 334 - #459

Merged
jmadler merged 7 commits into
PythonCharmers:masterfrom
SameeraSomisetty:master
May 7, 2019
Merged

jmadler merged 7 commits into
PythonCharmers:masterfrom
SameeraSomisetty:master

Conversation

@SameeraSomisetty

Copy link
Copy Markdown

No description provided.

@jmadler jmadler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread src/future/builtins/misc.py Outdated
- ``open`` (equivalent to io.open on Py2)
- ``super`` (backport of Py3's magic zero-argument super() function
- ``round`` (new "Banker's Rounding" behaviour from Py3)
- ``max`` (new max behaviour from Py3)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``max`` (new max behaviour from Py3)
- ``max`` (new default option from Py3)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread src/future/builtins/misc.py Outdated
- ``super`` (backport of Py3's magic zero-argument super() function
- ``round`` (new "Banker's Rounding" behaviour from Py3)
- ``max`` (new max behaviour from Py3)
- ``min`` (new min behaviour from Py3)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``min`` (new min behaviour from Py3)
- ``min`` (new default option from Py3)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread tests/test_future/test_builtins.py Outdated
self.assertEqual(round(0.125000001, 2), 0.13)
self.assertEqual(round(123.5, 0), 124.0)
self.assertEqual(round(123.5), 124)
self.assertEqual(round(123.5), 124)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.assertEqual(round(123.5), 124)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@jmadler

jmadler commented May 7, 2019

Copy link
Copy Markdown
Contributor

Looks like test failures are unrelated. Thanks for implementing! :)

@jmadler
jmadler merged commit dc0b808 into PythonCharmers:master May 7, 2019
@SameeraSomisetty

SameeraSomisetty commented May 7, 2019 via email

Copy link
Copy Markdown
Author

@jmadler

jmadler commented May 8, 2019

Copy link
Copy Markdown
Contributor

It was my pleasure! You did an excellent job and surpassed my expectations.

Thank you for your help :)

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