Improve and document 'capture'

This commit is contained in:
Carson Katri 2022-11-18 19:04:34 -05:00
commit 7a52377ae9
4 changed files with 71 additions and 3 deletions

View file

@ -326,6 +326,7 @@ class Type:
x = Type()
y = Type()
z = Type()
def capture(self, attribute: Type, **kwargs) -> Callable[[], Type]: return transfer_attribute
{(newline + ' ').join(map(lambda x: x.replace('(', '(self, '), filter(lambda x: x.startswith('def'), symbols)))}
{newline.join(map(type_symbol, Type.__subclasses__()))}