8000 GitHub - RodrigoSdeCarvalho/ExtendClass: A Python library that allows class extensions. No inheritance is needed to add methods to a class anymore.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A Python library that allows class extensions. No inheritance is needed to add methods to a class anymore.

License

Notifications You must be signed in to change notification settings

RodrigoSdeCarvalho/ExtendClass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExtendClass

A Python library that allows class extensions. No inheritance is needed to add methods to a class anymore.

Installation

pip install ExtendClass

Import

from ExtendClass import Extend or from ExtendClass.Extension import Extend

Use

mod_cls = Extend(cls, method)

mod_obj = Extend(cls, method)(*args, **kwargs)

with Extend(cls, method): You can use the extended class here inside the with block

When you leave the with block, the method is removed. In case of overwritten methods, its returned to its original state.

About

A Python library that allows class extensions. No inheritance is needed to add methods to a class anymore.

Resources

500F

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0