[issue43427] Possible error on the descriptor howto guide

2021-03-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker ___

[issue43427] Possible error on the descriptor howto guide

2021-03-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 45d9c8cda3db7da9fe209bd215ec9a120265ee65 by Miss Islington (bot) in branch '3.9': bpo-43427: Separte the method overview from the static method specifics. (GH-24787) (GH-24849) https://github.com/python/cpython/commit/45d9c8cda3db7da9fe209b

[issue43427] Possible error on the descriptor howto guide

2021-03-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23610 pull_request: https://github.com/python/cpython/pull/24849 ___ Python tracker _

[issue43427] Possible error on the descriptor howto guide

2021-03-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset f00e82f8b87c96ff76d6f768fa7a29cbd86eec6a by Raymond Hettinger in branch 'master': bpo-43427: Separte the method overview from the static method specifics. (GH-24787) https://github.com/python/cpython/commit/f00e82f8b87c96ff76d6f768fa7a29cbd

[issue43427] Possible error on the descriptor howto guide

2021-03-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +23553 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24787 ___ Python tracker __

[issue43427] Possible error on the descriptor howto guide

2021-03-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I can see how that section intro is a bit confusing. Am thinking it will be more clear if the heading "Static Methods" is to moved to just after the table showing the three variants. Otherwise, it looks like the intro text is talking specifically about

[issue43427] Possible error on the descriptor howto guide

2021-03-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue43427] Possible error on the descriptor howto guide

2021-03-08 Thread Kamil Turek
Kamil Turek added the comment: I think there isn't any error. Please look at the example provided in the guide: class E: @staticmethod def f(x): print(x) >>> E.f(3) 3 If it were as you say, method would receive two arguments - f(E, 3) - which is wrong. -- nosy: +kam

[issue43427] Possible error on the descriptor howto guide

2021-03-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue43427] Possible error on the descriptor howto guide

2021-03-07 Thread Marcos M
Marcos M added the comment: Let me provide a link to ease finding this piece of documentation https://docs.python.org/3/howto/descriptor.html#static-methods -- ___ Python tracker ___

[issue43427] Possible error on the descriptor howto guide

2021-03-07 Thread Marcos M
New submission from Marcos M : > To recap, functions have a __get__() method so that they can be converted to > a method when accessed as attributes. The non-data descriptor transforms an > obj.f(*args) call into f(obj, *args). Calling cls.f(*args) becomes f(*args). I THINK it should say cls