Decorators to attach signature information to functions

class core.factory_decorator.inputs(*args)[source]

Bases: object

Add inputs information to a function

Example:
>>> from openalea.core.factory_decorator import inputs
>>> @inputs('a:int=1,b:list=[]')
... def fct(*args):
...     pass
class core.factory_decorator.outputs(*args)[source]

Bases: core.factory_decorator.inputs

Add outputs information to a function

Example:
>>> from openalea.core.factory_decorator import outputs
>>> @outputs('first:int,remainder:list')
... def fct(*args):
...     return int(args[0]), args[1:]
core.factory_decorator.factory(f)[source]

Flag the given function f as an openalea factory.

Previous topic

<no title>

Next topic

<no title>

This Page