3 ms·
> We have well established conventions like prefixing private modules and symbols with an underscore, or declaring your public interfaces in the __init__.py fil
by echelon 2y ago
> We have well established conventions like prefixing private modules and symbols with an underscore, or declaring your public interfaces in the __init__.py file,
The language doesn't enforce them, so they may as well not exist. See: python dependency management.
> This is more commentary on the Python developer than this tool.
100%. Python has become an unstructured Wild West, perhaps even worse than modern JavaScript. The "Zen of Python" is a bold faced lie.
Python has incredible use cases. It blends together different disciplines effectively. But perhaps we should ask ourselves whether or not it's a language suitable for writing large monoliths in.
- VerminOctopus1 2y agoThe conventions are widely used and Python is used successfully in numerous “large monoliths”. Saying that the conventions may as well not exist if they’re not enforced is demonstrably nonsense.
- globular-toast 2y agoIt depends on your team. If the whole team "gets it" then things will be fine. But if you've got a team with juniors or people happy to do whatever crap they or ChatGPT can come up with to make things work then it doesn't.
- goosejuice 2y agoThat says more about your process as a swe org than the technology you're using.
- globular-toast 2y agoThat you'd use a tool or a language to help you?
- lijok 2y ago> The language doesn't enforce them, so they may as well not exist. See: python dependency management. I see your point. You can enforce them with mypy by declaring your exports in your __init__.py file, using the `as` aliasing method or using `__all__`: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport https://mypy.readthedocs.io/en/stable/command_line.html#cmdo....