消息中心, 避免代码的强耦合性
Project description
消息中心, 避免代码的强耦合性
测试代码:
if __name__ == '__main__':
@trigger('test')
def fun_send(a, b, c):
pass
@receiver('test')
def fun_callback_1(a, b, c):
print('fun_1', a, b, c)
@receiver('test')
def fun_callback_2(a, b, c):
print('fun_2', a, b, c)
fun_send(1, 2, 3)
测试代码:
if __name__ == '__main__':
@trigger('test')
def fun_send(a, b, c):
pass
@receiver('test')
def fun_callback_1(a, b, c):
print('fun_1', a, b, c)
@receiver('test')
def fun_callback_2(a, b, c):
print('fun_2', a, b, c)
fun_send(1, 2, 3)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zmsgcentre-1.0.3.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for zmsgcentre-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc0b25652eab5302df2f15cc482dfa68f1e37070e27393e892be2188f313f60c |
|
MD5 | c6f9597ca860c20f4b23b3a55208212c |
|
BLAKE2b-256 | f6e7cda006cc7068e9af968e726933bc700bf38b0ebe2ae85c42f2d2b1e069cf |