Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Tejas Shetty
    hello guy,
    I would discuss with you about a cool function decorator I'm building.
    I juste noticed your awesome library and I think it could be a good contribution
    my function is about maling a true direct inheritance

    class B():
    def init(self, b:str):
    self.b = b

    class Foo(B,metaclass=Meta):
    def init(self,yolo, name ='empty', surname = None):
    self.name = name
    self.surname= surname

    inheriteArgs(Foo) make args from inerited class set too the sub class init in this example
    so Foo class init is like :
    def init (self, yolo, b, name='empty', surname= None):
    super(Foo, self).init(b)
    self.name = name
    self.surname= surname
    for create a new instance I have to do:
    inst = Foo('yo', 100, name ='mike', surname='bigmike')

    inst .b




    let me know if you think it could be an interesting contribution
    Alex Hall
    Hi @MChrys , that sounds interesting but I don't think it's the kind of magic that the sorcery library is about, unless I'm missing something?
    You might be interested in this library: https://github.com/mkorpela/overrides