Skip to main content

python dark magic

Project description

selfish
======
Making 'self' implicit, because even Java did a better job at this.


### Install
```pip install selfish```


### Usage
```
@selfish
class Foo():
def __init__(val): self.val = val

def val(): return self.val

@classmethod
def klass(): return self


Foo(1).val()
> 1

Foo.klass()
> Foo
```

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

selfish-0.2.0.tar.gz (3.1 kB view hashes)

Uploaded Source

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