SUMMARY The `yield from` expression got introduced with Python 3.3, but Kate syntax highlighting does not recognise it properly. `from` is marked in the same way as the from expression of imports, altough it should rather be the colour and style of `yield`. Example: ```python3 from concurrent.futures import ThreadPoolExecutor def potentise(base): return base**3 bases = [i for i in range(1, 1000)] def run(): with ThreadPoolExecutor(4) as pool: yield from pool.map(potentise, bases) if __name__ == '__main__': for n in run(): print(n) ``` More extensive information can be found in this article: http://simeonvisser.com/posts/python-3-using-yield-from-in-generators-part-1.html STEPS TO REPRODUCE 1. Copy the above code snippet to Kate 2. Set Programming Language to Python OBSERVED RESULT The from of `yield from` has the same colour and style as the from of the import. EXPECTED RESULT The from of `yield from` should look the same as `yield`. SOFTWARE/OS VERSIONS Operating System: KDE neon 5.22 KDE Plasma Version: 5.22.4 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.3 Kernel Version: 5.11.0-27-generic (64-bit) Graphics Platform: Wayland Other information Not sure whether I chose the right component
Created attachment 141047 [details] yield from
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/249
Git commit 439f8cbfe0b5d1f931c2233d1790e1280170c24c by Christoph Cullmann, on behalf of Jan Paul Batrina. Committed on 30/08/2021 at 20:30. Pushed by cullmann into branch 'master'. Python: Add "yield from" keyword M +9 -0 autotests/folding/test.py.fold M +9 -0 autotests/html/test.py.dark.html M +9 -0 autotests/html/test.py.html M +9 -0 autotests/input/test.py M +9 -0 autotests/reference/test.py.ref M +15 -2 data/syntax/python.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/439f8cbfe0b5d1f931c2233d1790e1280170c24c