[docs] [issue35155] Clarify Protocol Handlers in urllib.request Docs

Cheryl Sabella report at bugs.python.org
Tue Feb 12 17:32:24 EST 2019


Cheryl Sabella <cheryl.sabella at gmail.com> added the comment:

I don't think there is anything specifically defined for a placeholder.  However, looking at the current urllib.request documentation, there are 2 places that use the ``<name>_`` method for a placeholder - <protocol>.proxy and <scheme>.proxy, with the latter explaining what <scheme> means.

> By default, ProxyHandler uses the environment variables named <scheme>_proxy, where <scheme> is the URL scheme involved.

That line was added by Georg Brandl (granted it was part of converting all the docs), which would lead me to believe that is the accepted way to do it.

Also, the argument clinic how-to has the following:
> The length of the string will be passed in to the impl function, just after the string parameter, as a parameter named ``<parameter_name>_length``.

I'll make a comment on the PR too.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35155>
_______________________________________


More information about the docs mailing list