'Reverse List' does not return any values in the Variables - Lists examples

Open
#302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
50/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
html
Domain
documentation

Research direction

Open the Variables “Getting started” example 2_Lists.robot and compare the Combine Lists/Reverse List lines with the issue. Update the example so Reverse List operates on new_list and the console logs that list, then verify the rendered example no longer prints None.

Written by the indexing model from the issue text.

Description

The example 2_Lists.robot in the Variables in the "Getting started" section contains a mistake, see https://robotframework.org/?tab=0&example=Variables#getting-started

Incorrect example:

Test with some Collections keywords
    ${list}=    Create List    1    2    3
    Append To List    ${list}    4    5    6
    ${list2}=    Create List    7    8    9
    ${new_list}=    Combine Lists    ${list}    ${list2}
    ${reversed}=    Reverse List    ${new_list}
    Log To Console    ${reversed}

The keyword Combine Lists does not return any values, but only affects to the variable given to the keyword. As a result, the last line will log a None value.

Correction:

    Reverse List    ${new_list}
    Log To Console    The reversed list: ${new_list}
Dominant language
HTML
Stars
83
Forks
85
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from robotframework/robotframework.github.com

All issues in robotframework/robotframework.github.com

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.