pymel.util.decoration.interface_wrapper

interface_wrapper(doer, args=[], varargs=None, varkw=None, defaults=None)

A wrapper which allows factories to programatically create functions with precise input arguments, instead of using the argument catch-all:

>>> def f( *args, **kwargs ): 
...     pass

The inputs args, varargs, varkw, and defaults match the outputs of inspect.getargspec

Parameters:
  • doer – the function to be wrapped.
  • args – a list of strings to be used as argument names, in proper order
  • defaults – a list of default values for the arguments. must be less than or equal to args in length. if less than, the last element of defaults will be paired with the last element of args, the second-to-last with the second-to-last and so on ( see inspect.getargspec ). Arguments which pair with a default become keyword arguments.

Previous topic

pymel.util.decoration.decorator

Next topic

pymel.util.enum

Core

Core Modules

Other Modules

This Page