Skip to main content

Custom syntax for Python.

Project description

docs Documentation Status
Travis-CI Build Status
Coverage Status
PyPI Package latest release PyPI Wheel Supported versions Supported implementations
Commits since latest release

Customizable syntax for Python.

Possible uses

  • Experimenting with possible language features.
  • Boilerplate reduction.


Unicode lambdas

from __syntax__ import unicode_lambda

func = λx: x + 1

is equivalent to

func = lambda x: x + 1

SQL template literals

Embedded sql:

from __syntax__ import sql_literals

engine.query(sql`SELECT author FROM books WHERE name = {book} AND author = {author}`)

is equivalent to:

engine.query('SELECT author FROM books WHERE name = ? AND author = ?', [book, author])


The example transformers are written in a fragile way. They are intended only as inspiration rather than production-ready transformers. If you want to add some production-ready ones, pull-requests are welcome.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for syntactic, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size syntactic-0.1.3-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size syntactic-0.1.3.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page