-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
i recognized that Boa does not correctly parse the python slice notation.
For example
label = file_name.split('/')[:-2] will be parsed to label = file_name.split('/')[-2]
When looking at the AST of the expression i see that the colon is not captured:
{
....
{
"kind": "ARRAYINDEX",
"expressions": [
{
"kind": "UNARY",
"expressions": [
{
"kind": "LITERAL",
"literal": "-"
},
{
"kind": "LITERAL",
"literal": "2"
}
]
}
...
]
}