]> git.madduck.net Git - etc/vim.git/blobdiff - tests/data/python37.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add CONTRBUTING info about CHANGES.md requirement (#2073)
[etc/vim.git] / tests / data / python37.py
index 9781ff6391158773a32fbdd0906bc44cd4a423c6..dab8b404a739c57f5258694e28ebe65bd9714462 100644 (file)
@@ -1,10 +1,16 @@
 #!/usr/bin/env python3.7
 
 #!/usr/bin/env python3.7
 
+
 def f():
 def f():
-    return (i*2 async for i in arange(42))
+    return (i * 2 async for i in arange(42))
+
 
 def g():
 
 def g():
-    return (something_long * something_long async for something_long in async_generator(with_an_argument))
+    return (
+        something_long * something_long
+        async for something_long in async_generator(with_an_argument)
+    )
+
 
 async def func():
     if test:
 
 async def func():
     if test:
@@ -14,6 +20,16 @@ async def func():
                 self.async_inc, arange(8), batch_size=3
             )
         ]
                 self.async_inc, arange(8), batch_size=3
             )
         ]
+
+
+def awaited_generator_value(n):
+    return (await awaitable for awaitable in awaitable_list)
+
+
+def make_arange(n):
+    return (i * 2 for i in range(n) if await wrap(i))
+
+
 # output
 
 
 # output
 
 
@@ -39,3 +55,11 @@ async def func():
                 self.async_inc, arange(8), batch_size=3
             )
         ]
                 self.async_inc, arange(8), batch_size=3
             )
         ]
+
+
+def awaited_generator_value(n):
+    return (await awaitable for awaitable in awaitable_list)
+
+
+def make_arange(n):
+    return (i * 2 for i in range(n) if await wrap(i))