Reputation: 61
Here's the code:
import datetime
local = {};
class name:
x = 0
y = 0
time = 0
PCH = []
FCC_Queue = []
t = datetime.time(0, 0, 0)
p = name()
p.x = 10
p.y = 20.0
p.time = t.second
PCH.append('xyz','abc',1,15.0)
FCC_Queue.append(10.0,20.0,30.0)
local['Obj1'] = p
Upvotes: 2
Views: 781
Reputation: 4250
Of course you can and your code works.
To access the x
of your object is as simple as
localhostrecord['Obje1'].x
To access the list you do the same and then treat this as a simple list
localhostrecord['Obje1'].PCH
# e.g. access second element of PCH list
localhostrecord['Obje1'].PCH[1]
Upvotes: 2