Comment #2 on issue 728 by mikko.korpela: Errors with positional arguments and arguments with default values
http://code.google.com/p/robotframework/issues/detail?id=728

I think that the first definitely deserves a warning. The mistake it quite easy to do and it can change the keywords behavior in very strange ways without informing the user.

By adding a varargs argument to the example things will again work in a different way .. now you can add "positional"-like arguments after the ones defined with default values (although you need to define all the values for def-valued arguments if you don't want them to behave oddly).

User can do the mistake at least by:
* Not knowing that positional arguments are not allowed after the ones with default value
  * Typing a name of a default value argument wrong
* Changing signature of a keyword by renaming/deleting default value argument -- and not changing it in all the places where the keyword has been used

Reply via email to