Giter VIP home page Giter VIP logo

Comments (5)

seanmcleod avatar seanmcleod commented on June 4, 2024

I'm happy with the proposed change, it will make it a bit easier/quicker for users who lookup stuff in the C++ source when writing python code.

from jsbsim.

WillemEerland avatar WillemEerland commented on June 4, 2024

Who can say no to consistency?

from jsbsim.

mikepsn avatar mikepsn commented on June 4, 2024

While consistency can be a good thing, the convention in the Python community is to use underscores for methods and functions and camel case for classes.

The Python community conventions are to follow the PEP 8 -- Style Guide for Python Code.

I've first used the C++ version of JSBSim back in 2003, and I'm now planning on revisiting it but using it from a Python project. Most modern Python projects run their code through automatic linters or style guide checkers like pep8 to check the code is following the community conventions.

TL:DR; keep the underscores please.

from jsbsim.

bcoconni avatar bcoconni commented on June 4, 2024

@mikepsn

the convention in the Python community is to use underscores for methods and functions and camel case for classes.

Sure, but PEP 8 specifically allows mixedCase "in contexts where that's already the prevailing style, to retain backwards compatibility" so I can assert that due to the fact that JSBSim Python module is merely a wrapper to the C++ code, then it is falling in this category.

from jsbsim.

bcoconni avatar bcoconni commented on June 4, 2024

So I never proceeded with this changed and I guess anyway that the Python interface has been released for too long a time now to consider a renaming of the methods as a serious option.

🎉 I hereby officially drop that project and let JSBSim be (somewhat) conformant to PEP 8 🎉

from jsbsim.

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.