summaryrefslogtreecommitdiffstats
path: root/Lib/test/inspect_fodder2.py
diff options
context:
space:
mode:
authorJohannes Gijsbers <jlg@dds.nl>2005-03-12 16:37:11 (GMT)
committerJohannes Gijsbers <jlg@dds.nl>2005-03-12 16:37:11 (GMT)
commita5855d5ace1c1426e1247272c688ccc11ae02f7c (patch)
treec841015eced138476cf55a5aaf22942cd37884b6 /Lib/test/inspect_fodder2.py
parentf77d0334f30e331f005090723cd1d2955959a8cd (diff)
downloadcpython-a5855d5ace1c1426e1247272c688ccc11ae02f7c.zip
cpython-a5855d5ace1c1426e1247272c688ccc11ae02f7c.tar.gz
cpython-a5855d5ace1c1426e1247272c688ccc11ae02f7c.tar.bz2
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 ':'. Thanks Simon Percivall!
Diffstat (limited to 'Lib/test/inspect_fodder2.py')
-rw-r--r--Lib/test/inspect_fodder2.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/inspect_fodder2.py b/Lib/test/inspect_fodder2.py
index 44c7572..f216c82 100644
--- a/Lib/test/inspect_fodder2.py
+++ b/Lib/test/inspect_fodder2.py
@@ -53,3 +53,14 @@ a = [None,
def setfunc(func):
globals()["anonymous"] = func
setfunc(lambda x, y: x*y)
+
+# line 57
+def with_comment(): # hello
+ world
+
+# line 61
+multiline_sig = [
+ lambda (x,
+ y): x+y,
+ None,
+ ]