3 ms·
The underscore naming convention is far from ubiquitous in either the Python or Julia communities. The more practical indicator of a function being "public" is
by snicker7 4y ago
The underscore naming convention is far from ubiquitous in either the Python or Julia communities.
The more practical indicator of a function being "public" is whether or not it appears in the published API documentation. Unlike Julia, Python projects are more likely to have complete documentation (or even documentation at all). So there is a better understanding of what "public" means in Python. Without docs, it's a guessing game.
- 411111111111111 4y agoThere are effectively private functions in python though. Double underscores before the name makes it impossible to call them from the outside. It's more like typescripts private however, so it's still technically possible to call these functions in a specific way, it just won't happen on accident.
- socialdemocrat 4y agoI agree documentation is a problem with Julia, but I dislike the lack of nuance when people discuss this. There is no doubt in my mind that the core Julia libraries are far better documented than the Python equivalents. Just do something simple like looking up help on `print` in the REPL on Python and Julia. The Python documentation is very primitive compared to what you get in Julia. Julia has a better standard documentation system than Python and have in the standard library started a better convention for how to document things which means that as this spreads out to other third party libraries, Julia has the potential to be better documented than Python. What you see today is immaturity rather than signs of an inherently bad system.