Mandis Quotes (aka retiring """ and ''')

Russell Nelson nelson at
Tue Oct 5 05:18:54 CEST 2004

Andrew Dalke <adalke at> wrote in message news:<FXf8d.2597$M05.1234 at>...
> 'Dave said '

You are cruel .... and vicious.

> Were this implemented I would suggest that whitespace
> characters not be allowed, or at least be prohibited
> from the terminal points of the Mandis quote indicators.

Very likely a sanity-preserving requirement.

> I was going to say it precludes reading in a huge block
> of bytes (>1GB in size) and quoting it because you'll need
> to buffer everything in memory.  Then I remembered string
> concatenation.  Process 1MB at a time.

Sure, they're not hard to parse.  LALR(1).

> When the text is saved, the editor is free to use an
> arbitrarily created Mandis quote delimiter.

No question but that an editor should be helpful.

> When working with byte oriented data it's very helpful
> to be able to see a text representation for non-printable
> data.  For example, seeing "\r\n" instead of "
> " (actually, that's only a "\n").  Similarly there are
> non-visible unicode characters, including

This is more of a text editor problem than anything else.  In THE,
when you select something, the invisible characters get rendered
visibly.  Other editors can do similar things.  When we get to a 100%
Unicode world, they'll have to do something.  Same thing for Unicode
glyphs that get presented identically.

> Any binary data can be inside the quote.  When does the
> program know that that binary data is a representation
> of unicode characters?

That's a good question, I'll ask Jef.  He's an inventive guy, he may
have thought of a solution already.

More information about the Python-list mailing list