[I18n-sig] Literal strings
Christian Tanzer
tanzer@swing.co.at
Fri, 02 Jun 2000 16:12:36 +0200
pf@artcom-gmbh.de (Peter Funk) wrote:
> If code can be modified automatically (and what you proposed can
> be done with a only slightly more elaborated operation than a simple
> 's/"/u"/g' replacement) this is IMO no argument.
Unfortunately, it's not that simple:
-------------------------------------------------------------------------=
------
Python 1.5.2 (#5, Jan 4 2000, 11:37:02) [GCC 2.7.2.1] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> #some_string
=2E.. =
>>> import re
>>> some_string=3D'''
=2E.. Just to test an over-simplified regex: "first string".
=2E.. """Followed by another string =
=2E.. spanning several lines.
=2E.. """
=2E.. '''
>>> print some_string =
Just to test an over-simplified regex: "first string".
"""Followed by another string
spanning several lines.
"""
>>> print re.sub ('"','u"',some_string )
Just to test an over-simplified regex: u"first stringu".
u"u"u"Followed by another string
spanning several lines.
u"u"u"
-------------------------------------------------------------------------=
------
Do you really have `a only slightly more elaborated operation'? If so,
please post it.
Regards,
Christian
-- =
Christian Tanzer tanzer@swing.co.=
at
Glasauergasse 32 Tel: +43 1 876 62 =
36
A-1130 Vienna, Austria Fax: +43 1 877 66 =
92