Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jdonaldson/pure_python

Detecting only the purest of python functions.
https://github.com/jdonaldson/pure_python

Last synced: about 1 month ago
JSON representation

Detecting only the purest of python functions.

Awesome Lists containing this project

README

        

# pure python

```
import pure

# Example usage
class Example:
def pure_method(self, a, b):
return a + b

def impure_method(self, item):
self.some_list.append(item)

# Test the purity checker
print(pure.is_method_pure(Example.pure_method))
print(pure.is_method_pure(Example.impure_method))

```