Replaced a dict-construct with a dictionary comprehension. (#828)

This commit is contained in:
Mads Jensen 2018-01-27 10:22:12 +01:00 committed by Omer Katz
parent 16ea4df217
commit 537e973e7e
1 changed files with 3 additions and 3 deletions

View File

@ -462,9 +462,9 @@ class Channel(AbstractChannel, base.StdChannel):
self.closed = False
# instantiate exchange types
self.exchange_types = dict(
(typ, cls(self)) for typ, cls in items(self.exchange_types)
)
self.exchange_types = {
typ: cls(self) for typ, cls in items(self.exchange_types)
}
try:
self.channel_id = self.connection._avail_channel_ids.pop()