Metadata-Version: 2.1
Name: hybridmethods
Version: 0.1.2
Summary: Library to create hybrids of class methods and instance methods
License: 0BSD
Keywords: hybridmethod,method,methods,utility
Author: Dense Reptile
Author-email: 80247368+DenseReptile@users.noreply.github.com
Requires-Python: >=3.7
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown

# hybridmethods

A library for the creation of hybrid methods. Methods that can be called as either class methods or instance methods.

## Usage

```py
from hybridmethods import cl, hybridmethod, instance


class Test1:
    @hybridmethod
    def method(this):
        if instance(this):  # Run when called as instance method
            pass
        else:  # Run when called as class method
            pass
    

class Test2:
    @classmethod
    def method(cls):
        pass

    @classmethod.instance
    def _(self):
        pass
```

