Skip to content

About

Change instance references in Python functions/methods

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Description

This Python package allows you to copy a function or method and redirect specific references from one instance to another.

Example

from reference_changer import changeReference
def main():
    a = 0
    b = 1
    def f():
        print(a)
    f2 = changeReference(f, a, b)
    f()
    f2()
main()

Output:

0
1

Installation

pip install git+https://github.com/d4vidyo/reference_changer.git@latest

About

Change instance references in Python functions/methods

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages