Skip to content
Snippets Groups Projects
Commit b5ac7051 authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

struct: add setitem

parent 1364887b
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -78,6 +78,9 @@ class Struct(object):
def __getitem__(self, item):
return self.__dict__[item]
def __setitem__(self, item, value):
self.__dict__[item] = value
def __contains__(self, item):
return item in self.__dict__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment