Skip to content

davidmckayv/maybe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

maybe

Python decorator that executes the function, maybe.

The idea is that some functions should randomly execute. This is implemented as a standard python decorator but using random.randint as a coin flip to decide whether or not the decorated function executes.

Example

@maybe
def say_hello():
    print("Hello!")


say_hello()

About

Python decorator that executes the function, maybe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages