Re: Mandis Quotes (aka retiring """ and ''')
From: Jeff Epler (jepler_at_unpythonic.net)
Date: 10/04/04
- Next message: Erik Rose: "ActivePython/IIS Request Concurrency"
- Previous message: Jeff Epler: "Re: Mandis Quotes (aka retiring """ and ''')"
- Maybe in reply to: Russell Nelson: "Mandis Quotes (aka retiring """ and ''')"
- Next in thread: Russell Nelson: "Re: Mandis Quotes (aka retiring """ and ''')"
- Reply: Russell Nelson: "Re: Mandis Quotes (aka retiring """ and ''')"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 4 Oct 2004 10:48:28 -0500 To: exarkun@divmod.com
On Mon, Oct 04, 2004 at 03:07:17PM +0000, exarkun@divmod.com wrote:
> Responding to "replacing them by a single 'x' that suffices for everything":
> No, it doesn't.
> It replaces them with an arbitrary number of string delimiters. 'x'
> is one, but 'y' is another, 'Would you like some spam?' is yet
> another. You must still be careful in selecting your delimiter,
> lest you accidentally use one included in your string literal. The
> chances of doing so are greatly decreased, but they are still
> non-zero.
> The idea doesn't seem all bad, but it doesn't seem like a great
> enough improvement to justify very nearly breaking every Python
> program ever written in dozens, hundreds, or even thousands of
> different places.
> Jp
Ouch. You're right. Here's another program whose meaning changes
radically with mandis-quotes:
print '-' * 72
do_the_real_work()
print '-' * 72
Any program that contains the same double-quoted string twice would change
meaning under this proposal.
On the other hand, does this program have any meaning left?
print 'x'
it must be an unterminated mandis-quoted string.
OK, shoot this proposal right now.
Jeff
- application/pgp-signature attachment: stored
- Next message: Erik Rose: "ActivePython/IIS Request Concurrency"
- Previous message: Jeff Epler: "Re: Mandis Quotes (aka retiring """ and ''')"
- Maybe in reply to: Russell Nelson: "Mandis Quotes (aka retiring """ and ''')"
- Next in thread: Russell Nelson: "Re: Mandis Quotes (aka retiring """ and ''')"
- Reply: Russell Nelson: "Re: Mandis Quotes (aka retiring """ and ''')"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|