Module k.python

Part of kiwi

Generic python addons
Class ClassInittableMetaType Undocumented
Class ClassInittableObject I am an object which will call a classmethod called
Class _ForwardedProperty Undocumented
Class AttributeForwarder AttributeForwarder is an object which is used to forward certain
Function namedAny Get a fully named package, module, module-global object, or attribute.
Class Settable A mixin class for syntactic sugar. Lets you assign attributes by
Function qual
Function clamp Ensures that x is between the limits set by low and high.
Function slicerange Takes a slice object and returns a range iterator
Function deprecationwarn Prints a deprecation warning
Function disabledeprecationcall Disables all deprecation warnings during the function call to func
Class enum enum is an enumered type implementation in python.
Function all
Function any
def namedAny(name):
Get a fully named package, module, module-global object, or attribute.
Parametersname
Returnsobject, module or attribute
def qual(klass):
Returnsfully qualified module and class name
def clamp(x, low, high):
Ensures that x is between the limits set by low and high. For example, * clamp(5, 10, 15) is 10. * clamp(15, 5, 10) is 10. * clamp(20, 15, 25) is 20.
Parametersxthe value to clamp.
lowthe minimum value allowed.
highthe maximum value allowed.
Returnsthe clamped value
def slicerange(slice, limit):
Takes a slice object and returns a range iterator
Parameterssliceslice object
limitmaximum value allowed
Returnsiterator
def deprecationwarn(msg, stacklevel=2):
Prints a deprecation warning
def disabledeprecationcall(func, *args, **kwargs):
Disables all deprecation warnings during the function call to func
def all(seq):
ReturnsTrue if all items in seq are True
def any(seq):
ReturnsTrue if any item in seq is True
API Documentation for Kiwi, generated by pydoctor.