MCPcopy Create free account
hub / github.com/apache/madlib / Namespace

Class Namespace

src/madpack/argparse.py:1172–1192  ·  view source on GitHub ↗

Simple object for storing attributes. Implements equality by attribute names and values, and provides a simple string representation.

Source from the content-addressed store, hash-verified

1170# ===========================
1171
1172class Namespace(_AttributeHolder):
1173 """Simple object for storing attributes.
1174
1175 Implements equality by attribute names and values, and provides a simple
1176 string representation.
1177 """
1178
1179 def __init__(self, **kwargs):
1180 for name in kwargs:
1181 setattr(self, name, kwargs[name])
1182
1183 __hash__ = None
1184
1185 def __eq__(self, other):
1186 return vars(self) == vars(other)
1187
1188 def __ne__(self, other):
1189 return not (self == other)
1190
1191 def __contains__(self, key):
1192 return key in self.__dict__
1193
1194
1195class _ActionsContainer(object):

Callers 1

parse_known_argsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected