New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

>>> import ast
>>> sample = 'def f(a=1, /): pass'
>>> compile(sample, '?', 'exec')
<code object <module> at 0x7f7cacdfd5c0, file "?", line 1>
>>> compile(ast.parse(sample, '?'), '?', 'exec')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: more positional defaults than args on arguments

----------
components: Interpreter Core
messages: 344064
nosy: benjamin.peterson, brett.cannon, pablogsal, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Error in compilig the AST for functions with optional positional 
arguments
type: behavior
versions: Python 3.8

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

Reply via email to