Operator
Definitions of Func-wrapped operators from the standard operator library.
All docstrings are included.
Operator variants with leading and trailing ‘__’ are not provided.
It also defines Func-wrapped versions of the type constructors bool, int, and str,
named bool_, int_, and str_.
Keep in mind that calling these Func-wrapped constructors without argument
is now equivalent to calling them with FuPy.basics.unit as argument.
Note that __all__ is created dynamically from operator.__all__. So, code completion may not work as expected, because tools cannot statically see from the source code which names are exported.
Copyright (c) 2024 - Eindhoven University of Technology, The Netherlands
This software is made available under the terms of the MIT License.
- FuPy.operator_.bool_(x)
Func-wrapped version of bool(). N.B. bool_() is interpreted as bool_(unit), which returns False.
- FuPy.operator_.int_(x)
Func-wrapped version of int(). N.B. int_() is interpreted as int_(unit), which raises a TypeError.
- FuPy.operator_.str_(x)
Func-wrapped version of str().N.B. str_() is interpreted as str_(unit), which returns ‘_’.