[Python-Dev] PEP 295 - Interpretation of multiline string constants

Fredrik Lundh fredrik@pythonware.com
2002年7月25日 19:27:07 +0200


Stepan Koltsov wrote:
> > This is an incompatible change. Your PEP does not address
> > how to deal with this at all. I will be forced to reject it unless
> > you come up with a transition strategy (in fact, I don't even want
> > to consider your proposal unless you deal with this).
>> For most strings this change will not change program result

and how on earth do you know that?
> (for example number of spaces doesn't matter in SQL queries).

so why do all your examples use SQL queries?
> For others I suggested (in section 'Alternatives') flags 'i' and 'o'
> for string constants.

if you want to interpret multiline strings in a different way, why
cannot you just do like everyone else, and use a function?
 mystring = SQL("""
 blablabla
 """)
(as a bonus, that approach makes it trivial to embed files, images,
xml structures, etc...)
a big -1 from here.
</F>

AltStyle によって変換されたページ (->オリジナル) /