go-python / go-python/gpython

def a(x=3, b, c) should not be accepted

Open
#89 4 comments 0 reactions 1 assignee Claimed by @corona10 View on GitHub
bug Contributhon2019
Dominant language
Go
Stars
1k
Forks
105
PR merge metrics
No merged PRs in 30d

Description

But accepted in gpython
it should be raised Syntax error.

## cpython
``` python
>>> def a(x=3, b, c):
... pass
...
File "", line 1
SyntaxError: non-default argument follows default argument
````

## gpython
```python
>>> def a(x=3, b, c):
... pass
...
>>> a()
Traceback (most recent call last):
File "", line 1, in
FIXME line of source goes here
TypeError: "a() missing 2 required positional arguments: 'x' and 'b'"
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.