Thread (1 message) 1 message, 1 author, 2019-11-12

Re: [PATCH] userdiff: support Python async functions

From: Junio C Hamano <hidden>
Date: 2019-11-12 04:43:16

Johannes Sixt [off-list ref] writes:
quoted
...
@@ -0,0 +1,4 @@
+def RIGHT(pi: int = 3.14):
+    while True:
+        break
+    return ChangeMe()
Thank you for providing test cases for Python.

I have one gripe with this set of test, though: They do not demonstrate
that the Python-specific pattern is better than the default pattern. In
fact, if you remove the Python patterns from userdiff.c, you will
observe that these tests still pass.

The one thing that the language specific pattern would do better than
the default is that it picks up indented text. Could we have a test case
or two that show that it indeed does?
Good point.  A method "def" inside a "class" would be one level
indented; I am not sure if it is a kosher style to have "if" at the
unindented top-level, whose body conditionally defines a "class",
but such a class definition would also be indented, I guess.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help