Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.

Oil Expressions vs. Python

Oil's expression language borrows heavily from Python. In fact, it literally started with Python's Grammar/Grammar file.

This doc describes some differences, which may help Python users learn Oil.

If you don't know Python, see Expression Language and A Tour of the Oil Language.

Table of Contents
Literals for Data Types
Literals Like Python
Literals Changed
Literals Added
Literals Omitted
Operators
Note: Oil Does Less Operator Overloading
Operators Like Python
Operators Changed
Operators Added
Operators Removed
Oil vs. JavaScript
Semantics
Differences vs. Python
TODO

Literals for Data Types

Literals Like Python

Literals Changed

Literals Added

Literals Omitted

Operators

Note: Oil Does Less Operator Overloading

Oil doesn't overload operators as much because it often does automatic string <-> int conversion (like Awk):

Operators Like Python

Operators Changed

Operators Added

Operators Removed

Oil vs. JavaScript

Semantics

Oil's syntax is a mix of Python and JavaScript, but the semantics are closer to Python.

Differences vs. Python

TODO


Generated on Sat Jan 21 23:23:57 EST 2023