This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: An error should be returned when there are spaces in between function name and parameters
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: CuriousLearner, r.david.murray
Priority: normal Keywords:

Created on 2018-08-08 18:16 by CuriousLearner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg323294 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2018-08-08 18:16
I noticed this while reviewing the code.

The print function works like:

```
print       (5)
```

This works with user-defined function too.

Ideally, this is a function call and we should return an error stating that there shouldn't be any spaces between the function name and the parameters listed.

This essentially is not good for people who're new to programming and learning to code with Python as their first language.
msg323296 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2018-08-08 18:22
Sorry, but ignoring that whitespace is part of the python language definition.  At this point in time, whatever the merits of the "beginner" argument, it is not going to change, for backward compatibility reasons if nothing else.
msg324143 - (view) Author: Sanyam Khurana (CuriousLearner) * (Python triager) Date: 2018-08-27 03:45
Hi,

I agree that it can break backward compatibility. But maybe we can add some sort of warning message?

The entire motive of this is to get new folks to understand how a function is ideally defined and called.
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78542
2018-08-27 03:45:50CuriousLearnersetmessages: + msg324143
2018-08-08 18:22:17r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg323296

resolution: rejected
stage: needs patch -> resolved
2018-08-08 18:16:09CuriousLearnercreate