Positional-only argument containing =
is considered named argument if keyword accepts **named
#5094
Labels
Milestone
=
is considered named argument if keyword accepts **named
#5094
If a keyword accepts a positional only argument like
using it like
works fine and the keyword gets
foo=bar
andarg=xxx
as an argument, respectively. The argument is positional-only so=
has no special meaning.If the keyword also accepts free named arguments like
using it like
fails like
This is due to a bug in argument resolving logic where all arguments containing
=
are considered named if the keyword accepts free named arguments. This needs to be fixed so that positional-only arguments are excluded.After the fix we can fix #4821 by changing the signature of the
Format String
keyword totemplate, /, *positional, **named
. We also should check are there other keywords accepting**named
that could get the same treatment.The text was updated successfully, but these errors were encountered: