On Mon, 2005-07-11 at 01:08, Bob Ippolito wrote:
> A better proposal would probably be another string prefix that means
> "dedent", but I'm still not sold. doc processing software is clearly
> going to have to know how to dedent anyway in order to support
> existing code.
OTOH, adding anot
Reinhold Birkenfeld wrote:
> Guido van Rossum wrote:
>
>>On 7/5/05, Andrew Durdin <[EMAIL PROTECTED]> wrote:
>>
>>>I have written a patch that changes the way triple-quoted strings are
>>>scanned so that leading whitespace is ignored in much the same way
>>>that pep 257 handles it for docstrings.
Bob Ippolito wrote:
> A better proposal would probably be another string prefix that means
> "dedent", but I'm still not sold. doc processing software is clearly
> going to have to know how to dedent anyway in order to support
> existing code.
Agreed.
It is easy enough for any doc-string e
Terry Reedy wrote:
> "Andrew Durdin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Very likely. But given the number of times that similar proposals have
>> been put forth in the past, it is reasonable to expect that they will
>> be brought up again in the future by others, if t
"Andrew Durdin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Very likely. But given the number of times that similar proposals have
> been put forth in the past, it is reasonable to expect that they will
> be brought up again in the future by others, if this is rejected--and
> in
On Jul 10, 2005, at 6:39 PM, Josiah Carlson wrote:
>
> Andrew Durdin <[EMAIL PROTECTED]> wrote:
>
>>
>> On 7/11/05, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> You are wrong. Current string literals are explicit. They are
>>> what you
>>> type.
>>>
>>
>> No they are not:
>>
>
> Appar
Andrew Durdin <[EMAIL PROTECTED]> wrote:
>
> On 7/11/05, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> >
> > You are wrong. Current string literals are explicit. They are what you
> > type.
>
> No they are not:
Apparently my disclaimer of "except in the case of the decades-old
string escapes th
On 7/11/05, Josiah Carlson <[EMAIL PROTECTED]> wrote:
>
> You are wrong. Current string literals are explicit. They are what you
> type.
No they are not:
>>> "I typed \x41, but got this!"
'I typed A, but got this!'
What we have are not explicit string literals but *explicit rules*,
for
On 7/10/05, Andrew Durdin <[EMAIL PROTECTED]> wrote:
> On 7/7/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> >
> > I don't think so. It smells too much of DWIM, which is very unpythonic.
> > EIBTI.
>
> In what way? The scheme described is explicit, and consistently
> applied to all triple-quot
Andrew Durdin <[EMAIL PROTECTED]> wrote:
>
> On 7/7/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> >
> > I don't think so. It smells too much of DWIM, which is very unpythonic.
> > EIBTI.
>
> In what way? The scheme described is explicit, and consistently
> applied to all triple-quoted stri
Guido van Rossum wrote:
> On 7/5/05, Andrew Durdin <[EMAIL PROTECTED]> wrote:
>> I have written a patch that changes the way triple-quoted strings are
>> scanned so that leading whitespace is ignored in much the same way
>> that pep 257 handles it for docstrings. Largely this was for a
>> learning
On 7/7/05, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> I believe there were some current alternatives and concerns already
> expressed that have not been included yet that maybe should be.
Yes; Nick pointed me to one, and I'll be looking at that and the
related discussions before redrafting; I'll
On 7/7/05, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>
> I don't think so. It smells too much of DWIM, which is very unpythonic. EIBTI.
In what way? The scheme described is explicit, and consistently
applied to all triple-quoted strings[*] -- although the rules are
different to the current beha
On 7/6/05, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>
> However, while I prefer what you describe to Python's current
> behaviour, I am not yet convinced the backward compatibility pain is
> worth it. Adding yet-another-kind-of-string-literal (when we already
> have bytestrings on the horizon) is a
"Andrew Durdin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here's the draft PEP I wrote up:
I believe there were some current alternatives and concerns already
expressed that have not been included yet that maybe should be.
Some of your examples look worse than needed by put
On 7/5/05, Andrew Durdin <[EMAIL PROTECTED]> wrote:
> I have written a patch that changes the way triple-quoted strings are
> scanned so that leading whitespace is ignored in much the same way
> that pep 257 handles it for docstrings. Largely this was for a
> learning experience in hacking the pars
Andrew Durdin wrote:
> Here's the draft PEP I wrote up:
Well reasoned, and well written up IMO. In particular, being able to
preserve all leading whitespace by the simple expedient of putting the
closing triple quote in column zero and escaping the final newline is
a nice feature.
However, whi
Here's the draft PEP I wrote up:
Abstract
Triple-quoted string (TQS henceforth) literals in Python preserve
the formatting of the literal string including newlines and
whitespace. When a programmer desires no leading whitespace for
the lines in a TQS, he must align all lines bu
On 7/6/05, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> Doc strings, first meant for the code reader, need to be where they are.
> They also come before the code itself, so don't interfere.
Doc strings are really not an issue, due to the conventions for
processing whitespace in them (and also the f
"Andrew Durdin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In general, I find triple-quoted strings to be very handy,
> particularly for standalone scripts. However, the fact that they have
> to be written in the left-hand column to avoid leading whitespace
> really grates, par
"Andrew Durdin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In general, I find triple-quoted strings to be very handy,
> particularly for standalone scripts. However, the fact that they have
> to be written in the left-hand column to avoid leading whitespace
> really grates, par
On 7/5/05, Andrew Durdin <[EMAIL PROTECTED]> wrote:
> print """Usage: dostuff
>
> Options:
> -c - blah blah
> -f - do stuff with file "filename"
> -s - more blah"""
Isn't the standard idiom for this already:
import textwrap
...
print textwrap.dedent("""\
Usage: dos
In general, I find triple-quoted strings to be very handy,
particularly for standalone scripts. However, the fact that they have
to be written in the left-hand column to avoid leading whitespace
really grates, particularly when they're nested within a block or two
-- it's a wart:
try:
23 matches
Mail list logo