[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2020-09-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks iritkatriel for triaging. I can confirm it's fixed with the linked issue. Closing it as duplicate. ./python Python 3.10.0a0 (heads/master:2b05361bf7, Sep 19 2020, 04:38:05) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2020-09-18 Thread Irit Katriel
Irit Katriel added the comment: I think this was fixed under issue35113. -- nosy: +iritkatriel, xtreak ___ Python tracker ___ ___

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24078 ___ ___

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-05-01 Thread James Edwards
Changes by James Edwards jh...@jheiv.com: -- nosy: +pitrou, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24078 ___ ___

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-05-01 Thread James Edwards
James Edwards added the comment: Added Yury (inspect module) and Antoine (PEP 3155) to nosy -- apologies if you're not interested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24078

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-05-01 Thread James Edwards
James Edwards added the comment: Inspect could probably be updated to use 3.3's __qualname__ in the case of classes-in-classes; classes-in-functions or functions-in-functions would likely be harder, but I'm not sure it's impossible. -- nosy: +jedwards

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-04-29 Thread Siming Yuan
Siming Yuan added the comment: according to inspect.py line 675 - this is only a best effort. is this intended? inspect.py @ 672 if isclass(object): name = object.__name__ pat = re.compile(r'^(\s*)class\s*' + name + r'\b') # make some effort to find the best

[issue24078] inspect.getsourcelines ignores context and returns wrong line #

2015-04-29 Thread Siming Yuan
New submission from Siming Yuan: if the same class name is used within a module, but defined in different contexts (either class in class or class in function), inspect.getsourcelines() on the class object ignores the object context and only returns the first matched name. reproduce: a.py