[New-bugs-announce] [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions

Jason Plurad report at bugs.python.org
Wed Sep 18 13:37:13 EDT 2019


New submission from Jason Plurad <pluradj at gmail.com>:

The second code example in Tutorial section 8.6 defines the function:

def bool_return(): -> bool:

which throws a SyntaxError: invalid syntax

If the function wants to use a return annotation, there should not be a colon after the function name. I have a pull request ready for this.

----------
assignee: docs at python
components: Documentation
messages: 352746
nosy: Jason Plurad, docs at python
priority: normal
severity: normal
status: open
title: SyntaxError in Tutorial 8.6 Defining Clean-up Actions

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38218>
_______________________________________


More information about the New-bugs-announce mailing list