Just use the *args parameter, which allows you to pass as many arguments as you want after your a,b,c. You would have to add some logic to map args->c,d,e,f but its a "way" of overloading.

Copydef myfunc(a,b, *args, **kwargs):
   for ar in args:
      print ar
myfunc(a,b,c,d,e,f)

And it will print values of c,d,e,f


Similarly you could use the kwargs argument and then you could name your parameters.

Copydef myfunc(a,b, *args, **kwargs):
      c = kwargs.get('c', None)
      d = kwargs.get('d', None)
      #etc
myfunc(a,b, c='nick', d='dog', ...)

And then kwargs would have a dictionary of all the parameters that are key valued after a,b

Answer from Nix on Stack Overflow
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ optional-arguments
Python Optional Argument: Syntax, Usage, and Examples
An optional argument in Python is a function parameter that has a default value, so you can call the function with or without passing that value.
๐ŸŒ
Real Python
realpython.com โ€บ python-optional-arguments
Using Python Optional Arguments When Defining Functions โ€“ Real Python
October 27, 2025 - You can assign default values to parameters so that arguments become optional ยท You should avoid mutable data types like lists or dictionaries as default values to prevent unexpected behavior ยท You can use *args to collect any number of positional ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-pass-optional-parameters-to-a-function-in-python
How to Pass Optional Parameters to a Function in Python - GeeksforGeeks
July 23, 2025 - In Python, functions can have optional parameters by assigning default values to some arguments. This allows users to call the function with or without those parameters, making the function more flexible.
๐ŸŒ
The Python Coding Book
thepythoncodingbook.com โ€บ home โ€บ blog โ€บ optional arguments with default values in python functions [intermediate python functions series #3]
Optional Arguments with Default Values in Python Functions
January 18, 2023 - You achieve this by adding an equals after the parameter name followed by the default value ยท When you call the function, the corresponding argument is optional. If the argument is not present in the function call, the default value is used ...
๐ŸŒ
Medium
medium.com โ€บ @laurentkubaski โ€บ python-type-hints-how-many-ways-can-you-say-optional-a940f7ef03e2
Python Type Hints: How Many Ways Can You Say โ€˜Optionalโ€™? | by Laurent Kubaski | Medium
September 2, 2025 - I personally find the first โ€œOptional[str]โ€ notation to be confusing since it can be interpreted in two different ways: Interpretation #1 (the correct one): โ€œWhen calling a function, the parameter needs to be provided, but the parameter value is Optional (ie: the parameter value can be None)โ€
Find elsewhere
๐ŸŒ
Python.org
discuss.python.org โ€บ core development
Should `None` defaults for optional arguments be discouraged? - Core Development - Discussions on Python.org
February 5, 2023 - I recently merged a PR authored by Sergey Kirpichev that fixes inspect.signature (which previously failed with a ValueError) for math.log and cmath.log. A side-effect of that change is that math.log and cmath.log now accept the Python value None for the base argument.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ adding optional arguments to a function
r/learnpython on Reddit: Adding optional arguments to a function
September 8, 2021 -

I am working on a project where I'm supposed to add new features to an existing codebase. As part of this, I need to add an optional argument to one of the functions but just adding the optional argument is causing some of my unit tests to fail.

The function looks like the following initially:

def function(data1: list,     
            data2: list,
             opt1: Optional[list],
 ) 

After adding another optional argument it looks like this:

def function(
    data1: list,
    data2: list,
    opt1: Optional[list],
    new: Optional[dict],
)

The only change I'm making in the codebase is adding this optional argument and it is causing some of my unit tests to fail. I was wondering if someone knows what might be the reason ?

๐ŸŒ
University of Toronto
teach.cs.toronto.edu โ€บ ~csc110y โ€บ fall โ€บ notes โ€บ 12-interlude-nifty-python-features โ€บ 03-functions-with-optional-parameters.html
12.3 Functions with Optional Parameters
Suppose we want to define a function that takes a number n and by default returns n + 1, but allows the caller to specify an optional step amount to increase by. def increment(n: int, step: int = 1) -> int: """Return n incremented by step. If the step argument is omitted, increment by 1 instead. """ return n + step ยท Letโ€™s experiment with this function in the Python console: >>> increment(10, 2) # n = 10, step = 2 12 >>> increment(10) # n = 10 11 ยท In the latter case, no argument is passed for the step parameter, and so the default value 1 is used instead, causing 10 + 1 == 11 to be returned.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ am i wrong in thinking that optional arguments *should* be allowed to precede required arguments?
r/learnpython on Reddit: Am I wrong in thinking that optional arguments *should* be allowed to precede required arguments?
June 3, 2022 -

The mapping of the arguments can presumably be determined based simply on the number of arguments you pass. For example, let's say you had the following, with the "middle" argument being optional/default:

def format_name(first, middle='', last):
    return first + ' ' + middle + ' ' + last

If you passed

format_name('John', 'Smith')

the interpreter should be able to deduce that the second argument is referring to the parameter *last*, not the optional parameter *middle*, since there's only two arguments passed. Is this not allowed simply because of the overhead that would be required in implementing this consideration?

Many thanks for your help!

๐ŸŒ
Leapcell
leapcell.io โ€บ blog โ€บ understanding-optional-arguments-in-python
Understanding Optional Arguments in Python | Leapcell
July 25, 2025 - Optional arguments are function parameters that are not required when the function is called. They are defined with default values in the function signature.
๐ŸŒ
Replit
replit.com โ€บ discover โ€บ how-to-make-a-parameter-optional-in-python
How to make a parameter optional in Python
April 6, 2026 - Build and deploy software collaboratively with the power of AI without spending a second on setup.
๐ŸŒ
Medium
medium.com โ€บ @khanfarazahmed7 โ€บ difference-between-required-optional-positional-and-keyword-arguments-in-python-functions-1fa9cd6a46c4
Difference between Required, Optional, Positional and Keyword arguments in Python functions | by Faraz Khan | Medium
November 15, 2023 - Optional arguments make function calls easier by letting you define a function that can be called with fewer arguments than it is defined to allow. Keyword arguments, on the other hand, offer flexibility in the way you pass parameters to a function while calling it. Python ยท
๐ŸŒ
Python documentation
docs.python.org โ€บ 3 โ€บ library โ€บ typing.html
typing โ€” Support for type hints
Changed in version 3.10: Optional can now be written as X | None. See union type expressions. ... Special form for annotating higher-order functions. Concatenate can be used in conjunction with Callable and ParamSpec to annotate a higher-order callable which adds, removes, or transforms parameters of another callable.
๐ŸŒ
Index.dev
index.dev โ€บ blog โ€บ default-vs-optional-parameters-python
Default vs Optional Parameters in Python Functions: Key Differences
October 31, 2024 - Default parameters are those that have a default value if the caller does not specify one. Optional parameters: Parameters that accept a variable number of arguments via *args and **kwargs.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ article โ€บ how-to-make-the-argument-optional-in-python
How to make the argument optional in Python
March 25, 2026 - In Python functions, you can make ... Hi, Bob! The argparse module handles optional command-line arguments. Parameters starting with dashes (--) are optional and can have default values ?...
๐ŸŒ
Pydantic
pydantic.dev โ€บ docs โ€บ validation โ€บ latest โ€บ concepts โ€บ fields
Fields | Pydantic Docs
By default, Pydantic will not validate default values. The validate_default field parameter (or the validate_default configuration value) can be used to enable this behavior:
๐ŸŒ
Tech with Tim
techwithtim.net โ€บ tutorials โ€บ python-programming โ€บ intermediate-python-tutorials โ€บ optional-parameters
Python Tutorial - Optional Parameters
This python tutorial covers optional paramaters in python. Optional paramaters allow you to set a default value for a parameter if it is not given from the call.