You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate possibility to use empty string so that it is interpreted as default value with some standard library keywords #5537
Some keywords in standard libraries, at least in String and Collections, allow using an empty string so that it is interpreted to mean the same as not using the argument at all. For example, all these usages are equal:
*** Test Cases ***Example
Get Slice From List ${list}0 2
Get Slice From List ${list}${EMPTY}2
Get Slice From List ${list} end=2
This made sense in the early days when tests were created in tables and when the named argument syntax (end=2) wasn't supported. It that usage these were equivalent:
Test Case
Keyword
Argument
Argument
Argument
Example
Get Slice From List
${list}
0
2
Get Slice From List
${list}
2
In practice the idea was to avoid the need to specify the default value in data. Nowadays the named argument syntax works much better.
This old syntax hasn't bothered much earlier, but now that we are adding type hints to standard libraries, continuing to support it requires using annoying typing like start: int | Literal[""] instead of simpler start: int. I believe that's enough reason to warrant deprecating the syntax in RF 7.4. We can wait at least to RF 8.0, possibly later, before removing it.
changed the title [-]Deprecate possibility to use empty string so that default value is[/-][+]Deprecate possibility to use empty string so that it is interpreted as default value with some standard library keywords[/+]on Nov 4, 2025
Activity
[-]Deprecate possibility to use empty string so that default value is[/-][+]Deprecate possibility to use empty string so that it is interpreted as default value with some standard library keywords[/+]pekkaklarck commentedon Nov 18, 2025
I investigated which libraries and keywords are affected:
Get Slice From ListandGet Index From ListSplit String,Split String From Right,Split To Lines,Get Substring,Generate Random String,I'll handle Collections now. With String it's probably better to add type hints first.
Deprecate using empty string as start index
Deprecate using empty string as an index
pekkaklarck commentedon Dec 1, 2025
Few more keywords in String are affected.
String: Deprecate interpreting empty string as default value
Avoid syntax deprecated by #5537 in example