GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Indicate that abs() method accept argument that implement __abs__(), … by Windsooon · Pull Request #7783 · python/cpython

Conversation

@Windsooon

@Windsooon Windsooon commented Jun 19, 2018

Copy link
Copy Markdown
Contributor

…just like call() method in the docs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni

the-knights-who-say-ni commented Jun 19, 2018

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

Thanks again for your contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jun 19, 2018
@bedevere-bot bedevere-bot added the awaiting review label Jun 19, 2018
@Windsooon

Windsooon commented Jun 19, 2018

Copy link
Copy Markdown
Contributor Author

I signed the CLA, Thank you for reviewing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta Mariatta removed the CLA not signed label Jul 13, 2018
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jul 13, 2018
@eric-wieser

This comment has been minimized.

Sign in to view
@Windsooon
Windsooon force-pushed the clean_docs branch from bba5886 to 7079b30 Compare August 2, 2018 11:34
@Windsooon

Windsooon commented Aug 2, 2018

Copy link
Copy Markdown
Contributor Author

@eric-wieser Thanks, I fixed it now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jdemeyer
jdemeyer requested changes Feb 4, 2019
View reviewed changes

@jdemeyer jdemeyer left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think the wording could be improved: what does "The argument may be an integer or a floating point number." really mean now? You should explain that this applies to integers, floating point numbers, complex numbers and anything defining __abs__.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Feb 4, 2019
@matrixise matrixise added docs Documentation in the Doc dir skip issue skip news labels May 15, 2019
JulienPalard
JulienPalard requested changes Sep 10, 2019
View reviewed changes
Comment thread Doc/library/functions.rst Outdated
Return the absolute value of a number. The argument may be an
integer or a floating point number. If the argument is a complex number, its
magnitude is returned.
integer or a floating point number, If *x* defines :meth:`__abs__`,

@JulienPalard JulienPalard Sep 10, 2019

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

There's a capital letter after a coma.
Also I have another proposition about this coma:

[...] integer, a floating point number, a complex number, or any object defining the :meth:__abs__ method. If the argument is a complex number, its magnitude is returned.

I agree with @jdemeyer, it could be "simplified" even to Accept any object *x* implementing :meth:`__abs__` , but this documentation is not the language reference, its audience is newcomers, they care about being able to pass the three builtins they just learnt int, float, complex like abs(-5) and abs(-5.5).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot removed the awaiting core review label Sep 10, 2019
@bedevere-bot

bedevere-bot commented Sep 10, 2019

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Sep 10, 2019
@csabella

csabella commented Feb 4, 2020

Copy link
Copy Markdown
Contributor

@Windsooon, please resolve the merge conflict and address the code review comments. Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eric-wieser

This comment has been minimized.

Sign in to view
@Windsooon Windsooon changed the title Indicate that add() method accept argument that implement __abs__(), … Indicate that add() method accept argument that implement __add__(), … Feb 4, 2020
@Windsooon

Windsooon commented Feb 4, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

To make it easier, how about

"... integer or a floating point number or anything defining __abs__. If the argument is a complex number, its magnitude is returned."

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eric-wieser

This comment has been minimized.

Sign in to view
@Windsooon Windsooon changed the title Indicate that add() method accept argument that implement __add__(), … Indicate that abs() method accept argument that implement __abs__(), … Feb 4, 2020
@Windsooon

Windsooon commented Feb 4, 2020

Copy link
Copy Markdown
Contributor Author

Sorry for the mistake. I just fixed it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JulienPalard

JulienPalard commented Feb 5, 2020

Copy link
Copy Markdown
Member

To make it easier, how about

"... integer or a floating point number or anything defining __abs__. If the argument is a complex number, its magnitude is returned."

Yes, by using

:meth:`__abs__`

instead of a raw abs.

I'm not a native english speaker but I think the first or is now redundent, what about:

The argument may be an integer, a floating point number, or anything defining :meth:`__abs__`.

I'd maybe prefer a bit object over anything, like:

The argument may be an integer, a floating point number, or an object implementing :meth:`__abs__`.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Windsooon
Windsooon force-pushed the clean_docs branch from 70d7d50 to 32ed5bd Compare February 6, 2020 02:27
@Windsooon

Windsooon commented Feb 6, 2020

Copy link
Copy Markdown
Contributor Author

@JulienPalard Thank you. I updated the PR based on your suggestion.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JulienPalard

JulienPalard commented Feb 6, 2020

Copy link
Copy Markdown
Member

@Windsooon could you resolve the conflict?
I would personally do it using git fetch upstream; git rebase upstream/master (my python/cpython remote being named upstream), as your PR is based on a commit from 2018.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Windsooon
Merge branch 'clean_docs' of github.com:Windsooon/cpython into clean_…
7b78a4b
…docs
@Windsooon
Windsooon requested review from a team, 1st1, abalkin, asvetlov, berkerpeksag, brettcannon, encukou, ericsnowcurrently, ericvsmith, ethanfurman, gpshead, gvanrossum, ilevkivskyi, methane, ncoghlan, pablogsal, pganssle, rhettinger, skrah, terryjreedy, tiran, vsajip and warsaw as code owners May 29, 2020 09:24
@Windsooon Windsooon closed this May 29, 2020
@Windsooon Windsooon mentioned this pull request May 29, 2020
Indicate that abs() method accept argument that implement __abs__(), … #20509
Merged
@terryjreedy

terryjreedy commented May 29, 2020

Copy link
Copy Markdown
Member

rebase commonly messes up branches and PRs with the cpython workflow. Did you do git merge in master before updating the branch? git merge upstream/master usually works. There might be a merge conflict, but not likely with a narrow PR like this one. You could still try merge on your local branch if not deleted yet.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Windsooon

Windsooon commented May 29, 2020

Copy link
Copy Markdown
Contributor Author

@terryjreedy Thank you. I just delete the old branch. However, I don't know why my PR will conflict with the current master branch. I will check it out later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@JulienPalard JulienPalard JulienPalard requested changes
@jdemeyer jdemeyer jdemeyer requested changes
@1st1 1st1 Awaiting requested review from 1st1
@abalkin abalkin Awaiting requested review from abalkin
@asvetlov asvetlov Awaiting requested review from asvetlov
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag
@brettcannon brettcannon Awaiting requested review from brettcannon
@encukou encukou Awaiting requested review from encukou
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently
@ericvsmith ericvsmith Awaiting requested review from ericvsmith
@ethanfurman ethanfurman Awaiting requested review from ethanfurman
@gpshead gpshead Awaiting requested review from gpshead
@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@ilevkivskyi ilevkivskyi Awaiting requested review from ilevkivskyi
@methane methane Awaiting requested review from methane
@ncoghlan ncoghlan Awaiting requested review from ncoghlan
@pablogsal pablogsal Awaiting requested review from pablogsal
@pganssle pganssle Awaiting requested review from pganssle
@rhettinger rhettinger Awaiting requested review from rhettinger
@skrah skrah Awaiting requested review from skrah
@terryjreedy terryjreedy Awaiting requested review from terryjreedy
@tiran tiran Awaiting requested review from tiran
@vsajip vsajip Awaiting requested review from vsajip
@warsaw warsaw Awaiting requested review from warsaw

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting changes docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

19 participants

@Windsooon @the-knights-who-say-ni @eric-wieser @bedevere-bot @csabella @JulienPalard @terryjreedy @Asday @jdemeyer @manueljacob @matrixise @Mariatta @serhiy-storchaka @rhettinger @pablogsal @scoder @methane @bsolomon1124 @shihai1991
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.