Top "Optional-arguments" questions

An optional argument is an argument which can be omitted, eventually being replaced by a default value, where an argument is an actual value passed to a function, procedure, or command line program.

How do I create a Python function with optional arguments?

I have a Python function which takes several arguments. Some of these arguments could be omitted in some scenarios. def …

python function arguments optional-arguments
How to pass optional arguments to a method in C++?

How to pass optional arguments to a method in C++ ? Any code snippet...

c++ optional-arguments
Named tuple and default values for optional keyword arguments

I'm trying to convert a longish hollow "data" class into a named tuple. My class currently looks like this: class …

python default-value namedtuple optional-arguments
LaTeX Optional Arguments

How do you create a command with optional arguments in LaTeX? Something like: \newcommand{\sec}[2][]{ \section*{#1 \ifsecondargument and #2 \fi} } } Then, …

latex optional-arguments
How do I test if optional arguments are supplied or not?

How do I test if optional arguments are supplied or not? -- in VB6 / VBA Function func (Optional ByRef arg …

vba function vb6 arguments optional-arguments
Why is the empty dictionary a dangerous default value in Python?

I put a dict as the default value for an optional argument to a Python function, and pylint (using Sublime …

python optional-parameters pylint optional-arguments
Python optional parameters

Guys, I just started python recently and get confused with the optional parameters, say I have the program like this: …

python optional-arguments
getopt does not parse optional arguments to parameters

In C, getopt_long does not parse the optional arguments to command line parameters parameters. When I run the program, …

c arguments getopt getopt-long optional-arguments
Multiple optional arguments python

So I have a function with several optional arguments like so: def func1(arg1, arg2, optarg1=None, optarg2=None, optarg3=…

python-3.x optional-arguments