I am new to python ( coming from Java world ). I have a class which has two attributes. I need another attribute which should be an object.
How can I do that more in a pythonic way?
This is what I have tried
class DummyData():
def __init__(self,lat,long):
self.lat = lat
self.long = long
self.data = []
loc_1 = DummyData(12,22)
my_data = {
"mess_11" : 0.002,
"mess_22" : 2.222,
"mess_33" : 3.23
}
loc_1.data = my_data