Suggestion for a "data" object syntax
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sat May 12 00:54:14 EDT 2018
On Sat, 12 May 2018 02:26:05 +0300, Mikhail V wrote:
> it is just not a trivial task to find an optimal solution to this
We already have an optimal solution to this.
* It works with any editor, including simple ones.
* It is safe for transmit over email, or on web forums,
so long as you avoid tabs and use spaces.
* It is readable by humans without them needing to distinguish
between two different kinds of invisible space.
* It can be easily parsed by hand or by machine.
* It works with a multitude of text processing tools whether
or not they can cope with tabs.
* It is resistant to many sorts of typos.
* It allows great flexibility in the presentation, you aren't
forced to lay things out in one specific 2D format.
* It uses the same consistent rules for the rest of the language,
without adding special cases and complexity.
* It is a tried-and-true solution that has been used (with minor
modifications) for dozens, possibly hundreds, of programming
languages, natural language lists and data formats.
--
Steve
More information about the Python-list
mailing list