Skip to content
This repository has been archived by the owner on Oct 8, 2018. It is now read-only.

Bogdanp/threadop

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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.

About

Adds a threading operator to Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages