> -Original Message-
> From:
> [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> rg] On Behalf Of Matthew Warren
> Sent: 03 October 2006 16:07
> To: python-list@python.org
> Subject: RE: Escapeism
>
>
>
> > -Original Message-
> &
> -Original Message-
> From:
> [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> rg] On Behalf Of Kay Schluehr
> Sent: 30 September 2006 18:02
> To: python-list@python.org
> Subject: Re: Escapeism
>
> Sybren Stuvel wrote:
> > Kay Schluehr enlightened
Hendrik van Rooyen wrote:
> dumb question - is the backslash as escape character fixed
yes.
> seems to me that would help
help with what?
> or if you could turn the behaviour off - don't know how though...
eh? if you don't want to use repr(), you don't have to.
--
http://mail.python.org
Kay Schluehr wrote:
> This yields the hexadecimal representation of the ASCII character and
> does not simply echo the keystrokes '\' and 'a' for '\a' ignoring the
> escape semantics. One way to achieve this naturally is by prefixing
> '\a' with r where r'\a' indicates a "raw" string. But unfortun
"Kay Schluehr" <[EMAIL PROTECTED]> wrote:
> Sybren Stuvel wrote:
> > Kay Schluehr enlightened us with:
> > > Usually I struggle a short while with \ and either succeed or give up.
> > > Today I'm in a different mood and don't give up. So here is my
> > > question:
> > >
> > > You have an unknown c
Frederic Rentsch wrote:
> Kay Schluehr wrote:
> > Sybren Stuvel wrote:
> >
> >> Kay Schluehr enlightened us with:
> >>
> >>> Usually I struggle a short while with \ and either succeed or give up.
> >>> Today I'm in a different mood and don't give up. So here is my
> >>> question:
> >>>
> >>> You ha
Kay Schluehr wrote:
> Sybren Stuvel wrote:
>
>> Kay Schluehr enlightened us with:
>>
>>> Usually I struggle a short while with \ and either succeed or give up.
>>> Today I'm in a different mood and don't give up. So here is my
>>> question:
>>>
>>> You have an unknown character string c suc
Kay Schluehr wrote:
> Steve Holden wrote:
>
>>Kay Schluehr wrote:
>>
>>>Sybren Stuvel wrote:
>>>
>>>
Kay Schluehr enlightened us with:
>Usually I struggle a short while with \ and either succeed or give up.
>Today I'm in a different mood and don't give up. So here is my
>
> But there is some ambiguity due to the the fact that applying '\7' to
> rawform() yields r'\a' and not r'\7'. So one needs more specification
> for disambiguation using e.g. an extra parameter.
>
>>> '\a'=='\7'
True
The two are actually the same thing, so how could a function decide
whether to
Steve Holden wrote:
> Kay Schluehr wrote:
> > Sybren Stuvel wrote:
> >
> >>Kay Schluehr enlightened us with:
> >>
> >>>Usually I struggle a short while with \ and either succeed or give up.
> >>>Today I'm in a different mood and don't give up. So here is my
> >>>question:
> >>>
> >>>You have an unk
Kay Schluehr wrote:
> Sybren Stuvel wrote:
>
>>Kay Schluehr enlightened us with:
>>
>>>Usually I struggle a short while with \ and either succeed or give up.
>>>Today I'm in a different mood and don't give up. So here is my
>>>question:
>>>
>>>You have an unknown character string c such as '\n' ,
"Kay Schluehr" <[EMAIL PROTECTED]> wrote:
>> try "print repr(c)".
>
> This yields the hexadecimal representation of the ASCII character and
> does not simply echo the keystrokes '\' and 'a' for '\a' ignoring the
> escape semantics.
But you yourself noted earlier that '\a' and '\x07' are the same
Sybren Stuvel wrote:
> Kay Schluehr enlightened us with:
> > Usually I struggle a short while with \ and either succeed or give up.
> > Today I'm in a different mood and don't give up. So here is my
> > question:
> >
> > You have an unknown character string c such as '\n' , '\a' , '\7' etc.
> >
> >
Kay Schluehr enlightened us with:
> Usually I struggle a short while with \ and either succeed or give up.
> Today I'm in a different mood and don't give up. So here is my
> question:
>
> You have an unknown character string c such as '\n' , '\a' , '\7' etc.
>
> How do you echo them using print?
>
Kay Schluehr wrote:
> Usually I struggle a short while with \ and either succeed or give up.
> Today I'm in a different mood and don't give up. So here is my
> question:
>
> You have an unknown character string c such as '\n' , '\a' , '\7' etc.
>
> How do you echo them using print?
>
> print_st
Usually I struggle a short while with \ and either succeed or give up.
Today I'm in a different mood and don't give up. So here is my
question:
You have an unknown character string c such as '\n' , '\a' , '\7' etc.
How do you echo them using print?
print_str( c ) prints representation '\a' to st
16 matches
Mail list logo