Skip to main content

UNKNOWN

Project description

## Also
Ever had lots of methods that do the same thing?!
You want to set them to the same thing but dont want to do something lame like
```python
def method(self):
pass

othermethod = method
```

Rather you want to do it with style like

```python
@also('othermethod')
def method(self):
pass
```

Then do I have a solution for you!

## Installation
```
pip install also
```

## Usage
```python
from also import also, AlsoMetaClass

class Foo:
__metaclass__ = AlsoMetaClass

@also('getThing')
@also('get_thing')
def getthing(self):
return 'go bears'

foo = Foo()
assert (foo.getthing() == foo.get_thing() ==
foo.getThing() == 'go bears')
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

also-0.0.2.tar.gz (1.3 kB view details)

Uploaded Source

File details

Details for the file also-0.0.2.tar.gz.

File metadata

  • Download URL: also-0.0.2.tar.gz
  • Upload date:
  • Size: 1.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for also-0.0.2.tar.gz
Algorithm Hash digest
SHA256 55893fd0bd491e1f2e8158818995906830ec25bc1bbd6a4503d925dfb03c0d4a
MD5 b2363e8dfe7d69bb9fd554869330fcf2
BLAKE2b-256 0ca623afaa70a830ef92e35b19dd21cc1098b0cdd8157ea7f3d7c926df260393

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page