# Python versions

Irelia formulas are written in Python, the most popular language for data science. The entirety of [Python’s standard library](https://docs.python.org/3.9/library/) is available to you. For those with a spreadsheet background, we’ve also added a suite of Excel-like functions, with all-uppercase names. Here’s the full list of functions. Python formulas are evaluated in a sandbox, without internet access, and without a persistent filesystem.

## Supported versions

We currently support two versions of Python:

* Python 3 (specifically 3.9 at the time of writing)
* Python 2 (specifically 2.7)

Newly created documents on our hosted service use Python 3 by default, while older documents (created before November 2021 approximately) use Python 2 by default. ~~To tell which version of Python a specific document uses, look at its~~ [~~Document Settings~~](https://ciusji.gitbook.io/irelia/managing-documents/create-a-document#document-settings)~~.~~ The `Engine` setting may be `python2`, `python3`, or blank. A blank setting implies `python2`.

If you have editing rights on a document, you can change the `Engine` setting, and the document will then reload with all formulas now interpreted using the version of Python you have specified. We recommend caution in doing so. A formula that works as intended in one version of Python may give errors in another, or (worse) give the wrong results.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ciusji.gitbook.io/irelia/using-formulas/python-versions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
