import psutil
print(psutil.net_io_counters(True))
执行这个网络输出输入函数后,产生的类里有元组senio()。
为什么元组前面会有一个名字senio呢?
元组不应该没有名字吗
import psutil
print(psutil.net_io_counters(True))
执行这个网络输出输入函数后,产生的类里有元组senio()。
为什么元组前面会有一个名字senio呢?
元组不应该没有名字吗
https://github.com/giampaolo/psutil/blob/master/psutil/_pslinux.py
这有它的源代码
retdict是字典,其中包括name和fields,它们是两个元组。