Sugar around Python generators and context managers