Package prompt :: Module uf_objects :: Class Uf_object
[hide private]
[frames] | no frames]

Class Uf_object

source code


The object for auto-generating the user functions.

Instance Methods [hide private]
 
__call__(self, *uf_args, **uf_kargs)
Make the user function executable.
source code
 
__init__(self, name, title=None, kargs=None, backend=None, desc=None)
Set up the object.
source code
 
__repr__(self)
Replacement function for displaying an instance of this user function class.
source code
str
_build_doc(self)
Create the user function documentation.
source code
str
_intro_text(self, keys, values, prompt=True)
Build and return the user function intro text.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, title=None, kargs=None, backend=None, desc=None)
(Constructor)

source code 

Set up the object.

Parameters:
  • name (str) - The name of the user function.
  • title (str) - The long title of the user function.
  • kargs (list of dict) - The list of keyword argument details.
  • backend (executable object) - The user function back end. This should be a string version with full module path of the function which executes the back end. For example 'generic_fns.pipes.create'. Note, this should be importable as __import__(backend)!
  • desc (str) - The full, multi-paragraph description.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Replacement function for displaying an instance of this user function class.

Overrides: object.__repr__

_build_doc(self)

source code 

Create the user function documentation.

Returns: str
The user function documentation to use in the help system.

_intro_text(self, keys, values, prompt=True)

source code 

Build and return the user function intro text.

Parameters:
  • keys (list of str) - The user function keys.
  • values (list) - The values corresponding to the keys.
  • prompt (bool) - A flag which if True will cause the prompt text to be included.
Returns: str
The user function intro text.