我正在通过 Pythons multiprocessing.pipe 传输 WAMP 协议,并且我需要重新实现 WampCraClientProtocol。
问题 A:在以下模棱两可的情况下:
exclude = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003']
eligible = ['ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003']
[TYPE_ID_PUBLISH, topicURI, event, exclude, eligible]
# Is the exclude or eligible stronger?
# (Can I do following?)
exclude = set('ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003')
eligible = set('ABCDEFGH001', 'ABCDEFGH002', 'ABCDEFGH003')
eligible -= exclude
[TYPE_ID_PUBLISH, topicURI, event, [], list(eligible)]
问题 B:excludeMe
所有方式都可以替换为[self.session_id]
?
[TYPE_ID_PUBLISH, topicURI, event, excludeMe] ==
[TYPE_ID_PUBLISH, topicURI, event, [self.session_id]]
/阿基·R。