Аристархов Данила, 517 группа TwoWay 10967
Власов Алексей Олегович 181дса TwoWay 10393
f1import asynciof1import asyncio
22
3class Portal(asyncio.Barrier):3class Portal(asyncio.Barrier):
44
t5    def __init__(self, n):t5    def __init__(self, parties):
6        super().__init__(n)6        super().__init__(parties)
7        self._topic = None7        self._topic = None
88
9    @property9    @property
10    def topic(self):10    def topic(self):
11        return self._topic11        return self._topic
1212
13    async def wait(self, topic=None):13    async def wait(self, topic=None):
14        if topic is not None:14        if topic is not None:
15            self._topic = topic15            self._topic = topic
16        return await super().wait()16        return await super().wait()
1717
18    async def reset(self):18    async def reset(self):
19        await super().reset()19        await super().reset()
20        self._topic = None20        self._topic = None
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op