Skip to main content

eelang

Надмножество Python 3.15 (linux x86_64): паттерн-матчинг в присваиваниях и assert, match def, пайплайны. Распространяется обычным пакетом, код пишется в .eel-файлах.

Установка

pip install eelang

Требуется CPython 3.15 (linux x86_64).

Запуск

python -m eelang script.eel

Фичи

  • assert-паттерны — assert P = e связывает и проверяет форму; провал → MatchError.

    assert Point(x, y) = get_point()
    
  • match def — паттерн-матчинг аргументов функции:

    match def area(p) -> float:
        case Point(x, y) = p:
            x * y
        else:
            0
    
  • Пайплайны — ..f(...) (значение — последним аргументом), ..match:, ..assert::

    val =
        [1, 2, 3]
        ..map(lambda x: x * x)
    

MatchError импортируется явно:

from eelang import MatchError

Как устроен

Парсер — C-расширение (eelang._parser), собранное из PEG-парсера CPython 3.15 с eelang-грамматикой. Синтаксис десахарится в стандартные узлы AST; MatchError — обычный Python-класс (ValueError) в пакете.

Metadata

Release files for eelang 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eelang 0.1.0
File Size Uploaded
eelang-0.1.0.tar.gz 536.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eelang 0.1.0
File Interpreter ABI Platform
eelang-0.1.0-cp315-cp315-manylinux2014_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ x86-64 Details

Total release size: 2.0 MB

Release files / eelang-0.1.0.tar.gz

Download URL eelang-0.1.0.tar.gz
Size 536.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c319ebec5746341436531a67627855aa4eb99b720b981a2e718bed5b386ff1c6
BLAKE2b-256 checksum
How to use checksums
1b345b69ccd599c1aef50340196938c909430d0fca900b8a80e5cd491e8195da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / eelang-0.1.0-cp315-cp315-manylinux2014_x86_64.whl

Download URL eelang-0.1.0-cp315-cp315-manylinux2014_x86_64.whl
Size 1.5 MB
Tags CPython 3.15 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5f8319c1f549e88cbc6f5fec50a1d519dcdf629a9dc6ae701ad1e3c913a91d81
BLAKE2b-256 checksum
How to use checksums
ff87ddf7fc1f57984a307ec7c35a524430c01fb66ec11ff3ffade59bd9a5c78e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page