[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset c71ae1a45bd6e6d0f5aebc470b35f5a7dc0d8078 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36743: __get__ is sometimes called without the owner argument (GH-12992) (GH-15589)

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +15265 pull_request: https://github.com/python/cpython/pull/15589 ___ Python tracker ___

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 0dac68f1e593c11612ed54af9edb865d398f3b05 by Raymond Hettinger in branch 'master': bpo-36743: __get__ is sometimes called without the owner argument (#12992) https://github.com/python/cpython/commit/0dac68f1e593c11612ed54af9edb865d398f3b05

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Collecting various factlets on this topic PEP 252 gives the specification for the descriptor protocol: "__get__(): a function callable with one or two arguments that retrieves the attribute value from an object." function_get, property_get,

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > Perhaps the datamodel docs can be clarified to note that callers are allowed > to omit the third argument That's not true in general, only when __get__ is a slot wrapper (i.e. for classes implemented in C). When __get__ is a Python function, nothing

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-05-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Personally, I have always found "instance" and "owner" very confusing names for these arguments. If you want to change the documentation, I would recommend changing those names too. Better names would be "obj" and "cls" or something like that. --

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-04-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +12915 stage: -> patch review ___ Python tracker ___ ___

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps the datamodel docs can be clarified to note that callers are allowed to omit the third argument (which usually only makes sense when the second argument is not None). FWIW, section 3.3.2.3 already has an example of a direct call to a __get__

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-04-27 Thread Jon Dufresne
New submission from Jon Dufresne : Here: https://docs.python.org/3/reference/datamodel.html#object.__get__ The __get__ signature is defined as: object.__get__(self, instance, owner) But here: https://docs.python.org/3/howto/descriptor.html#descriptor-protocol It is defined as:

[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-04-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: