0

Python 如何监听 List 长度

 2 years ago
source link: https://www.v2ex.com/t/874515
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Python

Python 如何监听 List 长度

  monetto · 10 分钟前 · 77 次点击

如题,想要监听一个 List 的长度,当长度发生变化时,执行某些逻辑。 但是又不想每次改变的时候都启动一个线程(开销太大了)

有什么办法可以实现吗?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK