Issue #189 open

pep 3107 function annotations not supported

chrysn
created an issue

function annotations (as specified in pep 3107) seem not to be supported in brython. using a simple example like

def square(x: int) -> int:
    return x**2

in the brython editor gives:

Traceback (most recent call last):
  module __main__ line 1
    def square(x: int) -> int:
                ^
SyntaxError: invalid syntax

as bryton aims to implement python3, and function annotations have been included in python 3.0, i'm filing this as a bug.

for reference, see the python documentation on the subject or the pep itself.

Comments (2)

  1. Log in to comment