"Jorgen Grahn" <[EMAIL PROTECTED]>wrote:
> On 8 Jan 2007 23:57:29 -0800, Paddy <[EMAIL PROTECTED]> wrote:
> >
> > OK, whilst colons are not sufficient to re-format a completely
> > mis-indented file. I'm thinking that they are sufficient for
> > reformatting most pasted code blocks when refactor
On 2007-01-09, Leif K-Brooks <[EMAIL PROTECTED]> wrote:
> Paddy wrote:
>> Thinking about it a little, it seems that a colon followed by
>> non-indented code that has just been pasted in could also be
>> used by a Python-aware editor as a flag to re-indent the
>> pasted code.
>
> How would it reinde
On 8 Jan 2007 23:57:29 -0800, Paddy <[EMAIL PROTECTED]> wrote:
>
> OK, whilst colons are not sufficient to re-format a completely
> mis-indented file. I'm thinking that they are sufficient for
> reformatting most pasted code blocks when refactoring say?
Let's put it this way: if the formatter can
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> If this is not
> the case then the user should be asked wether to re-indent the copy
> block to be equal to, or de-dented w.r.t. the paste line indent prior
> to pasting.
>
How would the user know this? Every dedent is ambig
Paddy wrote:
> Thinking about it a little, it seems that a colon followed by
> non-indented code that has just been pasted in could also be used by a
> Python-aware editor as a flag to re-indent the pasted code.
How would it reindent this code?
if foo:
print "Foo!"
if bar:
print "Bar!"
Like thi
OK, whilst colons are not sufficient to re-format a completely
mis-indented file. I'm thinking that they are sufficient for
reformatting most pasted code blocks when refactoring say?
- Paddy.
--
http://mail.python.org/mailman/listinfo/python-list
> Won't the following rules work when pasting complete Python statements
> and complete lines, after other lines in an editor:
>
> lets call the line after which the block is to be pasted the paste
> line, and the original indent of the first line of the copied block to
> be pasted the copy indent
Paul McGuire wrote:
> "Paddy" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I was just perusing a Wikipedia entry on the "off side rule" at
> > http://en.wikipedia.org/wiki/Off-side_rule .
> > It says that the colon in Python is purely for readability, and cites
> > our FAQ ent
[EMAIL PROTECTED] wrote:
> Paddy wrote:
> > I was just perusing a Wikipedia entry on the "off side rule" at
> > http://en.wikipedia.org/wiki/Off-side_rule .
> > It says that the colon in Python is purely for readability, and cites
> > our FAQ entry
> > http://www.python.org/doc/faq/general.html#w
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I was just perusing a Wikipedia entry on the "off side rule" at
> http://en.wikipedia.org/wiki/Off-side_rule .
> It says that the colon in Python is purely for readability, and cites
> our FAQ entry
> http://www.python.org/doc/fa
Paddy wrote:
> I was just perusing a Wikipedia entry on the "off side rule" at
> http://en.wikipedia.org/wiki/Off-side_rule .
> It says that the colon in Python is purely for readability, and cites
> our FAQ entry
> http://www.python.org/doc/faq/general.html#why-are-colons-required-fo...
> .
> Ho
I was just perusing a Wikipedia entry on the "off side rule" at
http://en.wikipedia.org/wiki/Off-side_rule .
It says that the colon in Python is purely for readability, and cites
our FAQ entry
http://www.python.org/doc/faq/general.html#why-are-colons-required-fo...
.
However, near the top of the A
i was just perusing a Wikipedia entry on the "off side rule" at
http://en.wikipedia.org/wiki/Off-side_rule .
It says that the colon in Python is purely for readability, and cites
our FAQ entry
http://www.python.org/doc/faq/general.html#why-are-colons-required-for-the-if-while-def-class-statements
13 matches
Mail list logo