Skip to content
Sections
>> Trisquel >> Pakete >> xolotl (13.0) >> python >> python3-flexparser
[  xolotl  ]
[ Quellcode: flexparser  ]

Paket: python3-flexparser (0.4-2)

Parsing using Python typing

The idea behind flexparser is quite simple. To write a class for every type of content (called here `ParsedStatement`) one needs to parse. Each class have a `from_string` constructor. The `typing` module is used extensively to make the output structure easy to use and less error prone.

The fuse of frozen dataclass is not necessary but it convenient. Being a dataclass you get the init, str, repr, etc for free. Being frozen, sort of immutable, makes them easier to reason around.

The result is a collection of `ParsedStatement` or `ParsingError`.

Andere Pakete mit Bezug zu python3-flexparser

  • hängt ab von
  • empfiehlt
  • schlägt vor
  • dep: python3
    interactive high-level object-oriented language (default python3 version)
  • dep: python3-typing-extensions
    Backported and Experimental Type Hints for Python

python3-flexparser herunterladen

Download für alle verfügbaren Architekturen
Architektur Paketgröße Größe (installiert) Dateien
all 43,0 kB210 kB [Liste der Dateien]