简体   繁体   English

未解决的参考 - Python 字典

[英]Unresolved reference - Python dictionary

I am trying to create a dictionaryin python, but facing an Unresolved reference 'count' error.我正在尝试在 python 中创建字典,但面临未解决的引用“计数”错误。

dict = {"timestamp": 0.1, counter: 1}

i have noticed that when Im creating a variable name counter with any numeric value the error disappears.我注意到当我创建一个带有任何数值的变量名计数器时,错误消失了。

I am using Pycharm 2020.2.2.我正在使用 Pycharm 2020.2.2。

counter would need to be "counter"柜台需要是“柜台”

dict = {"timestamp": 0.1, "counter": 1} dict = {“时间戳”:0.1,“计数器”:1}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM