syntactic package

Submodules

syntactic.app module

Support for custom syntax.

class syntactic.app.IncrementalDecoder(errors='strict')[source]

Bases: codecs.BufferedIncrementalDecoder

A buffered incremental decoder for custom syntax.

class syntactic.app.StreamReader(stream, errors='strict')[source]

Bases: encodings.utf_8.StreamReader

decode is deferred to support better error messages

stream

Get the stream.

syntactic.app.decode(source_bytes, errors='strict')[source]

Decode the utf-8 input and transform it with the named transformers.

syntactic.app.get_transformer_pairs(source)[source]

Return the module and function names of requested transformers.

Searches for from __syntax__ import ....

Return type:List[Tuple[str, str]]
syntactic.app.main()[source]

Register the codec with Python.

syntactic.cli module

syntactic.examples module

Module contents

Syntactic provides custom syntax for Python.