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

struct: don't include '_' prefixed attributes in dict representation

those variables will be considered internal.
parent f1dbdb85
No related branches found
No related tags found
No related merge requests found
Pipeline #161484 passed
......@@ -173,7 +173,9 @@ class Struct(object):
"""
d = {}
for k,v in self.__dict__.items():
for k, v in self.__dict__.items():
if k[0] == '_':
continue
if isinstance(v, Struct):
d[k] = v.to_dict(array=array)
else:
......
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