summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/fun-defargs2.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/fun-defargs2.py b/tests/basics/fun-defargs2.py
new file mode 100644
index 0000000000..c9090a3cd2
--- /dev/null
+++ b/tests/basics/fun-defargs2.py
@@ -0,0 +1,13 @@
+# overriding default arguments
+
+def foo(a, b=3):
+ print(a, b)
+
+# override with positional
+foo(1, 333)
+
+# override with keyword
+foo(1, b=333)
+
+# override with keyword
+foo(a=2, b=333)