mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
fix a default argument issue
This commit is contained in:
@@ -38,3 +38,20 @@ two_params(1, y=2)
|
||||
two_params(1, x=2)
|
||||
#! 17 type-error-too-many-arguments
|
||||
two_params(1, 2, y=3)
|
||||
|
||||
# -----------------
|
||||
# default arguments
|
||||
# -----------------
|
||||
|
||||
def default(x, y=1, z=2):
|
||||
return x
|
||||
|
||||
#! 7 type-error-too-few-arguments
|
||||
default()
|
||||
default(1)
|
||||
default(1, 2)
|
||||
default(1, 2, 3)
|
||||
#! 17 type-error-too-many-arguments
|
||||
default(1, 2, 3, 4)
|
||||
|
||||
default(x=1)
|
||||
|
||||
Reference in New Issue
Block a user