masfaraud / BMSpy

Python Block-Model Simulator. An alternative to simulink in python.
GNU Lesser General Public License v3.0
222 stars 36 forks source link

pep8? #22

Open pjadzinsky opened 5 years ago

pjadzinsky commented 5 years ago

Any way you guys will consider pep8ing the code? The whole codebase would benefit from use of pep8 linter. Just to mention a few:

masfaraud commented 5 years ago

Hi, I agree for the abbreviations. For the camel case, it is my own convention to distinguish methods from variable. I find this very usefull in scientific computing to know if an attribute is data or a computation. I know it's not PEP8 compliant...

pjadzinsky commented 5 years ago

Hi thanks for the reply I don't want to be too pushy but a lot of thinking went into defining pep8 and it is for a reason. By having methods be camel case you are creating a confusion between methods and classes. At the same time there shouldn't be a confusion between attributes and methods because methods have parenthesis while attributes don't.

according to your style, my_moudle.This() is this a class or a method?

according to pep8 my_module.This() is always a class my_object.this is is always an attribute of my_object my_object.this() is always a method

I don't see how you can confuse them

masfaraud commented 5 years ago

Ok let's make the next version pep8 compliant.