[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Change by Windson Yang :


--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Windson Yang  added the comment:

I'd love to. (BTW, @rhettinger I just watched your fantastic multiprocessing 
tutorial. :D)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch
pull_requests: +7697
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This is a reasonable request.  Would you like to make a PR?

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


New submission from Windson Yang :

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.

--
components: Library (Lib)
messages: 321080
nosy: Windson Yang
priority: normal
severity: normal
status: open
title: abs() method accept argument that implement __abs__()
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com