[issue38337] inspect: getmembers calls properties

2020-03-29 Thread Jonas Drotleff
Jonas Drotleff added the comment: I'm still thinking about this bug/issue/undefined behaviour. Today I wanted to test its behaviour with async: import inspect class Foo: def __init__(self, bar): self._bar = bar @property async def spam(self): print('Called spam')

[issue38337] inspect: getmembers calls properties

2020-01-27 Thread Jonas Drotleff
Jonas Drotleff added the comment: > Here is a link to the discussion of this on ideas Thank you for posting the link. I feel like I came to a dead end with this issue. As I am fairly new to CPython and have never contributed to this project before, I have no idea how to address this and to

[issue38337] inspect: getmembers calls properties

2020-01-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Here is a link to the discussion of this on ideas: https://discuss.python.org/t/implement-inspect-getmembers-static/2550 -- nosy: +cheryl.sabella versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 __

[issue38337] inspect: getmembers calls properties

2019-10-03 Thread Jonas Drotleff
Jonas Drotleff added the comment: Oh, yes I see what you mean. That's my fault, it seems like I copied the wrong line. Sorry. But the important piece is the 'var' attribute. Sorry for the confusion. -- ___ Python tracker

[issue38337] inspect: getmembers calls properties

2019-10-03 Thread hongweipeng
hongweipeng added the comment: I mean why member `__class__` is expected to be `)`. I check PR16521,for __class__, it always gets `)`. -- ___ Python tracker ___ _

[issue38337] inspect: getmembers calls properties

2019-10-03 Thread Jonas Drotleff
Jonas Drotleff added the comment: > The results of this example are different from mine(version 3.7.4) I do not really see any difference. What do you mean? -- nosy: -Sanjay ___ Python tracker

[issue38337] inspect: getmembers calls properties

2019-10-03 Thread hongweipeng
hongweipeng added the comment: The results of this example are different from mine(version 3.7.4). ``` __init__ --- getmembers from instance --- Access property [('__class__', ), ... ('var', 'Hello')] --- getmembers from class--- [('__class__', ),'var', )] ``` -- nosy: +hongweipeng

[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Sanjay
Sanjay added the comment: the issue happens in 2.7 as well -- nosy: +Sanjay versions: +Python 2.7 ___ Python tracker ___ ___ Python

[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Jonas Drotleff
Change by Jonas Drotleff : -- keywords: +patch pull_requests: +16113 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16521 ___ Python tracker ___ _

[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Jonas Drotleff
New submission from Jonas Drotleff : When calling inspect.getmembers on a class that has a property (@property), the property will be called by the getattr call in getmembers. Example: import inspect class Example: def __init__(self, var): self._var = var print('__init__'