phi.method_builder module
from builder import Builder import utils import inspect Builder.M = property(lambda self: MethodBuilder(self.f)) class MethodBuilder(Builder): """docstring for MethodBuilder.""" def proxy(self, name, *args, **kwargs): if not hasattr(self, name): register_proxy_method(name) return self._unit(lambda x: getattr(x, name)(*args, **kwargs), self.refs) def register_proxy_method(method_name, alias=None): def proxy_method(self, *args, **kwargs): return getattr(self, method_name)(*args, **kwargs) alias = alias if alias else method_name MethodBuilder.register_function_1(proxy_method, "any", alias=alias) _is_viable_method = lambda m: inspect.isroutine(m) and m.__name__[0] is not '_' _get_members = lambda x: inspect.getmembers(x, _is_viable_method) classes = [str, int, list, tuple, dict, float, bool] method_info_list = map(_get_members, classes) method_info_list = utils.flatten_list(method_info_list) for name, f in method_info_list: register_proxy_method(name) # built in functions function_2_names = ["map", "filter", "reduce"] functions_2 = [ (name, f) for name, f in __builtins__.items() if name in function_2_names ] for name, f in __builtins__.items(): try: if hasattr(f, "__name__") and name[0] is not "_" and name not in function_2_names: MethodBuilder.register_function_1(f, "python", alias=name) except Exception as e: print(e) for name, f in functions_2: MethodBuilder.register_function_2(f, "python") #special methods: special_methods = {'__contains__': 'contains' } for method_name, alias in special_methods.items(): register_proxy_method(method_name, alias) #custom methods @MethodBuilder.register_1("python") def Not(x): return not x @MethodBuilder.register_1("python") def And(x, y): return x and y @MethodBuilder.register_1("python") def Or(x, y): return x or y
Module variables
var alias
var classes
var e
var function_2_names
var functions_2
var method_info_list
var method_name
var name
var special_methods
Functions
def And(
x, y)
@MethodBuilder.register_1("python") def And(x, y): return x and y
def Not(
x)
@MethodBuilder.register_1("python") def Not(x): return not x
def Or(
x, y)
@MethodBuilder.register_1("python") def Or(x, y): return x or y
def register_proxy_method(
method_name, alias=None)
def register_proxy_method(method_name, alias=None): def proxy_method(self, *args, **kwargs): return getattr(self, method_name)(*args, **kwargs) alias = alias if alias else method_name MethodBuilder.register_function_1(proxy_method, "any", alias=alias)
Classes
class MethodBuilder
docstring for MethodBuilder.
class MethodBuilder(Builder): """docstring for MethodBuilder.""" def proxy(self, name, *args, **kwargs): if not hasattr(self, name): register_proxy_method(name) return self._unit(lambda x: getattr(x, name)(*args, **kwargs), self.refs)
Ancestors (in MRO)
- MethodBuilder
- phi.builder.Builder
- phi.dsl.Function
- phi.dsl.Node
- __builtin__.object
Instance variables
var M
Methods
def __init__(
self, f=<function identity at 0x7f93fdebbb18>, refs={})
def __init__(self, f=identity, refs={}): super(Builder, self).__init__(f) self.f = f self.refs = refs
def And(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.And(*args, **kwargs)
This method accepts the same arguments as python.And
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.And(x1, *args, **kwargs) <==> builder.And(*args, **kwargs)(x1)
Documentation from python.And
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ArithmeticError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ArithmeticError(*args, **kwargs)
This method accepts the same arguments as python.ArithmeticError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ArithmeticError(x1, *args, **kwargs) <==> builder.ArithmeticError(*args, **kwargs)(x1)
Documentation from python.ArithmeticError
Base class for arithmetic errors.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def AssertionError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.AssertionError(*args, **kwargs)
This method accepts the same arguments as python.AssertionError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.AssertionError(x1, *args, **kwargs) <==> builder.AssertionError(*args, **kwargs)(x1)
Documentation from python.AssertionError
Assertion failed.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def AttributeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.AttributeError(*args, **kwargs)
This method accepts the same arguments as python.AttributeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.AttributeError(x1, *args, **kwargs) <==> builder.AttributeError(*args, **kwargs)(x1)
Documentation from python.AttributeError
Attribute not found.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def BaseException(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.BaseException(*args, **kwargs)
This method accepts the same arguments as python.BaseException
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.BaseException(x1, *args, **kwargs) <==> builder.BaseException(*args, **kwargs)(x1)
Documentation from python.BaseException
Common base class for all exceptions
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def BufferError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.BufferError(*args, **kwargs)
This method accepts the same arguments as python.BufferError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.BufferError(x1, *args, **kwargs) <==> builder.BufferError(*args, **kwargs)(x1)
Documentation from python.BufferError
Buffer error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def BytesWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.BytesWarning(*args, **kwargs) This method accepts the same arguments as `python.BytesWarning`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.BytesWarning(x1, *args, **kwargs) <==> builder.BytesWarning(*args, **kwargs)(x1) ** Documentation from `python.BytesWarning`** Base class for warnings about bytes and buffer related problems, mostly
related to conversion from str or comparing to str.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def DeprecationWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.DeprecationWarning(*args, **kwargs)
This method accepts the same arguments as python.DeprecationWarning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.DeprecationWarning(x1, *args, **kwargs) <==> builder.DeprecationWarning(*args, **kwargs)(x1)
Documentation from python.DeprecationWarning
Base class for warnings about deprecated features.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def EOFError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.EOFError(*args, **kwargs)
This method accepts the same arguments as python.EOFError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.EOFError(x1, *args, **kwargs) <==> builder.EOFError(*args, **kwargs)(x1)
Documentation from python.EOFError
Read beyond end of file.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def EnvironmentError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.EnvironmentError(*args, **kwargs)
This method accepts the same arguments as python.EnvironmentError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.EnvironmentError(x1, *args, **kwargs) <==> builder.EnvironmentError(*args, **kwargs)(x1)
Documentation from python.EnvironmentError
Base class for I/O related errors.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def Exception(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.Exception(*args, **kwargs)
This method accepts the same arguments as python.Exception
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.Exception(x1, *args, **kwargs) <==> builder.Exception(*args, **kwargs)(x1)
Documentation from python.Exception
Common base class for all non-exit exceptions.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def FloatingPointError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.FloatingPointError(*args, **kwargs)
This method accepts the same arguments as python.FloatingPointError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.FloatingPointError(x1, *args, **kwargs) <==> builder.FloatingPointError(*args, **kwargs)(x1)
Documentation from python.FloatingPointError
Floating point operation failed.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def FutureWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.FutureWarning(*args, **kwargs) This method accepts the same arguments as `python.FutureWarning`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.FutureWarning(x1, *args, **kwargs) <==> builder.FutureWarning(*args, **kwargs)(x1) ** Documentation from `python.FutureWarning`** Base class for warnings about constructs that will change semantically
in the future.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def GeneratorExit(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.GeneratorExit(*args, **kwargs)
This method accepts the same arguments as python.GeneratorExit
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.GeneratorExit(x1, *args, **kwargs) <==> builder.GeneratorExit(*args, **kwargs)(x1)
Documentation from python.GeneratorExit
Request that a generator exit.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def IOError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.IOError(*args, **kwargs)
This method accepts the same arguments as python.IOError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.IOError(x1, *args, **kwargs) <==> builder.IOError(*args, **kwargs)(x1)
Documentation from python.IOError
I/O operation failed.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ImportError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ImportError(*args, **kwargs)
This method accepts the same arguments as python.ImportError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ImportError(x1, *args, **kwargs) <==> builder.ImportError(*args, **kwargs)(x1)
Documentation from python.ImportError
Import can't find module, or can't find name in module.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ImportWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ImportWarning(*args, **kwargs)
This method accepts the same arguments as python.ImportWarning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ImportWarning(x1, *args, **kwargs) <==> builder.ImportWarning(*args, **kwargs)(x1)
Documentation from python.ImportWarning
Base class for warnings about probable mistakes in module imports
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def IndentationError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.IndentationError(*args, **kwargs)
This method accepts the same arguments as python.IndentationError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.IndentationError(x1, *args, **kwargs) <==> builder.IndentationError(*args, **kwargs)(x1)
Documentation from python.IndentationError
Improper indentation.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def IndexError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.IndexError(*args, **kwargs)
This method accepts the same arguments as python.IndexError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.IndexError(x1, *args, **kwargs) <==> builder.IndexError(*args, **kwargs)(x1)
Documentation from python.IndexError
Sequence index out of range.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def KeyError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.KeyError(*args, **kwargs)
This method accepts the same arguments as python.KeyError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.KeyError(x1, *args, **kwargs) <==> builder.KeyError(*args, **kwargs)(x1)
Documentation from python.KeyError
Mapping key not found.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def KeyboardInterrupt(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.KeyboardInterrupt(*args, **kwargs)
This method accepts the same arguments as python.KeyboardInterrupt
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.KeyboardInterrupt(x1, *args, **kwargs) <==> builder.KeyboardInterrupt(*args, **kwargs)(x1)
Documentation from python.KeyboardInterrupt
Program interrupted by user.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def LookupError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.LookupError(*args, **kwargs)
This method accepts the same arguments as python.LookupError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.LookupError(x1, *args, **kwargs) <==> builder.LookupError(*args, **kwargs)(x1)
Documentation from python.LookupError
Base class for lookup errors.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def MemoryError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.MemoryError(*args, **kwargs)
This method accepts the same arguments as python.MemoryError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.MemoryError(x1, *args, **kwargs) <==> builder.MemoryError(*args, **kwargs)(x1)
Documentation from python.MemoryError
Out of memory.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def NameError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.NameError(*args, **kwargs)
This method accepts the same arguments as python.NameError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.NameError(x1, *args, **kwargs) <==> builder.NameError(*args, **kwargs)(x1)
Documentation from python.NameError
Name not found globally.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def Not(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.Not(*args, **kwargs)
This method accepts the same arguments as python.Not
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.Not(x1, *args, **kwargs) <==> builder.Not(*args, **kwargs)(x1)
Documentation from python.Not
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def NotImplementedError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.NotImplementedError(*args, **kwargs)
This method accepts the same arguments as python.NotImplementedError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.NotImplementedError(x1, *args, **kwargs) <==> builder.NotImplementedError(*args, **kwargs)(x1)
Documentation from python.NotImplementedError
Method or function hasn't been implemented yet.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def OSError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.OSError(*args, **kwargs)
This method accepts the same arguments as python.OSError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.OSError(x1, *args, **kwargs) <==> builder.OSError(*args, **kwargs)(x1)
Documentation from python.OSError
OS system call failed.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def Or(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.Or(*args, **kwargs)
This method accepts the same arguments as python.Or
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.Or(x1, *args, **kwargs) <==> builder.Or(*args, **kwargs)(x1)
Documentation from python.Or
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def OverflowError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.OverflowError(*args, **kwargs)
This method accepts the same arguments as python.OverflowError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.OverflowError(x1, *args, **kwargs) <==> builder.OverflowError(*args, **kwargs)(x1)
Documentation from python.OverflowError
Result too large to be represented.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def PendingDeprecationWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.PendingDeprecationWarning(*args, **kwargs) This method accepts the same arguments as `python.PendingDeprecationWarning`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.PendingDeprecationWarning(x1, *args, **kwargs) <==> builder.PendingDeprecationWarning(*args, **kwargs)(x1) ** Documentation from `python.PendingDeprecationWarning`** Base class for warnings about features which will be deprecated
in the future.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ReferenceError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ReferenceError(*args, **kwargs)
This method accepts the same arguments as python.ReferenceError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ReferenceError(x1, *args, **kwargs) <==> builder.ReferenceError(*args, **kwargs)(x1)
Documentation from python.ReferenceError
Weak ref proxy used after referent went away.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def RuntimeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.RuntimeError(*args, **kwargs)
This method accepts the same arguments as python.RuntimeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.RuntimeError(x1, *args, **kwargs) <==> builder.RuntimeError(*args, **kwargs)(x1)
Documentation from python.RuntimeError
Unspecified run-time error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def RuntimeWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.RuntimeWarning(*args, **kwargs)
This method accepts the same arguments as python.RuntimeWarning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.RuntimeWarning(x1, *args, **kwargs) <==> builder.RuntimeWarning(*args, **kwargs)(x1)
Documentation from python.RuntimeWarning
Base class for warnings about dubious runtime behavior.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def Scope(
cls)
@classmethod def Scope(cls): return dsl.Scope.GLOBAL_SCOPE
def StandardError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.StandardError(*args, **kwargs) This method accepts the same arguments as `python.StandardError`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.StandardError(x1, *args, **kwargs) <==> builder.StandardError(*args, **kwargs)(x1) ** Documentation from `python.StandardError`** Base class for all standard Python exceptions that do not represent
interpreter exiting.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def StopIteration(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.StopIteration(*args, **kwargs)
This method accepts the same arguments as python.StopIteration
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.StopIteration(x1, *args, **kwargs) <==> builder.StopIteration(*args, **kwargs)(x1)
Documentation from python.StopIteration
Signal the end from iterator.next().
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def SyntaxError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.SyntaxError(*args, **kwargs)
This method accepts the same arguments as python.SyntaxError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.SyntaxError(x1, *args, **kwargs) <==> builder.SyntaxError(*args, **kwargs)(x1)
Documentation from python.SyntaxError
Invalid syntax.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def SyntaxWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.SyntaxWarning(*args, **kwargs)
This method accepts the same arguments as python.SyntaxWarning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.SyntaxWarning(x1, *args, **kwargs) <==> builder.SyntaxWarning(*args, **kwargs)(x1)
Documentation from python.SyntaxWarning
Base class for warnings about dubious syntax.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def SystemError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.SystemError(*args, **kwargs) This method accepts the same arguments as `python.SystemError`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.SystemError(x1, *args, **kwargs) <==> builder.SystemError(*args, **kwargs)(x1) ** Documentation from `python.SystemError`** Internal error in the Python interpreter.
Please report this to the Python maintainer, along with the traceback, the Python version, and the hardware/OS platform and version.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def SystemExit(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.SystemExit(*args, **kwargs)
This method accepts the same arguments as python.SystemExit
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.SystemExit(x1, *args, **kwargs) <==> builder.SystemExit(*args, **kwargs)(x1)
Documentation from python.SystemExit
Request to exit from the interpreter.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def TabError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.TabError(*args, **kwargs)
This method accepts the same arguments as python.TabError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.TabError(x1, *args, **kwargs) <==> builder.TabError(*args, **kwargs)(x1)
Documentation from python.TabError
Improper mixture of spaces and tabs.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def TypeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.TypeError(*args, **kwargs)
This method accepts the same arguments as python.TypeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.TypeError(x1, *args, **kwargs) <==> builder.TypeError(*args, **kwargs)(x1)
Documentation from python.TypeError
Inappropriate argument type.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnboundLocalError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnboundLocalError(*args, **kwargs)
This method accepts the same arguments as python.UnboundLocalError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UnboundLocalError(x1, *args, **kwargs) <==> builder.UnboundLocalError(*args, **kwargs)(x1)
Documentation from python.UnboundLocalError
Local name referenced but not bound to a value.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnicodeDecodeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnicodeDecodeError(*args, **kwargs)
This method accepts the same arguments as python.UnicodeDecodeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UnicodeDecodeError(x1, *args, **kwargs) <==> builder.UnicodeDecodeError(*args, **kwargs)(x1)
Documentation from python.UnicodeDecodeError
Unicode decoding error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnicodeEncodeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnicodeEncodeError(*args, **kwargs)
This method accepts the same arguments as python.UnicodeEncodeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UnicodeEncodeError(x1, *args, **kwargs) <==> builder.UnicodeEncodeError(*args, **kwargs)(x1)
Documentation from python.UnicodeEncodeError
Unicode encoding error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnicodeError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnicodeError(*args, **kwargs)
This method accepts the same arguments as python.UnicodeError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UnicodeError(x1, *args, **kwargs) <==> builder.UnicodeError(*args, **kwargs)(x1)
Documentation from python.UnicodeError
Unicode related error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnicodeTranslateError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnicodeTranslateError(*args, **kwargs)
This method accepts the same arguments as python.UnicodeTranslateError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UnicodeTranslateError(x1, *args, **kwargs) <==> builder.UnicodeTranslateError(*args, **kwargs)(x1)
Documentation from python.UnicodeTranslateError
Unicode translation error.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UnicodeWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UnicodeWarning(*args, **kwargs) This method accepts the same arguments as `python.UnicodeWarning`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.UnicodeWarning(x1, *args, **kwargs) <==> builder.UnicodeWarning(*args, **kwargs)(x1) ** Documentation from `python.UnicodeWarning`** Base class for warnings about Unicode related problems, mostly
related to conversion problems.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def UserWarning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.UserWarning(*args, **kwargs)
This method accepts the same arguments as python.UserWarning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.UserWarning(x1, *args, **kwargs) <==> builder.UserWarning(*args, **kwargs)(x1)
Documentation from python.UserWarning
Base class for warnings generated by user code.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ValueError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ValueError(*args, **kwargs)
This method accepts the same arguments as python.ValueError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ValueError(x1, *args, **kwargs) <==> builder.ValueError(*args, **kwargs)(x1)
Documentation from python.ValueError
Inappropriate argument value (of correct type).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def Warning(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.Warning(*args, **kwargs)
This method accepts the same arguments as python.Warning
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.Warning(x1, *args, **kwargs) <==> builder.Warning(*args, **kwargs)(x1)
Documentation from python.Warning
Base class for warning categories.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ZeroDivisionError(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ZeroDivisionError(*args, **kwargs)
This method accepts the same arguments as python.ZeroDivisionError
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.ZeroDivisionError(x1, *args, **kwargs) <==> builder.ZeroDivisionError(*args, **kwargs)(x1)
Documentation from python.ZeroDivisionError
Second argument to a division or modulo operation was zero.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def abs(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.abs(*args, **kwargs) This method accepts the same arguments as `python.abs`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.abs(x1, *args, **kwargs) <==> builder.abs(*args, **kwargs)(x1) ** Documentation from `python.abs`** abs(number) -> number
Return the absolute value of the argument.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def all(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.all(*args, **kwargs) This method accepts the same arguments as `python.all`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.all(x1, *args, **kwargs) <==> builder.all(*args, **kwargs)(x1) ** Documentation from `python.all`** all(iterable) -> bool
Return True if bool(x) is True for all values x in the iterable. If the iterable is empty, return True.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def any(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.any(*args, **kwargs) This method accepts the same arguments as `python.any`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.any(x1, *args, **kwargs) <==> builder.any(*args, **kwargs)(x1) ** Documentation from `python.any`** any(iterable) -> bool
Return True if bool(x) is True for any x in the iterable. If the iterable is empty, return False.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def append(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.append(*args, **kwargs)
This method accepts the same arguments as any.append
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.append(x1, *args, **kwargs) <==> builder.append(*args, **kwargs)(x1)
Documentation from any.append
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def apply(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.apply(*args, **kwargs) This method accepts the same arguments as `python.apply`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.apply(x1, *args, **kwargs) <==> builder.apply(*args, **kwargs)(x1) ** Documentation from `python.apply`** apply(object[, args[, kwargs]]) -> value
Call a callable object with positional arguments taken from the tuple args, and keyword arguments taken from the optional dictionary kwargs. Note that classes are callable, as are instances with a call() method.
Deprecated since release 2.3. Instead, use the extended call syntax: function(args, *keywords).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def as_integer_ratio(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.as_integer_ratio(*args, **kwargs)
This method accepts the same arguments as any.as_integer_ratio
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.as_integer_ratio(x1, *args, **kwargs) <==> builder.as_integer_ratio(*args, **kwargs)(x1)
Documentation from any.as_integer_ratio
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def basestring(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.basestring(*args, **kwargs)
This method accepts the same arguments as python.basestring
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.basestring(x1, *args, **kwargs) <==> builder.basestring(*args, **kwargs)(x1)
Documentation from python.basestring
Type basestring cannot be instantiated; it is the base for str and unicode.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def bin(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.bin(*args, **kwargs) This method accepts the same arguments as `python.bin`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.bin(x1, *args, **kwargs) <==> builder.bin(*args, **kwargs)(x1) ** Documentation from `python.bin`** bin(number) -> string
Return the binary representation of an integer or long integer.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def bit_length(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.bit_length(*args, **kwargs)
This method accepts the same arguments as any.bit_length
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.bit_length(x1, *args, **kwargs) <==> builder.bit_length(*args, **kwargs)(x1)
Documentation from any.bit_length
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def bool(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.bool(*args, **kwargs) This method accepts the same arguments as `python.bool`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.bool(x1, *args, **kwargs) <==> builder.bool(*args, **kwargs)(x1) ** Documentation from `python.bool`** bool(x) -> bool
Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def buffer(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.buffer(*args, **kwargs) This method accepts the same arguments as `python.buffer`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.buffer(x1, *args, **kwargs) <==> builder.buffer(*args, **kwargs)(x1) ** Documentation from `python.buffer`** buffer(object [, offset[, size]])
Create a new buffer object which references the given object. The buffer will reference a slice of the target object from the start of the object (or at the specified offset). The slice will extend to the end of the target object (or with the specified size).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def bytearray(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.bytearray(*args, **kwargs) This method accepts the same arguments as `python.bytearray`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.bytearray(x1, *args, **kwargs) <==> builder.bytearray(*args, **kwargs)(x1) ** Documentation from `python.bytearray`** bytearray(iterable_of_ints) -> bytearray.
bytearray(string, encoding[, errors]) -> bytearray. bytearray(bytes_or_bytearray) -> mutable copy of bytes_or_bytearray. bytearray(memory_view) -> bytearray.
Construct an mutable bytearray object from: - an iterable yielding integers in range(256) - a text string encoded using the specified encoding - a bytes or a bytearray object - any object implementing the buffer API.
bytearray(int) -> bytearray.
Construct a zero-initialized bytearray of the given length.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def bytes(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.bytes(*args, **kwargs) This method accepts the same arguments as `python.bytes`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.bytes(x1, *args, **kwargs) <==> builder.bytes(*args, **kwargs)(x1) ** Documentation from `python.bytes`** str(object='') -> string
Return a nice string representation of the object. If the argument is a string, the return value is the same object.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def callable(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.callable(*args, **kwargs) This method accepts the same arguments as `python.callable`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.callable(x1, *args, **kwargs) <==> builder.callable(*args, **kwargs)(x1) ** Documentation from `python.callable`** callable(object) -> bool
Return whether the object is callable (i.e., some kind of function). Note that classes are callable, as are instances with a call() method.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def capitalize(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.capitalize(*args, **kwargs)
This method accepts the same arguments as any.capitalize
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.capitalize(x1, *args, **kwargs) <==> builder.capitalize(*args, **kwargs)(x1)
Documentation from any.capitalize
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def center(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.center(*args, **kwargs)
This method accepts the same arguments as any.center
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.center(x1, *args, **kwargs) <==> builder.center(*args, **kwargs)(x1)
Documentation from any.center
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def chr(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.chr(*args, **kwargs) This method accepts the same arguments as `python.chr`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.chr(x1, *args, **kwargs) <==> builder.chr(*args, **kwargs)(x1) ** Documentation from `python.chr`** chr(i) -> character
Return a string of one character with ordinal i; 0 <= i < 256.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def classmethod(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.classmethod(*args, **kwargs) This method accepts the same arguments as `python.classmethod`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.classmethod(x1, *args, **kwargs) <==> builder.classmethod(*args, **kwargs)(x1) ** Documentation from `python.classmethod`** classmethod(function) -> method
Convert a function to be a class method.
A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:
class C: def f(cls, arg1, arg2, ...): ... f = classmethod(f)
It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.
Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def clear(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.clear(*args, **kwargs)
This method accepts the same arguments as any.clear
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.clear(x1, *args, **kwargs) <==> builder.clear(*args, **kwargs)(x1)
Documentation from any.clear
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def cmp(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.cmp(*args, **kwargs) This method accepts the same arguments as `python.cmp`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.cmp(x1, *args, **kwargs) <==> builder.cmp(*args, **kwargs)(x1) ** Documentation from `python.cmp`** cmp(x, y) -> integer
Return negative if x
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def coerce(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.coerce(*args, **kwargs) This method accepts the same arguments as `python.coerce`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.coerce(x1, *args, **kwargs) <==> builder.coerce(*args, **kwargs)(x1) ** Documentation from `python.coerce`** coerce(x, y) -> (x1, y1)
Return a tuple consisting of the two numeric arguments converted to a common type, using the same rules as used by arithmetic operations. If coercion is not possible, raise TypeError.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def compile(
cls, *code, **kwargs)
compile
an object code
which must be part of the domain of the DSL and returns function. It applies the rules of the DSL to create an actual Python function that does what you intend. Normally you will just use pipe, which not only compiles the DSL it actually performs the computation to a given Object/Builder, however, it you are building and API this might be useful since you can create a function from an AST which can itself be used as an element of another AST since final elements of the DSL are functions.
Arguments
*code
: a sequence of elements of the DSL.
Return
A function
Examples
import tensorflow as tf from phi import tb x = placeholder(tf.float32, shape=[None, 10]) f = tb.compile( tb.build, #accept a Object as a parameter and create a builder so you can use the rest of the methods [ { tf.device("/gpu:0"): tb.relu_layer(20) } , { tf.device("/gpu:1"): tb.sigmoid_layer(20) } , { tf.device("/cpu:0"): tb.tanh_layer(20) } ], tb.relu_layer(10) .object() ) h = f(x)
@classmethod def compile(cls, *code, **kwargs): """ `compile` an object `code` which must be part of the domain of the DSL and returns function. It applies the rules of the DSL to create an actual Python function that does what you intend. Normally you will just use pipe, which not only compiles the DSL it actually performs the computation to a given Object/Builder, however, it you are building and API this might be useful since you can create a function from an AST which can itself be used as an element of another AST since final elements of the DSL are functions. **Arguments** * `*code`: a sequence of elements of the DSL. **Return** A function **Examples** import tensorflow as tf from phi import tb x = placeholder(tf.float32, shape=[None, 10]) f = tb.compile( tb.build, #accept a Object as a parameter and create a builder so you can use the rest of the methods [ { tf.device("/gpu:0"): tb.relu_layer(20) } , { tf.device("/gpu:1"): tb.sigmoid_layer(20) } , { tf.device("/cpu:0"): tb.tanh_layer(20) } ], tb.relu_layer(10) .object() ) h = f(x) """ return cls()._(*code, **kwargs)
def complex(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.complex(*args, **kwargs) This method accepts the same arguments as `python.complex`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.complex(x1, *args, **kwargs) <==> builder.complex(*args, **kwargs)(x1) ** Documentation from `python.complex`** complex(real[, imag]) -> complex number
Create a complex number from a real part and an optional imaginary part. This is equivalent to (real + imag*1j) where imag defaults to 0.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def conjugate(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.conjugate(*args, **kwargs)
This method accepts the same arguments as any.conjugate
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.conjugate(x1, *args, **kwargs) <==> builder.conjugate(*args, **kwargs)(x1)
Documentation from any.conjugate
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def contains(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.contains(*args, **kwargs)
This method accepts the same arguments as any.contains
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.contains(x1, *args, **kwargs) <==> builder.contains(*args, **kwargs)(x1)
Documentation from any.contains
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def copy(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.copy(*args, **kwargs)
This method accepts the same arguments as any.copy
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.copy(x1, *args, **kwargs) <==> builder.copy(*args, **kwargs)(x1)
Documentation from any.copy
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def count(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.count(*args, **kwargs)
This method accepts the same arguments as any.count
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.count(x1, *args, **kwargs) <==> builder.count(*args, **kwargs)(x1)
Documentation from any.count
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def decode(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.decode(*args, **kwargs)
This method accepts the same arguments as any.decode
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.decode(x1, *args, **kwargs) <==> builder.decode(*args, **kwargs)(x1)
Documentation from any.decode
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def delattr(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.delattr(*args, **kwargs) This method accepts the same arguments as `python.delattr`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.delattr(x1, *args, **kwargs) <==> builder.delattr(*args, **kwargs)(x1) ** Documentation from `python.delattr`** delattr(object, name)
Delete a named attribute on an object; delattr(x, 'y') is equivalent to ``del x.y''.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def dict(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.dict(*args, **kwargs) This method accepts the same arguments as `python.dict`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.dict(x1, *args, **kwargs) <==> builder.dict(*args, **kwargs)(x1) ** Documentation from `python.dict`** dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def dir(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.dir(*args, **kwargs) This method accepts the same arguments as `python.dir`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.dir(x1, *args, **kwargs) <==> builder.dir(*args, **kwargs)(x1) ** Documentation from `python.dir`** dir([object]) -> list of strings
If called without an argument, return the names in the current scope. Else, return an alphabetized list of names comprising (some of) the attributes of the given object, and of attributes reachable from it. If the object supplies a method named dir, it will be used; otherwise the default dir() logic is used and returns: for a module object: the module's attributes. for a class object: its attributes, and recursively the attributes of its bases. for any other object: its attributes, its class's attributes, and recursively the attributes of its class's base classes.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def divmod(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.divmod(*args, **kwargs) This method accepts the same arguments as `python.divmod`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.divmod(x1, *args, **kwargs) <==> builder.divmod(*args, **kwargs)(x1) ** Documentation from `python.divmod`** divmod(x, y) -> (quotient, remainder)
Return the tuple ((x-x%y)/y, x%y). Invariant: div*y + mod == x.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def encode(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.encode(*args, **kwargs)
This method accepts the same arguments as any.encode
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.encode(x1, *args, **kwargs) <==> builder.encode(*args, **kwargs)(x1)
Documentation from any.encode
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def endswith(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.endswith(*args, **kwargs)
This method accepts the same arguments as any.endswith
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.endswith(x1, *args, **kwargs) <==> builder.endswith(*args, **kwargs)(x1)
Documentation from any.endswith
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def enumerate(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.enumerate(*args, **kwargs) This method accepts the same arguments as `python.enumerate`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.enumerate(x1, *args, **kwargs) <==> builder.enumerate(*args, **kwargs)(x1) ** Documentation from `python.enumerate`** enumerate(iterable[, start]) -> iterator for index, value of iterable
Return an enumerate object. iterable must be another object that supports iteration. The enumerate object yields pairs containing a count (from start, which defaults to zero) and a value yielded by the iterable argument. enumerate is useful for obtaining an indexed list: (0, seq[0]), (1, seq[1]), (2, seq[2]), ...
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def eval(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.eval(*args, **kwargs) This method accepts the same arguments as `python.eval`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.eval(x1, *args, **kwargs) <==> builder.eval(*args, **kwargs)(x1) ** Documentation from `python.eval`** eval(source[, globals[, locals]]) -> value
Evaluate the source in the context of globals and locals. The source may be a string representing a Python expression or a code object as returned by compile(). The globals must be a dictionary and locals can be any mapping, defaulting to the current globals and locals. If only globals is given, locals defaults to it.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def execfile(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.execfile(*args, **kwargs) This method accepts the same arguments as `python.execfile`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.execfile(x1, *args, **kwargs) <==> builder.execfile(*args, **kwargs)(x1) ** Documentation from `python.execfile`** execfile(filename[, globals[, locals]])
Read and execute a Python script from a file. The globals and locals are dictionaries, defaulting to the current globals and locals. If only globals is given, locals defaults to it.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def expandtabs(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.expandtabs(*args, **kwargs)
This method accepts the same arguments as any.expandtabs
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.expandtabs(x1, *args, **kwargs) <==> builder.expandtabs(*args, **kwargs)(x1)
Documentation from any.expandtabs
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def extend(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.extend(*args, **kwargs)
This method accepts the same arguments as any.extend
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.extend(x1, *args, **kwargs) <==> builder.extend(*args, **kwargs)(x1)
Documentation from any.extend
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def file(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.file(*args, **kwargs) This method accepts the same arguments as `python.file`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.file(x1, *args, **kwargs) <==> builder.file(*args, **kwargs)(x1) ** Documentation from `python.file`** file(name[, mode[, buffering]]) -> file object
Open a file. The mode can be 'r', 'w' or 'a' for reading (default), writing or appending. The file will be created if it doesn't exist when opened for writing or appending; it will be truncated when opened for writing. Add a 'b' to the mode for binary files. Add a '+' to the mode to allow simultaneous reading and writing. If the buffering argument is given, 0 means unbuffered, 1 means line buffered, and larger numbers specify the buffer size. The preferred way to open a file is with the builtin open() function. Add a 'U' to mode to open the file for input with universal newline support. Any line ending in the input file will be seen as a '\n' in Python. Also, a file so opened gains the attribute 'newlines'; the value for this attribute is one of None (no newline read yet), '\r', '\n', '\r\n' or a tuple containing all the newline types seen.
'U' cannot be combined with 'w' or '+' mode.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def filter(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.filter(*args, **kwargs) This method accepts the same arguments as `python.filter`. However, the 2nd argument is omitted, a partial with the rest of the arguments is returned which expects the 2nd argument such that python.filter(x1, x2, *args, **kwargs) <==> builder.filter(x1, *args, **kwargs)(x2) ** Documentation from `python.filter`** filter(function or None, sequence) -> list, tuple, or string
Return those items of sequence for which function(item) is true. If function is None, return the items that are true. If sequence is a tuple or string, return the same type, else return a list.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._2(fn, *args, **kwargs)
def find(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.find(*args, **kwargs)
This method accepts the same arguments as any.find
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.find(x1, *args, **kwargs) <==> builder.find(*args, **kwargs)(x1)
Documentation from any.find
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def float(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.float(*args, **kwargs) This method accepts the same arguments as `python.float`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.float(x1, *args, **kwargs) <==> builder.float(*args, **kwargs)(x1) ** Documentation from `python.float`** float(x) -> floating point number
Convert a string or number to a floating point number, if possible.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def format(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.format(*args, **kwargs) This method accepts the same arguments as `python.format`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.format(x1, *args, **kwargs) <==> builder.format(*args, **kwargs)(x1) ** Documentation from `python.format`** format(value[, format_spec]) -> string
Returns value.format(format_spec) format_spec defaults to ""
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def fromhex(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.fromhex(*args, **kwargs)
This method accepts the same arguments as any.fromhex
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.fromhex(x1, *args, **kwargs) <==> builder.fromhex(*args, **kwargs)(x1)
Documentation from any.fromhex
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def fromkeys(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.fromkeys(*args, **kwargs)
This method accepts the same arguments as any.fromkeys
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.fromkeys(x1, *args, **kwargs) <==> builder.fromkeys(*args, **kwargs)(x1)
Documentation from any.fromkeys
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def frozenset(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.frozenset(*args, **kwargs) This method accepts the same arguments as `python.frozenset`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.frozenset(x1, *args, **kwargs) <==> builder.frozenset(*args, **kwargs)(x1) ** Documentation from `python.frozenset`** frozenset() -> empty frozenset object
frozenset(iterable) -> frozenset object
Build an immutable unordered collection of unique elements.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def get(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.get(*args, **kwargs)
This method accepts the same arguments as any.get
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.get(x1, *args, **kwargs) <==> builder.get(*args, **kwargs)(x1)
Documentation from any.get
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def getattr(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.getattr(*args, **kwargs) This method accepts the same arguments as `python.getattr`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.getattr(x1, *args, **kwargs) <==> builder.getattr(*args, **kwargs)(x1) ** Documentation from `python.getattr`** getattr(object, name[, default]) -> value
Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y. When a default argument is given, it is returned when the attribute doesn't exist; without it, an exception is raised in that case.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def globals(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.globals(*args, **kwargs) This method accepts the same arguments as `python.globals`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.globals(x1, *args, **kwargs) <==> builder.globals(*args, **kwargs)(x1) ** Documentation from `python.globals`** globals() -> dictionary
Return the dictionary containing the current scope's global variables.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def has_key(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.has_key(*args, **kwargs)
This method accepts the same arguments as any.has_key
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.has_key(x1, *args, **kwargs) <==> builder.has_key(*args, **kwargs)(x1)
Documentation from any.has_key
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def hasattr(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.hasattr(*args, **kwargs) This method accepts the same arguments as `python.hasattr`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.hasattr(x1, *args, **kwargs) <==> builder.hasattr(*args, **kwargs)(x1) ** Documentation from `python.hasattr`** hasattr(object, name) -> bool
Return whether the object has an attribute with the given name. (This is done by calling getattr(object, name) and catching exceptions.)
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def hash(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.hash(*args, **kwargs) This method accepts the same arguments as `python.hash`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.hash(x1, *args, **kwargs) <==> builder.hash(*args, **kwargs)(x1) ** Documentation from `python.hash`** hash(object) -> integer
Return a hash value for the object. Two objects with the same value have the same hash value. The reverse is not necessarily true, but likely.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def hex(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.hex(*args, **kwargs) This method accepts the same arguments as `python.hex`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.hex(x1, *args, **kwargs) <==> builder.hex(*args, **kwargs)(x1) ** Documentation from `python.hex`** hex(number) -> string
Return the hexadecimal representation of an integer or long integer.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def id(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.id(*args, **kwargs) This method accepts the same arguments as `python.id`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.id(x1, *args, **kwargs) <==> builder.id(*args, **kwargs)(x1) ** Documentation from `python.id`** id(object) -> integer
Return the identity of an object. This is guaranteed to be unique among simultaneously existing objects. (Hint: it's the object's memory address.)
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def identity(
self, x)
def identity(self, x): return x
def index(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.index(*args, **kwargs)
This method accepts the same arguments as any.index
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.index(x1, *args, **kwargs) <==> builder.index(*args, **kwargs)(x1)
Documentation from any.index
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def input(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.input(*args, **kwargs) This method accepts the same arguments as `python.input`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.input(x1, *args, **kwargs) <==> builder.input(*args, **kwargs)(x1) ** Documentation from `python.input`** input([prompt]) -> value
Equivalent to eval(raw_input(prompt)).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def insert(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.insert(*args, **kwargs)
This method accepts the same arguments as any.insert
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.insert(x1, *args, **kwargs) <==> builder.insert(*args, **kwargs)(x1)
Documentation from any.insert
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def int(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.int(*args, **kwargs) This method accepts the same arguments as `python.int`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.int(x1, *args, **kwargs) <==> builder.int(*args, **kwargs)(x1) ** Documentation from `python.int`** int(x=0) -> int or long
int(x, base=10) -> int or long
Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead.
If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def intern(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.intern(*args, **kwargs) This method accepts the same arguments as `python.intern`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.intern(x1, *args, **kwargs) <==> builder.intern(*args, **kwargs)(x1) ** Documentation from `python.intern`** intern(string) -> string
``Intern'' the given string. This enters the string in the (global) table of interned strings whose purpose is to speed up dictionary lookups. Return the string itself or the previously interned string object with the same value.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def is_integer(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.is_integer(*args, **kwargs)
This method accepts the same arguments as any.is_integer
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.is_integer(x1, *args, **kwargs) <==> builder.is_integer(*args, **kwargs)(x1)
Documentation from any.is_integer
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isalnum(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isalnum(*args, **kwargs)
This method accepts the same arguments as any.isalnum
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.isalnum(x1, *args, **kwargs) <==> builder.isalnum(*args, **kwargs)(x1)
Documentation from any.isalnum
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isalpha(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isalpha(*args, **kwargs)
This method accepts the same arguments as any.isalpha
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.isalpha(x1, *args, **kwargs) <==> builder.isalpha(*args, **kwargs)(x1)
Documentation from any.isalpha
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isdigit(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isdigit(*args, **kwargs)
This method accepts the same arguments as any.isdigit
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.isdigit(x1, *args, **kwargs) <==> builder.isdigit(*args, **kwargs)(x1)
Documentation from any.isdigit
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isinstance(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isinstance(*args, **kwargs) This method accepts the same arguments as `python.isinstance`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.isinstance(x1, *args, **kwargs) <==> builder.isinstance(*args, **kwargs)(x1) ** Documentation from `python.isinstance`** isinstance(object, class-or-type-or-tuple) -> bool
Return whether an object is an instance of a class or of a subclass thereof. With a type as second argument, return whether that is the object's type. The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for isinstance(x, A) or isinstance(x, B) or ... (etc.).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def islower(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.islower(*args, **kwargs)
This method accepts the same arguments as any.islower
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.islower(x1, *args, **kwargs) <==> builder.islower(*args, **kwargs)(x1)
Documentation from any.islower
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isspace(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isspace(*args, **kwargs)
This method accepts the same arguments as any.isspace
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.isspace(x1, *args, **kwargs) <==> builder.isspace(*args, **kwargs)(x1)
Documentation from any.isspace
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def issubclass(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.issubclass(*args, **kwargs) This method accepts the same arguments as `python.issubclass`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.issubclass(x1, *args, **kwargs) <==> builder.issubclass(*args, **kwargs)(x1) ** Documentation from `python.issubclass`** issubclass(C, B) -> bool
Return whether class C is a subclass (i.e., a derived class) of class B. When using a tuple as the second argument issubclass(X, (A, B, ...)), is a shortcut for issubclass(X, A) or issubclass(X, B) or ... (etc.).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def istitle(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.istitle(*args, **kwargs)
This method accepts the same arguments as any.istitle
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.istitle(x1, *args, **kwargs) <==> builder.istitle(*args, **kwargs)(x1)
Documentation from any.istitle
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def isupper(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.isupper(*args, **kwargs)
This method accepts the same arguments as any.isupper
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.isupper(x1, *args, **kwargs) <==> builder.isupper(*args, **kwargs)(x1)
Documentation from any.isupper
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def items(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.items(*args, **kwargs)
This method accepts the same arguments as any.items
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.items(x1, *args, **kwargs) <==> builder.items(*args, **kwargs)(x1)
Documentation from any.items
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def iter(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.iter(*args, **kwargs) This method accepts the same arguments as `python.iter`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.iter(x1, *args, **kwargs) <==> builder.iter(*args, **kwargs)(x1) ** Documentation from `python.iter`** iter(collection) -> iterator
iter(callable, sentinel) -> iterator
Get an iterator from an object. In the first form, the argument must supply its own iterator, or be a sequence. In the second form, the callable is called until it returns the sentinel.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def iteritems(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.iteritems(*args, **kwargs)
This method accepts the same arguments as any.iteritems
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.iteritems(x1, *args, **kwargs) <==> builder.iteritems(*args, **kwargs)(x1)
Documentation from any.iteritems
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def iterkeys(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.iterkeys(*args, **kwargs)
This method accepts the same arguments as any.iterkeys
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.iterkeys(x1, *args, **kwargs) <==> builder.iterkeys(*args, **kwargs)(x1)
Documentation from any.iterkeys
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def itervalues(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.itervalues(*args, **kwargs)
This method accepts the same arguments as any.itervalues
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.itervalues(x1, *args, **kwargs) <==> builder.itervalues(*args, **kwargs)(x1)
Documentation from any.itervalues
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def join(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.join(*args, **kwargs)
This method accepts the same arguments as any.join
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.join(x1, *args, **kwargs) <==> builder.join(*args, **kwargs)(x1)
Documentation from any.join
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def keys(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.keys(*args, **kwargs)
This method accepts the same arguments as any.keys
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.keys(x1, *args, **kwargs) <==> builder.keys(*args, **kwargs)(x1)
Documentation from any.keys
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def len(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.len(*args, **kwargs) This method accepts the same arguments as `python.len`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.len(x1, *args, **kwargs) <==> builder.len(*args, **kwargs)(x1) ** Documentation from `python.len`** len(object) -> integer
Return the number of items of a sequence or mapping.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def list(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.list(*args, **kwargs) This method accepts the same arguments as `python.list`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.list(x1, *args, **kwargs) <==> builder.list(*args, **kwargs)(x1) ** Documentation from `python.list`** list() -> new empty list
list(iterable) -> new list initialized from iterable's items
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ljust(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ljust(*args, **kwargs)
This method accepts the same arguments as any.ljust
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.ljust(x1, *args, **kwargs) <==> builder.ljust(*args, **kwargs)(x1)
Documentation from any.ljust
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def locals(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.locals(*args, **kwargs) This method accepts the same arguments as `python.locals`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.locals(x1, *args, **kwargs) <==> builder.locals(*args, **kwargs)(x1) ** Documentation from `python.locals`** locals() -> dictionary
Update and return a dictionary containing the current scope's local variables.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def long(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.long(*args, **kwargs) This method accepts the same arguments as `python.long`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.long(x1, *args, **kwargs) <==> builder.long(*args, **kwargs)(x1) ** Documentation from `python.long`** long(x=0) -> long
long(x, base=10) -> long
Convert a number or string to a long integer, or return 0L if no arguments are given. If x is floating point, the conversion truncates towards zero.
If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4L
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def lower(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.lower(*args, **kwargs)
This method accepts the same arguments as any.lower
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.lower(x1, *args, **kwargs) <==> builder.lower(*args, **kwargs)(x1)
Documentation from any.lower
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def lstrip(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.lstrip(*args, **kwargs)
This method accepts the same arguments as any.lstrip
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.lstrip(x1, *args, **kwargs) <==> builder.lstrip(*args, **kwargs)(x1)
Documentation from any.lstrip
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def map(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.map(*args, **kwargs) This method accepts the same arguments as `python.map`. However, the 2nd argument is omitted, a partial with the rest of the arguments is returned which expects the 2nd argument such that python.map(x1, x2, *args, **kwargs) <==> builder.map(x1, *args, **kwargs)(x2) ** Documentation from `python.map`** map(function, sequence[, sequence, ...]) -> list
Return a list of the results of applying the function to the items of the argument sequence(s). If more than one sequence is given, the function is called with an argument list consisting of the corresponding item of each sequence, substituting None for missing values when not all sequences have the same length. If the function is None, return a list of the items of the sequence (or a list of tuples if more than one sequence).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._2(fn, *args, **kwargs)
def max(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.max(*args, **kwargs) This method accepts the same arguments as `python.max`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.max(x1, *args, **kwargs) <==> builder.max(*args, **kwargs)(x1) ** Documentation from `python.max`** max(iterable[, key=func]) -> value
max(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its largest item. With two or more arguments, return the largest argument.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def memoryview(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.memoryview(*args, **kwargs) This method accepts the same arguments as `python.memoryview`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.memoryview(x1, *args, **kwargs) <==> builder.memoryview(*args, **kwargs)(x1) ** Documentation from `python.memoryview`** memoryview(object)
Create a new memoryview object which references the given object.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def min(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.min(*args, **kwargs) This method accepts the same arguments as `python.min`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.min(x1, *args, **kwargs) <==> builder.min(*args, **kwargs)(x1) ** Documentation from `python.min`** min(iterable[, key=func]) -> value
min(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its smallest item. With two or more arguments, return the smallest argument.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def next(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.next(*args, **kwargs) This method accepts the same arguments as `python.next`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.next(x1, *args, **kwargs) <==> builder.next(*args, **kwargs)(x1) ** Documentation from `python.next`** next(iterator[, default])
Return the next item from the iterator. If default is given and the iterator is exhausted, it is returned instead of raising StopIteration.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def object(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.object(*args, **kwargs)
This method accepts the same arguments as python.object
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
python.object(x1, *args, **kwargs) <==> builder.object(*args, **kwargs)(x1)
Documentation from python.object
The most base type
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def oct(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.oct(*args, **kwargs) This method accepts the same arguments as `python.oct`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.oct(x1, *args, **kwargs) <==> builder.oct(*args, **kwargs)(x1) ** Documentation from `python.oct`** oct(number) -> string
Return the octal representation of an integer or long integer.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def on(
self, ref)
def on(self, ref): if type(ref) is str: ref = dsl.Ref(ref) if ref.name not in self.refs: refs = dict(self.refs, **{ref.name: ref}) else: refs = self.refs return self._unit(utils.compose2(ref.set, self), refs)
def open(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.open(*args, **kwargs) This method accepts the same arguments as `python.open`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.open(x1, *args, **kwargs) <==> builder.open(*args, **kwargs)(x1) ** Documentation from `python.open`** open(name[, mode[, buffering]]) -> file object
Open a file using the file() type, returns a file object. This is the preferred way to open a file. See file.doc for further information.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def ord(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.ord(*args, **kwargs) This method accepts the same arguments as `python.ord`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.ord(x1, *args, **kwargs) <==> builder.ord(*args, **kwargs)(x1) ** Documentation from `python.ord`** ord(c) -> integer
Return the integer ordinal of a one-character string.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def partition(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.partition(*args, **kwargs)
This method accepts the same arguments as any.partition
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.partition(x1, *args, **kwargs) <==> builder.partition(*args, **kwargs)(x1)
Documentation from any.partition
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def pipe(
cls, x, *code, **kwargs)
pipe
takes in a builder
of type Builder
, BuilderTree
or Object
preferably and an object code
which must be part of the domain of the DSL, and compiles code
to a function of type Builder -> Builder
and applies it to the input builder
. All *args after builder
are taken as a tuple, therefore, it makes it easier to define an initial tuple ()
element to define a sequential operation.
Arguments
builder
: aBuilder
,BuilderTree
orObject
preferably.*code
: a sequence of elements of the DSL.
Return
An object with the result of the computation, probable types: Object | Builder | BuilderTree | list(Object) |
Examples
import tensorflow as tf from phi import tb x = placeholder(tf.float32, shape=[None, 10]) h = tb.pipe( x, [ { tf.device("/gpu:0"): tb.relu_layer(20) } , { tf.device("/gpu:1"): tb.sigmoid_layer(20) } , { tf.device("/cpu:0"): tb.tanh_layer(20) } ], tb.relu_layer(10) .object() )
@classmethod def pipe(cls, x, *code, **kwargs): """ `pipe` takes in a `builder` of type `Builder`, `BuilderTree` or `Object` preferably and an object `code` which must be part of the domain of the DSL, and compiles `code` to a function of type `Builder -> Builder` and applies it to the input `builder`. All \*args after `builder` are taken as a tuple, therefore, it makes it easier to define an initial tuple `()` element to define a sequential operation. **Arguments** * `builder`: a `Builder`, `BuilderTree` or `Object` preferably. * `*code`: a sequence of elements of the DSL. **Return** An object with the result of the computation, probable types: `Object | Builder | BuilderTree | list(Object) | ` **Examples** import tensorflow as tf from phi import tb x = placeholder(tf.float32, shape=[None, 10]) h = tb.pipe( x, [ { tf.device("/gpu:0"): tb.relu_layer(20) } , { tf.device("/gpu:1"): tb.sigmoid_layer(20) } , { tf.device("/cpu:0"): tb.tanh_layer(20) } ], tb.relu_layer(10) .object() ) """ builder = cls.compile(*code, **kwargs) return builder(x)
def pop(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.pop(*args, **kwargs)
This method accepts the same arguments as any.pop
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.pop(x1, *args, **kwargs) <==> builder.pop(*args, **kwargs)(x1)
Documentation from any.pop
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def popitem(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.popitem(*args, **kwargs)
This method accepts the same arguments as any.popitem
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.popitem(x1, *args, **kwargs) <==> builder.popitem(*args, **kwargs)(x1)
Documentation from any.popitem
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def pow(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.pow(*args, **kwargs) This method accepts the same arguments as `python.pow`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.pow(x1, *args, **kwargs) <==> builder.pow(*args, **kwargs)(x1) ** Documentation from `python.pow`** pow(x, y[, z]) -> number
With two arguments, equivalent to xy. With three arguments, equivalent to (xy) % z, but may be more efficient (e.g. for longs).
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def print(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.print(*args, **kwargs) This method accepts the same arguments as `python.print`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.print(x1, *args, **kwargs) <==> builder.print(*args, **kwargs)(x1) ** Documentation from `python.print`** print(value, ..., sep=' ', end='\n', file=sys.stdout)
Prints the values to a stream, or to sys.stdout by default. Optional keyword arguments: file: a file-like object (stream); defaults to the current sys.stdout. sep: string inserted between values, default a space. end: string appended after the last value, default a newline.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def property(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.property(*args, **kwargs) This method accepts the same arguments as `python.property`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.property(x1, *args, **kwargs) <==> builder.property(*args, **kwargs)(x1) ** Documentation from `python.property`** property(fget=None, fset=None, fdel=None, doc=None) -> property attribute
fget is a function to be used for getting an attribute value, and likewise fset is a function for setting, and fdel a function for del'ing, an attribute. Typical use is to define a managed attribute x:
class C(object): def getx(self): return self._x def setx(self, value): self._x = value def delx(self): del self._x x = property(getx, setx, delx, "I'm the 'x' property.")
Decorators make defining new properties or modifying existing ones easy:
class C(object): @property def x(self): "I am the 'x' property." return self._x @x.setter def x(self, value): self._x = value @x.deleter def x(self): del self._x
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def proxy(
self, name, *args, **kwargs)
def proxy(self, name, *args, **kwargs): if not hasattr(self, name): register_proxy_method(name) return self._unit(lambda x: getattr(x, name)(*args, **kwargs), self.refs)
def range(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.range(*args, **kwargs) This method accepts the same arguments as `python.range`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.range(x1, *args, **kwargs) <==> builder.range(*args, **kwargs)(x1) ** Documentation from `python.range`** range(stop) -> list of integers
range(start, stop[, step]) -> list of integers
Return a list containing an arithmetic progression of integers. range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0. When step is given, it specifies the increment (or decrement). For example, range(4) returns [0, 1, 2, 3]. The end point is omitted! These are exactly the valid indices for a list of 4 elements.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def raw_input(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.raw_input(*args, **kwargs) This method accepts the same arguments as `python.raw_input`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.raw_input(x1, *args, **kwargs) <==> builder.raw_input(*args, **kwargs)(x1) ** Documentation from `python.raw_input`** raw_input([prompt]) -> string
Read a string from standard input. The trailing newline is stripped. If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError. On Unix, GNU readline is used if enabled. The prompt string, if given, is printed without a trailing newline before reading.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def reduce(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.reduce(*args, **kwargs) This method accepts the same arguments as `python.reduce`. However, the 2nd argument is omitted, a partial with the rest of the arguments is returned which expects the 2nd argument such that python.reduce(x1, x2, *args, **kwargs) <==> builder.reduce(x1, *args, **kwargs)(x2) ** Documentation from `python.reduce`** reduce(function, sequence[, initial]) -> value
Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._2(fn, *args, **kwargs)
def ref(
self, name)
def ref(self, name): return dsl.Ref(name)
def register_1(
cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_1(cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): def register_decorator(fn): cls.register_function_1(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type) return fn return register_decorator
def register_2(
cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_2(cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): def register_decorator(fn): cls.register_function_2(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type) return fn return register_decorator
def register_3(
cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_3(cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): def register_decorator(fn): cls.register_function_3(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type) return fn return register_decorator
def register_4(
cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_4(cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): def register_decorator(fn): cls.register_function_4(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type) return fn return register_decorator
def register_5(
cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_5(cls, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): def register_decorator(fn): cls.register_function_5(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type) return fn return register_decorator
def register_as_method(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='')
This method enables you to register any function fn
that takes an Applicative as its first argument as a method of the Builder class.
Arguments
fn
: a function that atleast takes an Applicative as its first argument.library_path
: the route of the librar from which this function was taken, used for documentation purposes.alias
: allows you to specify the name of the method, it will take the name of the function if itsNone
.doc
: the documentation for the method, ifNone
a predefied documentation will be generated based on the documentation offn
.
Return
None
Examples
@classmethod def register_as_method(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation=""): """ This method enables you to register any function `fn` that takes an Applicative as its first argument as a method of the Builder class. **Arguments** * `fn`: a function that atleast takes an Applicative as its first argument. * `library_path`: the route of the librar from which this function was taken, used for documentation purposes. * `alias`: allows you to specify the name of the method, it will take the name of the function if its `None`. * `doc`: the documentation for the method, if `None` a predefied documentation will be generated based on the documentation of `fn`. **Return** `None` **Examples** """ if wrapped: fn = functools.wraps(wrapped)(fn) fn_signature = utils.get_method_sig(fn) fn_docs = inspect.getdoc(fn) name = alias if alias else fn.__name__ original_name = fn.__name__ if wrapped else original_name if original_name else name fn.__name__ = name fn.__doc__ = doc if doc else (""" THIS METHOD IS AUTOMATICALLY GENERATED builder.{1}(*args, **kwargs) This method accepts the same arguments as `{3}.{0}`. """ + explanation + """ ** Documentation from `{3}.{0}`** {2} """).format(original_name, name, fn_docs, library_path) if name in cls.__core__: raise Exception("Can't add method '{0}' because its on __core__".format(name)) setattr(cls, name, fn)
def register_function0(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
This method enables you to register any function fn
that takes an object as its first argument as a method of the Builder and Applicative class.
Arguments
fn
: a function that atleast takes an Object as its first argument.library_path
: the route of the librar from which this function was taken, used for documentation purposes.alias
: allows you to specify the name of the method, it will take the name of the function if itsNone
.doc
: the documentation for the method, ifNone
a predefied documentation will be generated based on the documentation offn
.
Return
None
Examples
@classmethod def register_function0(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ This method enables you to register any function `fn` that takes an object as its first argument as a method of the Builder and Applicative class. **Arguments** * `fn`: a function that atleast takes an Object as its first argument. * `library_path`: the route of the librar from which this function was taken, used for documentation purposes. * `alias`: allows you to specify the name of the method, it will take the name of the function if its `None`. * `doc`: the documentation for the method, if `None` a predefied documentation will be generated based on the documentation of `fn`. **Return** `None` **Examples** """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._0(fn, *args, **kwargs) explanation = """However, a partial with the arguments is returned which expects any argument `x` such that {3}.{0}(*args, **kwargs) <==> builder.{1}(*args, **kwargs)(x) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation)
def register_function_1(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
This method enables you to register any function fn
that takes an object as its first argument as a method of the Builder and Applicative class.
Arguments
fn
: a function that atleast takes an Object as its first argument.library_path
: the route of the librar from which this function was taken, used for documentation purposes.alias
: allows you to specify the name of the method, it will take the name of the function if itsNone
.doc
: the documentation for the method, ifNone
a predefied documentation will be generated based on the documentation offn
.
Return
None
Examples
@classmethod def register_function_1(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ This method enables you to register any function `fn` that takes an object as its first argument as a method of the Builder and Applicative class. **Arguments** * `fn`: a function that atleast takes an Object as its first argument. * `library_path`: the route of the librar from which this function was taken, used for documentation purposes. * `alias`: allows you to specify the name of the method, it will take the name of the function if its `None`. * `doc`: the documentation for the method, if `None` a predefied documentation will be generated based on the documentation of `fn`. **Return** `None` **Examples** """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs) explanation = """However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that {3}.{0}(x1, *args, **kwargs) <==> builder.{1}(*args, **kwargs)(x1) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation)
def register_function_2(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_function_2(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._2(fn, *args, **kwargs) explanation = """However, the 2nd argument is omitted, a partial with the rest of the arguments is returned which expects the 2nd argument such that {3}.{0}(x1, x2, *args, **kwargs) <==> builder.{1}(x1, *args, **kwargs)(x2) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation)
def register_function_3(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_function_3(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._3(fn, *args, **kwargs) explanation = """However, the 3rd argument is omitted, a partial with the rest of the arguments is returned which expects the 3rd argument such that {3}.{0}(x1, x2, x3, *args, **kwargs) <==> builder.{1}(x1, x2, *args, **kwargs)(x3) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation)
def register_function_4(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_function_4(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._4(fn, *args, **kwargs) explanation = """However, the 4th argument is omitted, a partial with the rest of the arguments is returned which expects the 4th argument such that {3}.{0}(x1, x2, x3, x4, *args, **kwargs) <==> builder.{1}(x1, x2, x3, *args, **kwargs)(x4) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation)
def register_function_5(
cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='', _return_type=None)
@classmethod def register_function_5(cls, fn, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation="", _return_type=None): """ """ @functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._5(fn, *args, **kwargs) explanation = """However, the 5th argument is omitted, a partial with the rest of the arguments is returned which expects the 5th argument such that {3}.{0}(x1, x2, x3, x4, x5, *args, **kwargs) <==> builder.{1}(x1, x2, x3, x4, *args, **kwargs)(x5) """ + explanation cls.register_as_method(method, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation, _return_type=_return_type)
def register_method(
self, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation='')
@classmethod def register_method(self, library_path, alias=None, original_name=None, doc=None, wrapped=None, explanation=""): def register_decorator(fn): self.register_as_method(fn, library_path, alias=alias, original_name=original_name, doc=doc, wrapped=wrapped, explanation=explanation) return fn return register_decorator
def reload(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.reload(*args, **kwargs) This method accepts the same arguments as `python.reload`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.reload(x1, *args, **kwargs) <==> builder.reload(*args, **kwargs)(x1) ** Documentation from `python.reload`** reload(module) -> module
Reload the module. The module must have been successfully imported before.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def remove(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.remove(*args, **kwargs)
This method accepts the same arguments as any.remove
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.remove(x1, *args, **kwargs) <==> builder.remove(*args, **kwargs)(x1)
Documentation from any.remove
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def replace(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.replace(*args, **kwargs)
This method accepts the same arguments as any.replace
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.replace(x1, *args, **kwargs) <==> builder.replace(*args, **kwargs)(x1)
Documentation from any.replace
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def repr(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.repr(*args, **kwargs) This method accepts the same arguments as `python.repr`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.repr(x1, *args, **kwargs) <==> builder.repr(*args, **kwargs)(x1) ** Documentation from `python.repr`** repr(object) -> string
Return the canonical string representation of the object. For most object types, eval(repr(object)) == object.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def reverse(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.reverse(*args, **kwargs)
This method accepts the same arguments as any.reverse
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.reverse(x1, *args, **kwargs) <==> builder.reverse(*args, **kwargs)(x1)
Documentation from any.reverse
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def reversed(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.reversed(*args, **kwargs) This method accepts the same arguments as `python.reversed`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.reversed(x1, *args, **kwargs) <==> builder.reversed(*args, **kwargs)(x1) ** Documentation from `python.reversed`** reversed(sequence) -> reverse iterator over values of the sequence
Return a reverse iterator
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rfind(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rfind(*args, **kwargs)
This method accepts the same arguments as any.rfind
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rfind(x1, *args, **kwargs) <==> builder.rfind(*args, **kwargs)(x1)
Documentation from any.rfind
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rindex(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rindex(*args, **kwargs)
This method accepts the same arguments as any.rindex
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rindex(x1, *args, **kwargs) <==> builder.rindex(*args, **kwargs)(x1)
Documentation from any.rindex
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rjust(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rjust(*args, **kwargs)
This method accepts the same arguments as any.rjust
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rjust(x1, *args, **kwargs) <==> builder.rjust(*args, **kwargs)(x1)
Documentation from any.rjust
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def round(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.round(*args, **kwargs) This method accepts the same arguments as `python.round`. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that python.round(x1, *args, **kwargs) <==> builder.round(*args, **kwargs)(x1) ** Documentation from `python.round`** round(number[, ndigits]) -> floating point number
Round a number to a given precision in decimal digits (default 0 digits). This always returns a floating point number. Precision may be negative.
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rpartition(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rpartition(*args, **kwargs)
This method accepts the same arguments as any.rpartition
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rpartition(x1, *args, **kwargs) <==> builder.rpartition(*args, **kwargs)(x1)
Documentation from any.rpartition
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rsplit(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rsplit(*args, **kwargs)
This method accepts the same arguments as any.rsplit
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rsplit(x1, *args, **kwargs) <==> builder.rsplit(*args, **kwargs)(x1)
Documentation from any.rsplit
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def rstrip(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED
builder.rstrip(*args, **kwargs)
This method accepts the same arguments as any.rstrip
. However, the 1st argument is omitted, a partial with the rest of the arguments is returned which expects the 1st argument such that
any.rstrip(x1, *args, **kwargs) <==> builder.rstrip(*args, **kwargs)(x1)
Documentation from any.rstrip
None
@functools.wraps(fn) def method(self, *args, **kwargs): kwargs['_return_type'] = _return_type return self._1(fn, *args, **kwargs)
def run(
self)
def run(self): return self(None)
def set(
self, *args, **kwargs)
THIS METHOD IS AUTOMATICALLY GENERATED