We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee6c5a0 commit b18147bCopy full SHA for b18147b
nibabel/caret.py
@@ -45,8 +45,15 @@ class CaretMetaData(xml.XmlSerializable, MutableMapping):
45
b'<MetaData><MD><Name>key</Name><Value>val</Value></MD></MetaData>'
46
"""
47
def __init__(self, *args, **kwargs):
48
+ args, kwargs = self._sanitize(args, kwargs)
49
self._data = dict(*args, **kwargs)
50
51
+ @staticmethod
52
+ def _sanitize(args, kwargs):
53
+ """ Override in subclasses to accept and warn on previous invocations
54
+ """
55
+ return args, kwargs
56
+
57
def __getitem__(self, key):
58
""" Get metadata entry by name
59
0 commit comments