-5

Which name is given a function that is separated by undescore. function_name.

And to a function like FunctionName? and what would be the right one for python and ANSI C.??

  • 1
    It gets named `function_name`, simple as that. Which style to use is optional, use one and stick to it. There was some very interesting scientific report somewhere though (citation needed), which found out that programs written in camel case were less readable by the human brain. – Lundin Apr 17 '18 at 14:41
  • https://www.gnu.org/prep/standards/html_node/Names.html#Names – Ronan Boiteau Apr 17 '18 at 14:44
  • https://www.python.org/dev/peps/pep-0008/#function-and-variable-names – Ronan Boiteau Apr 17 '18 at 14:44
  • @Lundin: That proves I have a human brain. All those years of doubting are over! – Bathsheba Apr 17 '18 at 15:08
  • Found it! "An Eye Tracking Study on camelCase and under_score Identifier Styles" www.cs.kent.edu/~jmaletic/papers/ICPC2010-CamelCaseUnderScoreClouds.pdf. Quite a serious study! – Lundin Apr 17 '18 at 15:33

2 Answers2

3

Function names like func_one are written in snake case, while functions written like FunctionOne are written in Pascal case, which is a subset of Camel case where the first letter is also uppercase.

Thanks to @abelenky for pointing out the initial error.

Colin Ricardo
  • 16,488
  • 11
  • 47
  • 80
1

function_name is called a Snake Case. It is the recommended casing for Python. See this answer for more enlightenment.

Jerry U
  • 618
  • 9
  • 22