Skip to content

Generate __init__ methods in your Python code succinctly

License

Notifications You must be signed in to change notification settings

ebrush/easy_init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

With easy_init,

from easy_init import init

@init('r', 'g', 'b', a=1.0)
class Color:
    pass

is 100% equivalent to

class Color:
    def __init__(self, r, g, b, a=1.0):
        self.r = r
        self.g = g
        self.b = b
        self.a = a

Installation

pip install easy_init

About

Generate __init__ methods in your Python code succinctly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages