Giter Site home page Giter Site logo

Comments (5)

alexreg avatar alexreg commented on June 12, 2024

@janluke Just curious, is there anything in particular you are worried about with moving super().__init__ to the beginning? Or just being cautious?

from cloup.

alexreg avatar alexreg commented on June 12, 2024

A more conservative fix would be to leave it where it is and add at the beginning of __init__ the following.

self.chain = kwargs.get("chain", None)
del kwargs["chain"]

It seems like a bit of a kludge though. Overall, I noticed that re Cloup types, sometimes you are calling super().__init__ at the start, sometimes at the end, and at least once somewhere in the middle.

from cloup.

janluke avatar janluke commented on June 12, 2024

@janluke Just curious, is there anything in particular you are worried about with moving super().init to the beginning? Or just being cautious?

Just being cautious. I don't remember why I put the super() call at the end. Moving the call at the beginning is probably something safe to do. Still, "formally" it deserves to be its own PR because if someone who used SectionMixin directly may have relied on this. Pragmatically, very few people (if any) use these mixins directly, so it's just a formality.

from cloup.

alexreg avatar alexreg commented on June 12, 2024

@janluke Makes sense. Want me to create a PR?

from cloup.

janluke avatar janluke commented on June 12, 2024

It'd be great! Thanks :)

from cloup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.