Hi,
As others have already commented, the behavior is by design. It's in
general hard to tell should a value like 42 in a plain text file be
interpreted as a string or an integer. Robot Framework has decided to
consider everything to be a string. We can argue about the decision,
but due to huge backwards compatibility problems it cannot be changed.
I have, however, been lately thinking that we could start using Python
3 annotations to see what types the library expects. If, for example,
you'd have a keyword
def example(arg: int):
pass
and used it like
Example 42
Robot could automatically convert that string 42 into an integer. We
already do this for Java based libraries implemented like
public void example(int arg) {
}
so this shouldn't be overly complicated. I guess we could add some way
to support this also with Python 2, but on the other hand this would
be a great feature motivating people to migrate to Python 3. Anyway,
this is too big a change for RF 3.0.3 but would fit nicely into RF
3.1.
Cheers,
.peke
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
robotframework-u...@googlegroups.com.
> To post to this group, send email to
robotframe...@googlegroups.com.
--
Agile Tester/Developer/Consultant ::
http://eliga.fi
Lead Developer of Robot Framework ::
http://robotframework.org