Skip to content

Consider how to create variables in user keywords eg. VAR, @{var}, &{var} #60

Open
@GerwinLaagland

Description

@GerwinLaagland

When creating keywords there are currently quite a lot of different ways to create variables.

In a variable section, to create a variable, a list, or a dictionary we use the following:

${var}    Variable
@{list}   1    2    3   4
&{dict}   key=value    solution=user

In user keywords there are now (with equals, because why not..

${dct}=     Create Dictionary      vs         &{dct}=     Create Dictionary
${lst}=     Create List            vs         @{lst}=      Create List  
${var}=     Set Variable

But we also have syntax VAR. and that changes things as well:

VAR    @{lst}
VAR    ${scalar}
VAR    &{dict}

Some guideline with this might be good.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions