]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport of patch #1159931/bug #1143895: inspect.getsource failed when
authorJohannes Gijsbers <jlg@dds.nl>
Sat, 12 Mar 2005 16:38:39 +0000 (16:38 +0000)
committerJohannes Gijsbers <jlg@dds.nl>
Sat, 12 Mar 2005 16:38:39 +0000 (16:38 +0000)
commitd86254bc2514ec4fb9e62126c02ef2f6458db67d
treeec60970fbf215dd77c72b935d52bdbefb6848a9f
parente3fa0611a99d101ffa459221fa3a44f4110834b5
Backport of patch #1159931/bug #1143895: inspect.getsource failed when
functions, etc., had comments after the colon, and some other cases.
This patch take a simpler approach that doesn't rely on looking for a
':'. Test cases are not backported, as test_inspect.py has been
rewritten using unittest on the trunk.

Thanks Simon Percivall!
Lib/inspect.py