Re: Allowing comments after the line continuation backslash

2010-11-10 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message 878w12kt5x.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: 2. The MainWindow class only has the `Window' attribute described in its definition. Apparently there are other attributes as well (the

Re: Allowing comments after the line continuation backslash

2010-11-10 Thread Robert Kern
On 11/10/10 12:26 AM, Lawrence D'Oliveiro wrote: In messagemailman.793.1289347547.2218.python-l...@python.org, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. Keeping

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: In message 87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: for descr, attr, colours in [ ('normal', 'image','Normal'), ('highlighted', 'highlight','Highlighted'),

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Robert Kern
On 11/9/10 4:51 PM, Mark Wooding wrote: Lawrence D'Oliveirol...@geek-central.gen.new_zealand writes: In message87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: for descr, attr, colours in [ ('normal', 'image','Normal'), ('highlighted',

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Tim Chase
On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also makes diff's much easier to read (my big impetus for doing the same as Robert) -tkc --

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Mark Wooding
Tim Chase python.l...@tim.thechases.com writes: On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also makes diff's much easier to read (my

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Tim Chase
On 11/09/10 19:39, Mark Wooding wrote: Tim Chasepython.l...@tim.thechases.com writes: It also makes diff's much easier to read Hmm. That's a good point, actually. I'm not overly fussed about the ease of editing: it doesn't seem especially hard either way. But nice diffs are definitely

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Robert Kern
On 2010-11-09 19:39 , Mark Wooding wrote: Tim Chasepython.l...@tim.thechases.com writes: On 11/09/10 18:05, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. It also

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.793.1289347547.2218.python-l...@python.org, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. Keeping all of the items consistent means that in order

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Lawrence D'Oliveiro
In message 878w12kt5x.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Maybe you should look at the code in context https://github.com/ldo/dvd_menu_animator, then you can express some more opinions on how to improve it.

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Neil Cerutti
On 2010-11-06, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,MainWindow.ColorsSelectedList)] Code

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Lawrence D'Oliveiro
In message 87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList),

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Lawrence D'Oliveiro
In message roy-0ed9f0.08443706112...@news.panix.com, Roy Smith wrote: In article ib2vrb$3e...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Steven D'Aprano
On Sun, 07 Nov 2010 19:33:52 +1300, Lawrence D'Oliveiro wrote: for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Mark Wooding
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Not surprising, since the above list has become completely divorced from its original purpose. Anybody remember what that was? It was supposed to be used in a loop, as follows: for \ Description, Attr, ColorList \

Re: Allowing comments after the line continuation backslash

2010-11-06 Thread Lawrence D'Oliveiro
In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney ben+pyt...@benfinney.id.au wrote: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,

Re: Allowing comments after the line continuation backslash

2010-11-06 Thread Steven D'Aprano
On Wed, 03 Nov 2010 12:42:49 +, Neil Cerutti wrote: On 2010-11-03, Ben Finney ben+pyt...@benfinney.id.au wrote: I would do the same, but fix the indentation. Making indentation depend on the *length* of the previous line is needlessly making a maintenance burden. Instead, I'd do::

Re: Allowing comments after the line continuation backslash

2010-11-06 Thread Roy Smith
In article ib2vrb$3e...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney ben+pyt...@benfinney.id.au wrote: styles = [ (normal, image,

Re: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message roy-df73a5.08174603112...@news.panix.com, Roy Smith wrote: http://github.com/ldo/dvd_menu_animator That URL takes me to a github page. Can you be more specific about which file I should be looking at? The extract I previously quoted was from dvd_menu_animator. 2) You have

Re: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message mailman.546.1288771350.2218.python-l...@python.org, Chris Rebert wrote: Actually, my PEP 8 reference was in regards to the (imo, terrible) UseOfCamelCaseForNonClasses (Python != C#), not the formatting of the for-loop; hence the In any case qualification. Hmm ... OK, I might

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Lawrence D'Oliveiro
In message roy-a0f407.20170602112...@news.panix.com, Roy Smith wrote: In article iaq5ro$vp...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Chris Rebert
On Mon, Nov 1, 2010 at 8:15 PM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.469.1288654964.2218.python-l...@python.org, Chris Rebert wrote: desc_attr_colors_triples = ((normal, image, MainWindow.ColorsNormalList),     (highlighted, highlight,

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Roy Smith
In article iar48g$hn...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: I suppose readability is in the eye of the reader, but, yes, I agree that I have split this into two parts. The parts are 1) The table of data 2) The looping construct But the

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Neil Cerutti
On 2010-11-03, Ben Finney ben+pyt...@benfinney.id.au wrote: I would do the same, but fix the indentation. Making indentation depend on the *length* of the previous line is needlessly making a maintenance burden. Instead, I'd do:: styles = [ (normal, image,

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 11:16:46 +1300, Lawrence D'Oliveiro wrote: In message 4cce6ff6.2050...@v.loewis.de, Martin v. Loewis wrote: (in fact, I can't think any situation where I would use the backslash). for \ Description, Attr, ColorList \ in \ (

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Roy Smith
In article mailman.469.1288654964.2218.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: I find the level of deviation from PEP 8 in that file rather disturbing. In any case, the backslashes are easily avoided, and readability improved IMHO, via refactoring:

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Lawrence D'Oliveiro
In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles = [(normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Roy Smith
In article iaq5ro$vp...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles = [(normal, image, MainWindow.ColorsNormalList),

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Ben Finney
Roy Smith r...@panix.com writes: In article iaq5ro$vp...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles = [(normal, image,

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Robert Kern
On 2010-11-02 19:46 , Ben Finney wrote: Instead, I'd do:: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,MainWindow.ColorsSelectedList)] I'd go one step

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Ben Finney
Robert Kern robert.k...@gmail.com writes: I'd go one step further: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,MainWindow.ColorsSelectedList), ]

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.437.1288592002.2218.python-l...@python.org, Yingjie Lan wrote: I would like to have comments after the line continuation backslash. What language allows that? -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Martin v. Loewis
Sorry if I am baking too many ideas today. I am just having trouble with the backslashes I would like to have comments after the line continuation backslash. if a 0 \ #comments for this condition and b 0: #do something here This is currently not OK, but this might be a

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Ulrich Eckhardt
Yingjie Lan wrote: I would like to have comments after the line continuation backslash. if a 0 \ #comments for this condition and b 0: #do something here Historically, and also in Python, the backslash escapes the immediately following character. That means that _nothing_ may

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Steven D'Aprano
On Sun, 31 Oct 2010 23:13:19 -0700, Yingjie Lan wrote: Hi, Sorry if I am baking too many ideas today. I am just having trouble with the backslashes Then don't use them. If you are having so much trouble keeping your lines short, then I suggest you're trying to do too much in one line.

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Neil Cerutti
On 2010-11-01, Martin v. Loewis mar...@v.loewis.de wrote: i.e. avoid the backslash for multi-line conditions altogether (in fact, I can't think any situation where I would use the backslash). The horrible-to-nest with statement. -- Neil Cerutti --

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message 4cce6ff6.2050...@v.loewis.de, Martin v. Loewis wrote: (in fact, I can't think any situation where I would use the backslash). for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList), (highlighted,

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Chris Rebert
On Mon, Nov 1, 2010 at 3:16 PM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 4cce6ff6.2050...@v.loewis.de, Martin v. Loewis wrote: (in fact, I can't think any situation where I would use the backslash).    for \        Description, Attr, ColorList \    in \      

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.469.1288654964.2218.python-l...@python.org, Chris Rebert wrote: desc_attr_colors_triples = ((normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected, select, MainWindow.ColorsSelectedList)) for in