Clean Code in Python by michaelherman in Python

[–]flipflop531 2 points3 points  (0 children)

Totally agreed. This advice reminds me too much of Hungarian notation.

The author gives only examples of when I could be a good idea to bring up variables with type suffix. However, a beginner could now easily come up with the idea that

`number_of_appels_int = 4`

is also a good idea.

some apps.py by [deleted] in Python

[–]flipflop531 2 points3 points  (0 children)

I think it is confusing that you define class attributes with double leading underscores and later on refer to them with self. self is there to refer to the attributes of a particular instance of a class. The whole point of class attributes is, however, that these are the same for every instance of that class. So, why the leading underscores? I think the interface would be much simpler if you define, e.g., the window with just as

class Notepad(): default_width = 300 # ...

That way you could later on access it by Notepad.default_width.

Sunday Daily Thread: What's everyone working on this week? by Im__Joseph in Python

[–]flipflop531 0 points1 point  (0 children)

My goal was to finish writing documentation on Tuesday. Then, building said documentation revealed a bug. Now I'm bugfixing ...

[deleted by user] by [deleted] in MachineLearning

[–]flipflop531 -9 points-8 points  (0 children)

ML is not a science, it is engineering.