xoa.misc

Miscellaneaous low level utilities

Functions

dict_check_defaults(dd, **defaults)

Check that a dictionary has some default values

dict_filter(kwargs, filters[, defaults, ...])

Filter out kwargs (typically extra calling keywords)

dict_merge(*dd[, mergesubdicts, mergelists, ...])

Merge dictionaries

get_axis_slices(ndim, axis, **kwargs)

Get standard slices for an axis of a ndim array

gunique(seq)

Create a generator that yields unique item whlist presrving the order

is_empty(x)

Check if empty

is_iterable(obj[, nostr, nogen])

Check if an object is iterable or not

match_attrs(obj, checks[, ignorecase, transform])

Check that at least one of the attributes matches check list

match_string(ss, checks[, ignorecase, transform])

Check that a string verify a check list that consists of a list of either strings or callables

Classes

ArgList(argsi)

Utility to always manage arguments as list and return results as input

ArgTuple(argsi)

Utility to always manage arguments as tuple and return results as input

Choices(choices[, case_insensitive, ...])

Choice management for a function or method parameter

DefaultEnumMeta(cls, bases, classdict, *[, ...])

Enum meta-class that support default value and None

IntEnumChoices(value[, names, module, ...])

XEnumMeta(cls, bases, classdict, *[, ...])

Exented version ofnum meta-class