SilentGhost <ghost....@runbox.com> added the comment:

SyntaxError is produced when there is a syntax problem in the code to be 
executed, this code is fine from the syntax perspective, so this particular 
error would not be raised.

It is also perfectly fine to have a function call where you have it, the only 
thing one would need to observe is that the returned value is a callable (or 
None which would be return value in your case had your function terminated). 
Perhaps there is an improvement to be made in documentation by way of giving an 
example, but the solution you're suggesting is not feasible.

----------
assignee:  -> docs@python
components: +Documentation -Windows
nosy: +SilentGhost, docs@python, pitrou -mark.dickinson
resolution: not a bug -> 
stage: resolved -> 
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39581>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to