Python isn't my primary programming language, and a quick Google search didn't yield anything useful, but there has to be a better way to do this. As far as I can tell, Python doesn't keep up with the order attributes are added to an object, at least not when using setattr.
Also, this would ideally be handled with a function argument, as both ways have their uses.
Python isn't my primary programming language, and a quick Google search didn't yield anything useful, but there has to be a better way to do this. As far as I can tell, Python doesn't keep up with the order attributes are added to an object, at least not when using
setattr
.Also, this would ideally be handled with a function argument, as both ways have their uses.
Any thoughts on a better way to handle it?