MCPcopy Index your code
hub / github.com/tanelpoder/0xtools / Namespace

Class Namespace

lib/0xtools/argparse.py:1166–1186  ·  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

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

Callers 1

parse_known_argsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected