Re: Suggestion for a "data" object syntax

2018-05-12 Thread Mikhail V
On Sat, May 12, 2018 at 5:38 PM, Ian Kelly wrote: > On Fri, May 11, 2018 at 5:26 PM, Mikhail V wrote: >> On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote: >>> On Thu, May 10, 2018 at 6:34 PM, Mikhail V

Re: Suggestion for a "data" object syntax

2018-05-12 Thread Ian Kelly
On Fri, May 11, 2018 at 5:26 PM, Mikhail V wrote: > On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote: >> On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote: >>> Do you understand that basically any python code sent by e-mail

Re: Suggestion for a "data" object syntax

2018-05-12 Thread Mikhail V
On Sat, May 12, 2018 at 7:54 AM, Steven D'Aprano wrote: > 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. Yes. current syntax will

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Steven D'Aprano
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

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Mikhail V
On Fri, May 11, 2018 at 9:39 AM, Ian Kelly wrote: > On Mon, May 7, 2018 at 9:45 PM, Mikhail V wrote: >> *Example 1. Multi-line strings* >> >> data === S : >> this is multi-line string >> escape chars: same as in strings (\\, \\n, \\t ...) ,

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Mikhail V
On Fri, May 11, 2018 at 9:12 AM, Ian Kelly wrote: > On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote: >> On Wed, May 9, 2018 at 6:25 AM, Steven D'Aprano >> wrote: >>> On Tue, 08 May 2018 23:16:23 +0300, Mikhail V

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Chris Angelico
On Fri, May 11, 2018 at 4:39 PM, Ian Kelly wrote: > On Mon, May 7, 2018 at 9:45 PM, Mikhail V wrote: >> Benefits are easy to see: say I want a tuple of strings: >> >> data === T : >> "foo bar" >> "hello world" >> "to be continued..." >> >>

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Ian Kelly
On Mon, May 7, 2018 at 9:45 PM, Mikhail V wrote: > Here is an idea for 'data object' a syntax. > For me it is interesting, how would users find such syntax. > I personally find that this should be attractive from users > perspective. > Main aim is more readable presenting of

Re: Suggestion for a "data" object syntax

2018-05-11 Thread Ian Kelly
On Thu, May 10, 2018 at 6:34 PM, Mikhail V wrote: > On Wed, May 9, 2018 at 6:25 AM, Steven D'Aprano > wrote: >> On Tue, 08 May 2018 23:16:23 +0300, Mikhail V wrote: >> > >>> but I propose Tab-separated elements. >> >> We already have

Re: Suggestion for a "data" object syntax

