customize "async for" on 3.6. and 3.7

This commit is contained in:
rocky
2018-04-19 15:03:09 -04:00
parent 27f67e6fca
commit 0aa41058a6
5 changed files with 81 additions and 2 deletions

View File

@@ -885,6 +885,12 @@ def customize_for_version3(self, version):
PRECEDENCE['attribute37'] = 2
TABLE_DIRECT.update({
'attribute37': ( '%c.%[1]{pattr}', 0 ),
'async_forelse_stmt': (
'%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n',
7, 1, 17, (25, 'else_suite') ),
'async_for_stmt': (
'%|async for %c in %c:\n%+%c%-%-\n\n',
7, 1, 17),
})
pass
pass # version >= 3.6