I have noticed that considerably amount of questions in SO, relating to Python, are about people messing up Sys -class, OS class and no class. For example, an easy confusing is the case: os.open("something")
, open("something")
and sys.open("something")
. I haven't understood yet the reasons behind the naming of classes, perhaps it is just an evolution.
- I would like to hear
why
they were created with their current names? - Are naming due to things like having FDs in a class?
- Is naming because some classes require special privileges?
- To which extent is the naming a design solution?
If you cannot answer the question, feel free to suggest some good mnemonics to memorize the classes and to differentiate them.
open
function. It's a function. Not a member of a class. It's called a built-in function in the Python documentation. Here's the list: docs.python.org/library/functions.html#built-in-functions Please revise your question to use the proper name, otherwise it will be hopelessly confusing. – Auroora