Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

added 1 character in body
Source Link
Mehrdad Pedramfar
  • 11.1k
  • 4
  • 43
  • 61

According to PEP8 you should use _ between each meaningful words for variable names, Similarly we use capital case for class names. by searching about the word filepath I should say that there is not such a word in English, it means that it is not a single word, it contains two separate word(file, path), so it is correct to use file_path instead of 'filepath', although both of them is being used by developers these days.
About the part that contains output word, According two Zen Of Python we already knew that:

Readability counts.

and

Explicit is better than implicit.

I should say that is pretty much better to use output before your variable name.
So I think output_file_path and 'output_file'output_file are the correct and best choices here.

According to PEP8 you should use _ between each meaningful words for variable names, Similarly we use capital case for class names. by searching about the word filepath I should say that there is not such a word in English, it means that it is not a single word, it contains two separate word(file, path), so it is correct to use file_path instead of 'filepath', although both of them is being used by developers these days.
About the part that contains output word, According two Zen Of Python we already knew that:

Readability counts.

and

Explicit is better than implicit.

I should say that is pretty much better to use output before your variable name.
So I think output_file_path and 'output_file' are the correct and best choices here.

According to PEP8 you should use _ between each meaningful words for variable names, Similarly we use capital case for class names. by searching about the word filepath I should say that there is not such a word in English, it means that it is not a single word, it contains two separate word(file, path), so it is correct to use file_path instead of 'filepath', although both of them is being used by developers these days.
About the part that contains output word, According two Zen Of Python we already knew that:

Readability counts.

and

Explicit is better than implicit.

I should say that is pretty much better to use output before your variable name.
So I think output_file_path and output_file are the correct and best choices here.

Source Link
Mehrdad Pedramfar
  • 11.1k
  • 4
  • 43
  • 61

According to PEP8 you should use _ between each meaningful words for variable names, Similarly we use capital case for class names. by searching about the word filepath I should say that there is not such a word in English, it means that it is not a single word, it contains two separate word(file, path), so it is correct to use file_path instead of 'filepath', although both of them is being used by developers these days.
About the part that contains output word, According two Zen Of Python we already knew that:

Readability counts.

and

Explicit is better than implicit.

I should say that is pretty much better to use output before your variable name.
So I think output_file_path and 'output_file' are the correct and best choices here.

lang-py

AltStyle によって変換されたページ (->オリジナル) /