Guido sees the light: PEP 8 updated

Rustom Mody rustompmody at gmail.com
Tue Apr 19 08:55:53 EDT 2016


On Tuesday, April 19, 2016 at 9:41:24 AM UTC+5:30, Random832 wrote:
> On Mon, Apr 18, 2016, at 23:54, Rustom Mody wrote:
> > Start no tabs:
> > if foo# comment that is aligned
> > do some stuff# across multiple indent levels 
> > 
> > Add tabs as leading indents with second line indented 1 tab more
> > (showing tabs as |)
> > |if foo# comment that is aligned
> > ||do some stuff# across multiple indent levels 
> >
> > Indent the first comment with 2 tabs
> > At this point the first comment is/shows lefter than the second
> > 
> > Indent the second with 1 tab -- the two #es now line up
> 
> Yeah but now the second line of code is to the right of the whole first
> line of code. "if foo" must have been too short to illustrate it (it's
> long enough if a tab is four spaces, but I guess it's longer in the
> sample), but I assumed you would get the concept of what I was saying
> and try putting something longer there or try extending the comments in
> the C code the sample preloads.
> 
> Like, it ends up looking like this:
> 
> if foo("what if it's a much longer condition"):                # comment
>                                                  do something  #
>                                                  comment2
> 
> There's no way to get this:
> 
> if foo("what if it's a much longer condition"):  # comment
>     do something                                 # comment2

I get it looking quite nice if I put a tab between "foo" and "("
Is that an acceptable solution?? Dunno...

html tables need all sorts of 'un-table-ifying' options
eg column/row groups, tables within tables and what not.
At which point we cross the point of diminishing returns is not clear 
when we are still armchair discussing.

For something a bit more practical here is emacs (orgtbl mode) doing html tables:
https://www.youtube.com/watch?v=EQAd41VAXWo



More information about the Python-list mailing list