All Projects → Bogdanp → threadop

Bogdanp / threadop

Licence: BSD-3-Clause license
Adds a threading operator to Python.

Programming Languages

python
139335 projects - #7 most used programming language

threadop

Adds a threading operator to Python. This is stupid and you probably shouldn't use it.

Limitations:

  • The right-hand side must be a function call.
  • Requires access to functions' source code. Meaning this won't work in the interpreter.

Installation

pip install threadop

Usage

import operator

from threadop import enable_threadop


@enable_threadop
def example():
    # The below is equivalent to
    # print(operator.mul(operator.add(42, 15), 2))
    42 | operator.add(15) | operator.mul(2) | print()

example()

License

threadop is licensed under the 3-Clause BSD license. Please see LICENSE for licensing details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].