From: Fred L. Drake[SMTP:fdrake@cnri.reston.va.us] Robin, Why not:
.. [Party] in module: Dance.Disco.Party
for module attributes, and require that the module name be fully qualified? Or that using just one name is searched for in "current package, global package" order (meaning the "current package" needs to be known, which is not unreasonable).
On second thought, requiring full qualification is probably the best since it requires the least new understanding on the part of the user. And when reading the code this will be the most helpful as relying on the tool's searching rules won't help the reader of the source. And yes the . separator is more appropriate.
We can generalize this a little by using the form:
.. [name] in <namespace-type>[:] <namespace-name>
The colon should be omitable (new word?!); some people may like it for presentation, but it carries no content. Identifying the footer line
I do like it for presentation and to help disambiguate the namespace type from the namespace name itself. Just because it carries no information content doesn't mean it's not mentally useful. And in general I don't like optional tokens.
should be done only on the leading ".." and brackets around the name. <namespace-type> should allow checking the reference to be sure it matches what's found at the target; I expect "class", "module", and "package" might be usable. Perhaps allow "namespace" to signify an namespace of arbitrary type. Overall, this seems like a very reasonable notation.
Agreed. Robin
_______________ DOC-SIG - SIG for the Python Documentation Project send messages to: doc-sig@python.org administrivia to: doc-sig-request@python.org _______________
Friedrich, Robin K writes:
On second thought, requiring full qualification is probably the best since it requires the least new understanding on the part of the user. And when reading the code this will be the most helpful as relying on the tool's searching rules won't help the reader of the source.
And yes the . separator is more appropriate. ... I do like it for presentation and to help disambiguate the namespace type from the namespace name itself. Just because it carries no information content doesn't mean it's not mentally useful. And in
Fully-qualified names is fine by me. I'd rather not have to use the colon; it seems distinctly different from the way things get described in the Python Library Reference (where phrases like "in module frobnaltz" are added to index entries, for instance). But I could live with it. It sounds like we're in reasonable agreement on this. Comments from anyone else? -Fred -- Fred L. Drake, Jr. fdrake@cnri.reston.va.us Corporation for National Research Initiatives 1895 Preston White Drive Reston, VA 20191-5434 _______________ DOC-SIG - SIG for the Python Documentation Project send messages to: doc-sig@python.org administrivia to: doc-sig-request@python.org _______________
"Fred L. Drake" wrote:
Comments from anyone else?
I like it - and I like having the colon optional. I agree that it feels more natural to just have "in module foo.bar" rather than "in module: foo.bar" - it just scans a little easier. Richard _______________ DOC-SIG - SIG for the Python Documentation Project send messages to: doc-sig@python.org administrivia to: doc-sig-request@python.org _______________
participants (3)
-
Fred L. Drake -
Friedrich, Robin K -
richard.jones@bom.gov.au