Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PyRRD文档说调用而不是列出rrd.update(timestamp, value1, value2, ...) 参数列表中的每个单个值,我想update()用一个已经包含值的元组来调用:
rrd.update(timestamp, value1, value2, ...)
update()
myValueTuple=[10,11,12,13] rrd.update(timestamp, myValueTuple)
我怎样才能做到这一点?
该解决方案由 python 的本机功能提供,可将元组扩展为参数列表,方法是在元组前面添加星号“*”:
rrd.update(时间戳,*myValueTuple)