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
Collections and Builtin: Rename list_ argument to list and time_ argument to time #5762
List related keywords in the Collections library use list_ as the name of the argument containing the list to validate or modify. Similarly, the Sleep keyword in Builtin has argument time_. The motivation has been to avoid a name clash with Python's built-in list class and the time module, respectively. That's understandable, but these names are still odd. There would also be no real problems with using names list and time.
We've used these names "forever", but the situation got a bit worse in RF 7.5 when explicit argument documentation was added as part of #5709. We considered changing the names at the same time, but due to backwards compatibility reasons decided to do it in a major release instead. We also plan to add a note about names being changed to the docs so users have time to react if needed.
As mentioned above, the change is backwards incompatible, but normal usages like these aren't affected:
Log List ${mylist}
Sleep 10 seconds
Problems arise if the name argument syntax is used like:
Log List list_=${mylist}
Sleep time_=10 seconds
Because list_ and time_ are both used only as the first argument, there is generally no need to use the named argument syntax and thus usages like above ought to be rare.
The situation with Collections is actually even worse than discussed above, because some list related keywords actually already use list as the argument name. This kind of inconsistency is never good and makes it more important to rename list_ to list.
I can start working on this if it's free. Just one question: while looking at BuiltIn, I noticed get_time also uses time_, I suppose for the same reason. Should I refactor that too, or keep it out of scope?
Nobody else is looking at this yet, but I'm not sure is it a god idea for you to do that now either. For backwards compatibility reasons this can be done only in RF 8.0. It's possible to do a PR already now, but then there's a risk that changes before RF 8.0 development start cause conflicts.
I hadn't noticed Get Time also uses time_ and that should certainly be changed as well. Probably should we should go through all standard libraries a bit more carefully as well.
That works for me, I'm happy to handle any conflicts that come up before RF 8.0 development begins. I’ll start drafting the PR right away and keep it up to date.
While going through the codebase for other list_/time_ occurrences, I found two more spots in utils/robottime.py:
get_time() also uses time_, for the same reason as the keyword. It's re-exported as part of the public robot.utils API, though, so renaming could be a second, independent breaking change. Should we include this, or keep it separate?
format_time() also has a local time_, but that function is already deprecated and scheduled for removal in RF 8.0, so I left it untouched.
On the list_ side, I didn't find any other occurrences outside Collections.py that are related to this issue; the rest are test fixtures and RST anchor links.
Activity
pekkaklarck commentedon Aug 24, 2026
The situation with Collections is actually even worse than discussed above, because some list related keywords actually already use
listas the argument name. This kind of inconsistency is never good and makes it more important to renamelist_tolist.seto commentedon Aug 25, 2026
I can start working on this if it's free. Just one question: while looking at BuiltIn, I noticed
get_timealso usestime_, I suppose for the same reason. Should I refactor that too, or keep it out of scope?pekkaklarck commentedon Aug 28, 2026
Nobody else is looking at this yet, but I'm not sure is it a god idea for you to do that now either. For backwards compatibility reasons this can be done only in RF 8.0. It's possible to do a PR already now, but then there's a risk that changes before RF 8.0 development start cause conflicts.
I hadn't noticed
Get Timealso usestime_and that should certainly be changed as well. Probably should we should go through all standard libraries a bit more carefully as well.seto commentedon Aug 28, 2026
That works for me, I'm happy to handle any conflicts that come up before RF 8.0 development begins. I’ll start drafting the PR right away and keep it up to date.
seto commentedon Aug 31, 2026
While going through the codebase for other
list_/time_occurrences, I found two more spots inutils/robottime.py:get_time()also usestime_, for the same reason as the keyword. It's re-exported as part of the publicrobot.utilsAPI, though, so renaming could be a second, independent breaking change. Should we include this, or keep it separate?format_time()also has a localtime_, but that function is already deprecated and scheduled for removal in RF 8.0, so I left it untouched.On the
list_side, I didn't find any other occurrences outsideCollections.pythat are related to this issue; the rest are test fixtures and RST anchor links.