Closed clooj closed 1 year ago
It maybe a problem about pycharm's debugger. I write a class: `class Query(QueryInstance): def init(self) -> None: self._path: Tuple[Union[str, Callable], ...] = ()
def notest(_):
raise RuntimeError('----')
super().__init__(
test=notest,
hashval=(None,)
)
print("Query")
print(self._path)
def __getattr__(self, item:str):
print("attr")
query = type(self)()
return query`
and this problem will appear at once while I debug. and I did not do debug, that will not occur. So I think it maybe the pycharm's debuger using __getattr__
to load the attribute.
It maybe a problem about pycharm's debugger.
That would be my guess as well. Maybe it would be worth it to create a bug ticket for PyCharm (see https://www.jetbrains.com/help/pycharm/reporting-issues.html)?
When I use the Query class in PyCharm and set a breakpoint in the
__init__()
function before thesuper().__init__(),
the program exits abruptly with the error code -1073741571 (0xC00000FD) without any error message. So I write aprint("Query")
at the end of the__init__()
. And I find that lots of "Query" were printed on the console.After that ,I write a print("is_cacheable queryinstance") at the QueryInstance->is_cacheable() function. Obviously, lots of "is_cacheable queryinstance" were printed.
The test code is that
And my python==3.8