2018-05-10 Thread Mikhail V
On Wed, May 9, 2018 at 6:25 AM, Steven D'Aprano wrote: > On Tue, 08 May 2018 23:16:23 +0300, Mikhail V wrote: > >> but I propose Tab-separated elements. > > We already have tab-separated elements in Python. It is allowed to use > tabs between any whitespace

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Steven D'Aprano
On Tue, 08 May 2018 23:16:23 +0300, Mikhail V wrote: > I don't propose to remove spaces, And that is why the syntax will be ambiguous. So long as whitespace is *allowed* but not *required* around operators, there will be ambiguity between a - b and a - b with no way to tell whether they are

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mikhail V
On Wed, May 9, 2018 at 3:14 AM, Ben Finney wrote: > Mikhail V writes: > >> On Wed, May 9, 2018 at 12:33 AM, Chris Angelico wrote: >> > On Wed, May 9, 2018 at 7:15 AM, Mikhail V wrote: >> >> Just admit it,

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Ben Finney
Mikhail V writes: > On Wed, May 9, 2018 at 12:33 AM, Chris Angelico wrote: > > On Wed, May 9, 2018 at 7:15 AM, Mikhail V wrote: > >> Just admit it, you try to troll me (or just pretend, I don't know). > > > > No, I am not trolling

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mikhail V
On Wed, May 9, 2018 at 12:33 AM, Chris Angelico wrote: > On Wed, May 9, 2018 at 7:15 AM, Mikhail V wrote: >> On Tue, May 8, 2018 at 5:25 PM, Chris Angelico wrote: >>> On Tue, May 8, 2018 at 10:52 PM, Mikhail V

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mark Lawrence
On 08/05/18 22:33, Chris Angelico wrote: On Wed, May 9, 2018 at 7:15 AM, Mikhail V wrote: On Tue, May 8, 2018 at 5:25 PM, Chris Angelico wrote: On Tue, May 8, 2018 at 10:52 PM, Mikhail V wrote: Right? Your issues with tabs

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Chris Angelico
On Wed, May 9, 2018 at 7:15 AM, Mikhail V wrote: > On Tue, May 8, 2018 at 5:25 PM, Chris Angelico wrote: >> On Tue, May 8, 2018 at 10:52 PM, Mikhail V wrote: >>> Right? Your issues with tabs aside, I think it is impossible to ignore

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mikhail V
On Tue, May 8, 2018 at 5:25 PM, Chris Angelico wrote: > On Tue, May 8, 2018 at 10:52 PM, Mikhail V wrote: >> Right? Your issues with tabs aside, I think it is impossible to ignore the >> the readability improvement. Not even speaking of how >> many commas

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Chris Angelico
On Wed, May 9, 2018 at 6:16 AM, Mikhail V wrote: > Also I don't know what kind of human thinks that this: > a + b > is two elements "a" and "+ b" > What is "+ b"? Unary plus applied to whatever value 'b' is. > And who writes "- b" with a space in unary minus? > I don't.

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mikhail V
On Tue, May 8, 2018 at 6:20 PM, Steven D'Aprano wrote: > On Tue, 08 May 2018 15:52:12 +0300, Mikhail V wrote: > >>> Last time you brought up this idea, you were told that it is ambiguous. >>> Using whitespace alone, it is impossible to distinguish between >>>

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Steven D'Aprano
On Tue, 08 May 2018 15:52:12 +0300, Mikhail V wrote: >> Last time you brought up this idea, you were told that it is ambiguous. >> Using whitespace alone, it is impossible to distinguish between >> >> a + b >> >> and >> >> a + b >> >> >> Can you see the difference? Of course not. That's

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Liste guru
Il 08/05/2018 14:52, Mikhail V ha scritto: ... What editor do you use? My editor can toggle tabs highlighting as arrows, and I suppose almost any editor has good support for highlighting of characters by search, etc. For NPP there are even plugins like Regex helper.     I like to 'type

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Chris Angelico
On Tue, May 8, 2018 at 10:52 PM, Mikhail V wrote: > Right? Your issues with tabs aside, I think it is impossible to ignore the > the readability improvement. Not even speaking of how > many commas and bracket you need to type in the first case. That's incredibly subjective.

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Mikhail V
On Tue, May 8, 2018 at 10:15 AM, Steven D'Aprano wrote: > On Tue, 08 May 2018 06:45:05 +0300, Mikhail V wrote: > >> *Example 3. Two-dimensional tuple.* >> >> data === T/T : >> 123"hello" >> ab c + de f >> >> is a synonym

Re: Suggestion for a "data" object syntax

2018-05-08 Thread Steven D'Aprano
On Tue, 08 May 2018 06:45:05 +0300, Mikhail V wrote: > *Example 3. Two-dimensional tuple.* > > data === T/T : > 123"hello" > ab c + de f > > is a synonym for: > > data = ( > (1, 2, 3, "hello") , > (a, b, c + d, e, f ) ) Last time you brought up this

Suggestion for a "data" object syntax

2018-05-07 Thread Mikhail V
Here is an idea for 'data object' a syntax. For me it is interesting, how would users find such syntax. I personally find that this should be attractive from users perspective. Main aim is more readable presenting of typical data chunks and some typical data types (tuples/lists) directly in code.