Rory Campbell-Lange wrote:
Hi Steve
I've been playing around with your two suggestions.
The Record class is an elegant solution. It doesn't however help in the
case where the class has the following general data structure (something
I should have stated originally):
class.config1 = param
Hi Steve
I've been playing around with your two suggestions.
The Record class is an elegant solution. It doesn't however help in the
case where the class has the following general data structure (something
I should have stated originally):
class.config1 = param
class.config2 = param
Rory Campbell-Lange wrote:
Hi. I'm just starting to use python.
I am anxious about how best to set and access items one level down in a
data structure if I am using __setitem__ and __getitem__.
At the moment I can do
for a data structure Data:
object.Data = { 'one' : [1, 2, {}, 4],
Anyone out there?
Criticism about the objective of my question, not just the execution,
gratefully received!
Basically, if I have a
class This:
def __init__(self, x, y):
self.x=x
self.y=y
self.data = {}
and then make all my setitem and getitem cal
Hi. I'm just starting to use python.
I am anxious about how best to set and access items one level down in a
data structure if I am using __setitem__ and __getitem__.
At the moment I can do
for a data structure Data:
object.Data = { 'one' : [1, 2, {}, 4],
'two' : [5, 6,