Suggestion for a "data" object syntax

Mikhail V mikhailwas at gmail.com
Sat May 12 12:06:44 EDT 2018


On Sat, May 12, 2018 at 5:38 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Fri, May 11, 2018 at 5:26 PM, Mikhail V <mikhailwas at gmail.com> wrote:
>> On Fri, May 11, 2018 at 9:12 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
>>> On Thu, May 10, 2018 at 6:34 PM, Mikhail V <mikhailwas at gmail.com> wrote:
>>>> Do you understand that basically any python code sent by e-mail converts tabs to
>>>> spaces, thus the only way to receive it - is to send binary file?

>> So what is false?
>
> Your absurd assertion that the only way to safely email Python code is
> as a binary file.

Why you say so? You have agreed yourself with the assertion.
Also I did not say "safe" but meant that I cannot receive the exact file
in the body of e-mail in case of tabs.


> no support for _fancy features_ like viewing tabs and spaces

:\
is syntax highlighting fancy feature?


>> Sorry, not sure what you mean. Do you propose _visible_ character
>> instead of e.g. tab? But then you need to hide it to be able
>> to read normally.
>
> Why would I need to hide the separator character in order to be able
> to read the data?

So you find e.g. this ok:
→1 →→ 2 →→ 3 →→ 4

>> presentable to the reader. Initial  idea is just use current
>> Python syntax for further nesting:
>>
>> image === T/T:
>>     (127,127,127)        (127,127,127)        (127,127,127)
>>     (127,127,127)        (127,127,127)        (127,127,127)
>>     (127,127,127)        (127,127,127)        (127,127,127)
>>
>> vs:
>> image = (
>>     ((127,127,127), (127,127,127), (127,127,127),),
>>     ((127,127,127), (127,127,127), (127,127,127),),
>>     ((127,127,127), (127,127,127), (127,127,127),),
>>     )
>
> And if you have more than three levels of nesting, and you don't
> conveniently just have a bunch of 3-tuples that line up perfectly with
> one another?

Maybe you can come up with some example in current syntax?
I have browsed some projects with a lot of resource definitions.
sometimes it has 3-4 levels of nesting, and I have hard time
understanding the structure - so maybe it is possible to simplify
those according to this syntax.



More information about the Python-list mailing list