Slide 55
Slide 55 text
Copyright (C) 2015, David Beazley (@dabeaz). http://www.dabeaz.com
Case Study
• Look at implementation of asyncio (stdlib)
55
# asyncio/futures.py
__all__ = ['CancelledError',
'TimeoutError',
'InvalidStateError',
'Future',
'wrap_future']
# asyncio/protocols.py
__all__ = ['BaseProtocol',
'Protocol',
'DatagramProtocol',
'SubprocessProtocol']
# asyncio/queues.py
__all__ = ['Queue',
'PriorityQueue',
'LifoQueue',
'JoinableQueue',
'QueueFull',
'QueueEmpty']
# asyncio/__init__.py
from .futures import *
from .protocols import *
from .queues import *
...
__all__ = (
futures.__all__ +
protocols.__all__ +
queues.__all__ +
...
)