As I said, the C++ style is what originally existed, but in Python we always prefer to be PEP8 compliant. Draft, BIM, Arch, FEM, Path are the biggest workbenches in Python and they all use this PEP8 style, albeit a bit inconsistently. We are trying to change it little by little.iplayfast wrote: ↑Fri Jan 10, 2020 9:02 pmSo it appears to me that it the CamalCase style is the norm, and by using the snake_case the style is being changed from the norm.
Is there a general push to rename all the functions and classes in FreeCad to use snake_case, or is this something particular to the libraries you are involved in, (Draft,Arch,Fem)?
I'm ok either way, it just seems like something I should question.
We cannot change most of the C++ functions that you show in your example (at least not right now) because that would break the entire software and would be a monumental task. So, it won't be done any time soon. But I have thought about discussing this with WMayer who's the lead C++ programmer to eventually in the future transition to a more Python-like syntax. This would also tie into Qt 6, which is in development. The Qt people are thinking of providing a more Pythonic syntax.
So, yes, the core of FreeCAD uses a CamelCase syntax for historical reason (this style is sort of common in C++). But everything that is programmed in Python, or accessed from the Python console, should preferably be consistent with PEP8 and Pythonic guidelines.