mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Update URLs in comments and metadata to use HTTPS (GH-27458)
This commit is contained in:
parent
ea4673ed07
commit
be42c06bb0
39 changed files with 58 additions and 58 deletions
|
@ -1795,7 +1795,7 @@ Function and class definitions
|
|||
* ``bases`` is a list of nodes for explicitly specified base classes.
|
||||
* ``keywords`` is a list of :class:`keyword` nodes, principally for 'metaclass'.
|
||||
Other keywords will be passed to the metaclass, as per `PEP-3115
|
||||
<http://www.python.org/dev/peps/pep-3115/>`_.
|
||||
<https://www.python.org/dev/peps/pep-3115/>`_.
|
||||
* ``starargs`` and ``kwargs`` are each a single node, as in a function call.
|
||||
starargs will be expanded to join the list of base classes, and kwargs will
|
||||
be passed to the metaclass.
|
||||
|
|
|
@ -171,7 +171,7 @@ Functions and classes provided:
|
|||
from contextlib import closing
|
||||
from urllib.request import urlopen
|
||||
|
||||
with closing(urlopen('http://www.python.org')) as page:
|
||||
with closing(urlopen('https://www.python.org')) as page:
|
||||
for line in page:
|
||||
print(line)
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ The :mod:`functools` module defines the following functions:
|
|||
@lru_cache(maxsize=32)
|
||||
def get_pep(num):
|
||||
'Retrieve text of a Python Enhancement Proposal'
|
||||
resource = 'http://www.python.org/dev/peps/pep-%04d/' % num
|
||||
resource = 'https://www.python.org/dev/peps/pep-%04d/' % num
|
||||
try:
|
||||
with urllib.request.urlopen(resource) as s:
|
||||
return s.read()
|
||||
|
|
|
@ -931,8 +931,8 @@ form.
|
|||
This is useful if you want to match an arbitrary literal string that may
|
||||
have regular expression metacharacters in it. For example::
|
||||
|
||||
>>> print(re.escape('http://www.python.org'))
|
||||
http://www\.python\.org
|
||||
>>> print(re.escape('https://www.python.org'))
|
||||
https://www\.python\.org
|
||||
|
||||
>>> legal_chars = string.ascii_lowercase + string.digits + "!#$%&'*+-.^_`|~:"
|
||||
>>> print('[%s]+' % re.escape(legal_chars))
|
||||
|
|
|
@ -39,7 +39,7 @@ parameters: ``-n`` opens the URL in a new browser window, if possible;
|
|||
``-t`` opens the URL in a new browser page ("tab"). The options are,
|
||||
naturally, mutually exclusive. Usage example::
|
||||
|
||||
python -m webbrowser -t "http://www.python.org"
|
||||
python -m webbrowser -t "https://www.python.org"
|
||||
|
||||
The following exception is defined:
|
||||
|
||||
|
@ -176,7 +176,7 @@ Notes:
|
|||
|
||||
Here are some simple examples::
|
||||
|
||||
url = 'http://docs.python.org/'
|
||||
url = 'https://docs.python.org/'
|
||||
|
||||
# Open URL in a new tab, if a browser window is already open.
|
||||
webbrowser.open_new_tab(url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue