Issue 34049: abs() method accept argument that implement abs () (original ) (raw ) Issue34049
Created on 2018-07-05 06:44 by Windson Yang , last changed 2022-04-11 14:59 by admin . This issue is now closed .
Pull Requests
URL
Status
Linked
Edit
PR 8103
merged
Windson Yang,2018-07-05 08:04
Messages (4)
msg321080 - (view)
Author: Windson Yang (Windson Yang) *
Date: 2018-07-05 06:44
Just like callable() method in https://docs.python.org/3/library/functions.html#callable > ...instances are callable if their class has a __call__() method. I think we should also mention this in abs(), abs(x) Return the absolute value of a number. If x defines __abs__, abs(x) returns x.__abs__(). The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned.
msg321081 - (view)
Author: Raymond Hettinger (rhettinger) *
Date: 2018-07-05 07:15
This is a reasonable request. Would you like to make a PR?
msg321083 - (view)
Author: Windson Yang (Windson Yang) *
Date: 2018-07-05 08:09
I'd love to. (BTW, @rhettinger I just watched your fantastic multiprocessing tutorial. :D)
msg321141 - (view)
Author: Raymond Hettinger (rhettinger) *
Date: 2018-07-05 23:10
Thanks
History
Date
User
Action
Args
2022-04-11 14:59:02
admin
set
github: 78230
2018-07-05 23:10:25
rhettinger
set
status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2018-07-05 08:10:28
Windson Yang
set
assignee: docs@python components: + Documentation, - Library (Lib)nosy: + docs@python
2018-07-05 08:09:08
Windson Yang
set
messages: +
2018-07-05 08:04:56
Windson Yang
set
keywords: + patch stage: patch reviewpull_requests: + <pull%5Frequest7697>
2018-07-05 07:15:45
rhettinger
set
nosy: + rhettinger messages: +
2018-07-05 06:44:31
Windson Yang
create