fuzzyattr matches the closest attribute name in python so you can make unlimited free typos.
Project description
# fuzzyattr
fuzzyattr matches the closest attribute name in python so you can make unlimited free typos.
## usage
Decorate any class.
```python
from fuzzyattr import fuzzyattr
@fuzzyattr
class Human:
def __init__(self, name):
self.name = name
def eat(self, food):
return f'{self.name} ate {food}'
```
Now you can make typos.
```python
someone = Human('Someone')
someone.ate('poop')
```
`ate` doesn't exist. fuzzyattr matches `eat`. It logs a warning when this happens.
## install
```bash
pip install fuzzyattr
```
fuzzyattr matches the closest attribute name in python so you can make unlimited free typos.
## usage
Decorate any class.
```python
from fuzzyattr import fuzzyattr
@fuzzyattr
class Human:
def __init__(self, name):
self.name = name
def eat(self, food):
return f'{self.name} ate {food}'
```
Now you can make typos.
```python
someone = Human('Someone')
someone.ate('poop')
```
`ate` doesn't exist. fuzzyattr matches `eat`. It logs a warning when this happens.
## install
```bash
pip install fuzzyattr
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fuzzyattr-0.1.0.tar.gz
(3.8 kB
view hashes)