From f0778a7ccbbdd1d7bf116a6939c7eb05173e1987 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 7 Jun 2014 22:01:00 +0100 Subject: py: Implement default keyword only args. Should finish addressing issue #524. --- tests/basics/fun-kwonly.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/basics') diff --git a/tests/basics/fun-kwonly.py b/tests/basics/fun-kwonly.py index 8bda68d95..dd654eb44 100644 --- a/tests/basics/fun-kwonly.py +++ b/tests/basics/fun-kwonly.py @@ -43,14 +43,14 @@ def f(a, *, b, **kw): f(1, b=2) f(1, b=2, c=3) -## with a default value; not currently working -#def g(a, *, b=2, c): -# print(a, b, c) -# -#g(1, c=3) -#g(1, b=3, c=4) -#g(1, **{'c':3}) -#g(1, **{'b':'3', 'c':4}) +# with a default value +def g(a, *, b=2, c): + print(a, b, c) + +g(1, c=3) +g(1, b=3, c=4) +g(1, **{'c':3}) +g(1, **{'b':'3', 'c':4}) # with named star def f(*a, b, c): -- cgit v1.2.3