为什么 python 队列 class 没有定义 __repr__ 或 __str__?

Why doesn't the python Queue class have a __repr__ or __str__ defined?

我正在尝试打印一个多处理队列,但我只获得了对象的内存地址。有人可以告诉我为什么开发人员决定不实现该功能吗?

您期待看到这些元素吗?由于进程间通信的工作方式,这样做需要 删除 队列中的所有元素,并且结果不一定是 "what's in the queue right now" 其他进程推送和弹出元素同时