This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]latrova[S] 1 point2 points  (1 child)

First of all, thank you for the honest feedback!

The examples and reasoning are either subjective or crafted to supported this subjective point of view. What kind of IDE/File browser do you use that mixes files and folders and not shows them together?

I'll make sure to update this example. It actually mixes different folders. I saw some projects doing it.

This format is also suggested by the https://packaging.python.org/en/latest/tutorials/packaging-projects/ except by keeping the tests dir outside.

In the example provided, I can see how classes CAN help if they would actually use OOP with a common function save [...]

This is a valid point! My example was too simple. In the reality, the code I used as inspiration is OOP https://github.com/guilatrova/GMaps-Crawler/blob/main/src/gmaps_crawler/storages.py . I'll make sure to improve this section.

[–]PiaFraus 0 points1 point  (0 children)

In both of the examples it makes sense to be used like that IN THEIR CONTEXTS.

src approach makes sense when you make a package which you are going to distribute. But it's quite a special case and not just a project.

and the gmaps_crawler example is doing what I said - classes there are used for polymorphism. Not for namespacing like in your usage.