LowercaseOrderedDict

class mpdaf.tools.LowercaseOrderedDict(*args)[source]

Bases: collections.abc.MutableMapping, collections.OrderedDict

Ordered dictionary where all strings keys are case insensitive. i.e. keys such as ‘abc’, ‘ABC’, ‘Abc’ all map to the same value. This can be useful for mimicking the storage of FITS headers.

Methods Summary

clear(self)

copy(self)

fromkeys()

If not specified, the value defaults to None.

get(self, key[, default])

items(self)

keys(self)

move_to_end()

Move an existing element to the end (or beginning if last==False).

pop(self, key[, default])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem(self[, last])

as a 2-tuple; but raise KeyError if D is empty.

setdefault(self, key[, default])

update(\*args, \*\*kwds)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values(self)

Methods Documentation

clear(self)
copy(self)[source]
fromkeys()

If not specified, the value defaults to None.

get(self, key, default=None)
items(self)
keys(self)
move_to_end()

Move an existing element to the end (or beginning if last==False).

Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key).

pop(self, key, default=<object object at 0x7fbec6465050>)

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem(self, last=True)[source]

as a 2-tuple; but raise KeyError if D is empty.

setdefault(self, key, default=None)
update(*args, **kwds)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values(self)