http://bugs.python.org/review/10716/diff/1852/3477 File Lib/pydoc.py (right): http://bugs.python.org/review/10716/diff/1852/3477#newcode2506 Lib/pydoc.py:2506: items = items, The spaces around the = can ...
http://bugs.python.org/review/10716/diff/1852/3477 File Lib/pydoc.py (right): http://bugs.python.org/review/10716/diff/1852/3477#newcode2508 Lib/pydoc.py:2508: ) > The ) should be closed on the ...
http://bugs.python.org/review/10716/diff/1852/3477
File Lib/pydoc.py (right):
http://bugs.python.org/review/10716/diff/1852/3477#newcode2508
Lib/pydoc.py:2508: )
On 2011/03/11 23:35:54, eric.araujo wrote:
> > The ) should be closed on the previous line.
>
> That’s done on purpose by Ron so that any future addition only adds one line
in
> the diff. I like this style.
I don't think having one more line is a big deal.
http://bugs.python.org/review/10716/diff/1852/3477#newcode2593
Lib/pydoc.py:2593: '{name}</a>')
On 2011/03/11 23:35:54, eric.araujo wrote:
> Why don’t you like it?
Because it's not symmetric, if I want to parse the HTML to get a list of the
packages/modules I'd have to search for two different elements rather that get
them all at once and distinguish them with the class. Anyway it's not a big
deal since no one will probably parse this.
http://bugs.python.org/review/10716/diff/1852/3477#newcode2694
Lib/pydoc.py:2694: )
On 2011/03/11 23:35:54, eric.araujo wrote:
> I don’t see why you said that: The code uses the second style you describe.
In the second style the ) is closed under the 'v' of values, similarly to what
you would do in C, e.g.:
if (cond) {
content here;
}
http://bugs.python.org/review/10716/diff/1852/3477#newcode2710
Lib/pydoc.py:2710: err = str(exc),
On 2011/03/11 23:35:54, eric.araujo wrote:
> This contradicts a previous comment you made :) Except for some special
cases,
> I find the rule in PEP 8 (no spaces around = in function calls) good.
I don't use spaces myself, but it's ok for me if someone prefers to use them in
this case (when there's only a key/value pair per line). Spaces or not, the
style should be consistent.
http://bugs.python.org/review/10716/diff/1852/3476
File Lib/pydoc_data/_pydoc.css (right):
http://bugs.python.org/review/10716/diff/1852/3476#newcode124
Lib/pydoc_data/_pydoc.css:124: dl.module{} /* These are not
used yet. */
On 2011/03/11 23:35:54, eric.araujo wrote:
> Then better not to include them.
According to msg125111 they will be used later.
http://bugs.python.org/review/10716/diff/1852/3478
File Lib/test/test_pydoc.py (right):
http://bugs.python.org/review/10716/diff/1852/3478#newcode424
Lib/test/test_pydoc.py:424: self.assertRaises(ValueError, f, "", "foobar")
These might be better written like:
with self.assertRaises(ValueError):
pydoc._url_handler('', '')
with self.assertRaises(ValueError):
pydoc._url_handler('', 'foobar')
>> That’s done on purpose by Ron so that any future addition only adds
>> one line in the diff. I like this style.
> I don't think having one more line is a big deal.
It’s certainly not a big deal, just a style thing and a minor nicety.
>> I don’t see why you said that: The code uses the second style you
>> describe.
> In the second style the ) is closed under the 'v' of values,
Oh, I didn’t catch that. I agree with you it’s nicer.
>> This contradicts a previous comment you made :) [...]
> [...] Spaces or not, the style should be consistent.
What I was saying :)
>>> These are not used yet. */
>> Then better not to include them.
> According to msg125111 they will be used later.
Fine.
> These might be better written like:
> with self.assertRaises(ValueError):
> pydoc._url_handler('', '')
My preferred style too.
Issue 10716: Modernize pydoc to use CSS
Created 2 years, 3 months ago by rhettinger
Modified 2 years, 3 months ago
Reviewers: ezio.melotti, eric.araujo
Base URL: None
Comments: 33