On Tue, Feb 17, 2009 at 2:01 PM, Scott David Daniels wrote:
>>> Mirko Dziadzka schrieb:
I'm trying to find a way to output strings in the raw-string format,
e.g.
print_as_raw_string(r"\.") should output r"\." instead of "\\." ...
>
> ...
> The big issue I see is that lots of va
Steven D'Aprano wrote:
Diez B. Roggisch wrote:
Mirko Dziadzka schrieb:
I'm trying to find a way to output strings in the raw-string format, e.g.
print_as_raw_string(r"\.") should output r"\." instead of "\\." ...
In any case, this is just a variation of what repr() does.
repr(r'\.')
"'
Diez B. Roggisch wrote:
> Mirko Dziadzka schrieb:
>> Hi all
>>
>> I'm trying to find a way to output strings in the raw-string format, e.g.
>>
>> print_as_raw_string(r"\.") should output r"\." instead of "\\."
>>
>> Is there a better way than writing your own print function? Some magic
>> encod
Mirko Dziadzka wrote:
> Hi all
>
> I'm trying to find a way to output strings in the raw-string format, e.g.
>
> print_as_raw_string(r"\.") should output r"\." instead of "\\."
Ok, lets make a better example:
>>> re_list = {}
>>> re_list['foo'] = r'\..*'
>>> re_list['bar'] = r'.*bar.*'
>>> prin
Diez B. Roggisch wrote:
>> I'm trying to find a way to output strings in the raw-string format, e.g.
>>
>> print_as_raw_string(r"\.") should output r"\." instead of "\\."
>>
>> Is there a better way than writing your own print function? Some magic
>> encoding?
>
> There is no need to do this. R
Mirko Dziadzka schrieb:
Hi all
I'm trying to find a way to output strings in the raw-string format, e.g.
print_as_raw_string(r"\.") should output r"\." instead of "\\."
Is there a better way than writing your own print function? Some magic
encoding?
There is no need to do this. Rawstrings ar
Mirko Dziadzka wrote:
Hi all
I'm trying to find a way to output strings in the raw-string format, e.g.
print_as_raw_string(r"\.") should output r"\." instead of "\\."
Is there a better way than writing your own print function? Some magic
encoding?
Thats nonsense. print r"\." or in python3.0
Hi all
I'm trying to find a way to output strings in the raw-string format, e.g.
print_as_raw_string(r"\.") should output r"\." instead of "\\."
Is there a better way than writing your own print function? Some magic
encoding?
Mirko
--
http://mail.python.org/mailman/listinfo/python-list