Closed sourcesimian closed 11 months ago
This seems to cause many of the tests to fail. I wouldn't say hasattr
et al. "more generic." Using these means that code won't work for dictionaries anymore. I'm going to close this for now, but if you're still interested, it's probably possible to make this work for both cases.
>>> getattr({"foo": 3}, "foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'dict' object has no attribute 'foo'
It would be great if this library could be used to access and modify Kubernetes objects. Using
hasattr()
,getattr()
andsetattr()
is more generic thanfield in data
,data[field]
anddata[field] = value
.