source | all docs for version 0.8.4 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
Oil's expression language borrows heavily from Python.
In fact, it literally started with Python's Grammar/Grammar
file.
\u{3bc}
instead of \uhhhh
and \UHHHHHHHH
42,
are disallowed, in favor of the more explicit
tup(42)
.Additions:
%(one two three)
Oil doesn't overload operators as much:
a + b
is for addition, while a ++ b
is for concatenation.a < b
is only for numbers. cmp()
could be for strings.No "accidentally quadratic"
in
for array/list membership. Only dict membership.++=
operator on strings doesn't existOther:
1:5:2
syntax because 0::2
conflicts with module::name
.
This might have been unnecessary.~
rather than the re
module.s[i]
returns an integer code point ("rune").{}
is different than []
and ()
d->key