[Python] A "bug" in inspect.findsource
Jan 10, 2002 at 12:15 am
Why don't you submit it as a patch? Just go to sourceforge and put it in.
That's how python gets better...
: There is a minor bug in inspect.findsource The starting line number of an examined class is searched by using regular expressions. The problem of using regexps is that they can't handle multiline strings correctly, whereas tokenizer can. Here's an example where original inspect.findsource returns an incorrect answer, whereas modified inspect2.findsource, that uses tokenizer returns a right answer. Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 Type "help", "copyright",
: Because I think that the tokenizer solution is too slow. Below are shown some test results that are claiming, that the tokenizer version runs over 7 times slower than the original. What do you think? Should I suggest a patch? Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. 138 function calls (134 primitive calls) in 0.327 CPU seconds Ordered by: standard name ncalls tottime percall cumtime percall
Should ctypes handle mis-matching structure return ABI between mingw and MSVC?
Possible File iteration bug
Python bug? Indexing to matrices
JSONBOT 0.7.1 released
Print Window on IDLE
bug in large file writes, 2.x and 3.x
Released: Python 2.6.7
[RELEASE] 3.1.4 release candidate 1
bug in str.startswith() and str.endswith()
ABC-registered Exceptions are not caught as subclasses
1 of 3
Jan 10, '02 at 12:15a
Jan 11, '02 at 8:39p
2 users in discussion
Joonas Paalasmaa (2)
Fernando Pérez (1)
Groups & Organizations
site design / logo © 2022 Grokbase