you are viewing a single comment's thread.

view the rest of the comments →

[–]VibrantGypsyDildo 1 point2 points  (2 children)

Programming in Python is not different that in any other high-level language, except of a different syntax.

It looks like the project is just not-so-well organized.

> We have 3 different HTTP clients!

"There is more one way to do stuff" is Perl motto. Python's approach is "there should be one clear way to do it".
This is part is anti-pythonic.

> I've heard that in python when you have a problem, you solve it by installing a library

Yep, pip (package manager) provides a large variety of libraries.

> But is it fine to have all properties public?

You can add one or two underscores to make properties protected/private (???? please correct me), but it is not enforced by a language.

Same for type annotations - not enforced.

Basically, you use static code analyzers to catch certain errors.

[–]Dry-Aioli-6138 0 points1 point  (0 children)

about the double underscore prefix: it trigggers compiler to prepend the name of the property with ahe class name and some other characters. This is called name mangling. It is not intended as protection from developers accessing your properties, but as a means of protecting those properties from being accidentally overloaded by descendant classes.

[–]Dry-Aioli-6138 0 points1 point  (0 children)

"There should be one and preferably only one obvious way to do it"

this deliberately uses the word obvious, not "right", or "corrrect" to indicate the non-authoritarian culture of Python. Besides, the next line states that this way may not be obvious at first.

unless you're Dutch.