I am newbie to Python and trying to decode a line to port over to Go. In the current python script, I come across this declaration (dataValue) under most of the class.
class Keys(object):
AB1 = 0x0FF
AB2 = 0x0A2
dataValue = {'0xffff':None}
@classmethod
def _init(cls):
for ke, vl in vars(cls).items():
- What is dataValue? Is 0xffff a key and hold None as a value?
- What does vars(cls).items() return?
- @classmethod means this class keys is used only once? (I came across many definitions for @propoerty, @classmthods still these keywords confuses me)
Trying to understand the concepts thru real projects. Thanks in advance!