Mandis Quotes (aka retiring """ and ''')
Russell Nelson
nelson at crynwr.com
Mon Oct 4 23:18:54 EDT 2004
Andrew Dalke <adalke at mindspring.com> wrote in message news:<FXf8d.2597$M05.1234 at newsread3.news.pas.earthlink.net>...
> '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.
-russ
More information about the Python-list
mailing list