|
|
|
|
|
by kazinator
1626 days ago
|
|
That's one way. If these things are classes in a plain old single-dispatch oop system, you can havec a json-parser and csv-parser which have parse methods. There could be packages/namespaces. So csv:parse and json:parse. These packages are standard and so they just exist; nothing to import. In Python, you cannot use anything without an import! The top-level modules (which serve as de facto namespaces) themselves are not visible. Say there is a csv module with a parse. You cannot just do: csv.parse(...)
you have to first say import csv
This jaw-droppingly moronic. |
|
I will not Go lang has the same feature carried forward from C. It helps a lot in the reading code side of the code lifecycle. And Go compiler makes you keep the imports up to date, which is good.