ParenthesesOnlyIfArgument
Observed in Published Research

ParenthesesOnlyIfArgument
Incorrect

() are optional for function calls without arguments

Correct

() are mandatory even for function calls without arguments

Correction
Here is what's right.

Parentheses are required in Python to execute a function call. When calling any function, even a function without arguments, parentheses are required. If no parentheses are added, then the expression evaluates to a function, rather than to the result of calling the function.

def f():
  return 42

print(f)    # the function f
print(f())  # the result of calling function f

Origin
Where could this misconception come from?

Students may have prior knowledge of languages where parentheses are indeed optional for argument-less function calls.

Symptoms
How do you know your students might have this misconception?

A student may write code as follows, assuming that f will be invoked

def f():
  return 42

print(f)

Value
How can you build on this misconception?

At first this misconception may look purely superficial. However, it can be surprisingly deep. In languages where functions are values, it is essential to understand the difference between accessing the function as a value (f), and invoking a function (f()).

In Python we may use parentheses next to any name that refers to a function to invoke that function:

def f():
  return 42

g = f
print(g())  # displays 42

Language

Python

Concepts

Expressible In

Related Misconceptions

Other Languages

Literature References

The following papers directly or indirectly provide qualitative or quantitative evidence related to this misconception.

altadmri37MillionCompilations2015

Repository mining study (BlueJ Blackbox)

250000+ students across the world

Java
Artifact

Mistakes studied:
J: Forgetting parentheses after a method call
10232 / 250000
Users making mistake
brownNoviceJavaProgrammingMistakes2017

Quantitative systematic research analyzing 100+ M compilation events and surveying educators perceptions about 18 selected mistakes

900+ students and 76 educators

Java

Errors studied:
(J)parCalSyn: Forgetting parentheses after a method call
43165 / 100000000
Compilation events containing this error
bevilacquaAssessingUnderstandingExpressions2024

Qualitative and quantitative systematic research

542 hand-drawn expression trees from 12 exams in 6 university courses

Java
Artifact

Diagram mistakes studied:
ParameterlessWithoutParentheses: A method / constructor with no arguments is represented in the tree with its proper name but without parentheses.
12 / 266
Cases
chiodiniSurveyingUpperSecondaryTeachers2025

Quantitative systematic research

97 Swiss high school teachers and their students

Python
Artifact

Programming Language Misconceptions studied:
POIA: ParenthesesOnlyIfArgument
15 / 97
Teachers hold misconception
81 / 97
Teachers familiar with misconception
Important: 68
Somewhat Important: 17
Not So Important: 8
Not Important: 2
I'm not sure: 2
Importance (reported by teachers)
Frequently: 33
Multiple Times: 30
At Least Once: 18
Never: 14
I don't know: 2
Prevalence in students (reported by teachers)
hristovaIdentifyingCorrectingJava2003

Qualitative (survey of instructors and students)

Unknown number of undergraduate students, professors, SIGCSE members

Java

Errors studied:
Syntax10: Forgetting parentheses after a method call
mccallANewLookatNoviceProgrammingErrors

Quantitative systematic research analyzing 1000+ randomly-selected compilation events

199 user sessions (each sessions associated with a different user)

Java
Artifact

Errors studied:
Tab8.18: Missing parentheses for method call
21 / 1000
Compilation events containing this error
rodrigoAnAnalysisOfJavaProgramming2013

Qualitative and quantitative study analyzing about 190'000 compilation logs

180 undergraduates

Java

Errors studied:
Pag20: [Students] forget to use a '( )' after the name of a method with no parameters