import asyncio

class Example:
    async def __aenter__(self):
        return 3
    async def __aexit__(self, exc_type, exc, tb):
        return True

async def example():
    async with Example() as three:
        print(three == 3)
        raise Exception
    print("Exception got suppressed")

asyncio.run(example())