A pretty silly trivial question. The canonical example is f = open('filename')
, but
f
is not very descriptive. After not looking at code in a while,
you can forget whether it means
"file" or "function f(x)" or "fourier
transform results" or something else. EIBTI.file
is already taken by a function.What else do you use?
File descriptors are a low-level facility for working with files directly provided by the OS kernel. A file descriptor is an integer that identifies the open file in a table of open files kept by the kernel for each process.
The variable name must describe the information represented by the variable. A variable name should tell you concisely in words what the variable stands for. Your code will be read more times than it is written. Prioritize how easy your code is to read over than how quick it is to write.
data_file
settings_file
results_file
.... etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With