mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Fix redirected and broken links
This commit is contained in:
@@ -70,9 +70,9 @@ this in your ``__init__.py``:
|
||||
Logging in an Application
|
||||
*************************
|
||||
|
||||
The `twelve factor app <http://12factor.net>`_, an authoritative reference
|
||||
The `twelve factor app <https://12factor.net>`_, an authoritative reference
|
||||
for good practice in application development, contains a section on
|
||||
`logging best practice <http://12factor.net/logs>`_. It emphatically
|
||||
`logging best practice <https://12factor.net/logs>`_. It emphatically
|
||||
advocates for treating log events as an event stream, and for
|
||||
sending that event stream to standard output to be handled by the
|
||||
application environment.
|
||||
@@ -192,9 +192,9 @@ Example Configuration Directly in Code
|
||||
logger.debug('often makes a very good meal of %s', 'visiting tourists')
|
||||
|
||||
|
||||
.. _basic logging tutorial: http://docs.python.org/howto/logging.html#logging-basic-tutorial
|
||||
.. _logging configuration: https://docs.python.org/howto/logging.html#configuring-logging
|
||||
.. _logging tutorial: http://docs.python.org/howto/logging.html
|
||||
.. _configuring logging for a library: https://docs.python.org/howto/logging.html#configuring-logging-for-a-library
|
||||
.. _log record: https://docs.python.org/library/logging.html#logrecord-attributes
|
||||
.. _basic logging tutorial: http://docs.python.org/3/howto/logging.html#logging-basic-tutorial
|
||||
.. _logging configuration: https://docs.python.org/3/howto/logging.html#configuring-logging
|
||||
.. _logging tutorial: http://docs.python.org/3/howto/logging.html
|
||||
.. _configuring logging for a library: https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library
|
||||
.. _log record: https://docs.python.org/3/library/logging.html#logrecord-attributes
|
||||
.. _requests source: https://github.com/kennethreitz/requests
|
||||
|
||||
@@ -271,7 +271,7 @@ Idioms
|
||||
|
||||
A programming idiom, put simply, is a *way* to write code. The notion of
|
||||
programming idioms is discussed amply at `c2 <http://c2.com/cgi/wiki?ProgrammingIdiom>`_
|
||||
and at `Stack Overflow <http://stackoverflow.com/questions/302459/what-is-a-programming-idiom>`_.
|
||||
and at `Stack Overflow <https://stackoverflow.com/questions/302459/what-is-a-programming-idiom>`_.
|
||||
|
||||
Idiomatic Python code is often referred to as being *Pythonic*.
|
||||
|
||||
@@ -403,7 +403,7 @@ hand, the hash of the item will tell Python where in the set to look for
|
||||
a matching item. As a result, the search can be done quickly, even if the
|
||||
set is large. Searching in dictionaries works the same way. For
|
||||
more information see this
|
||||
`StackOverflow <http://stackoverflow.com/questions/513882/python-list-vs-dict-for-look-up-table>`_
|
||||
`StackOverflow <https://stackoverflow.com/questions/513882/python-list-vs-dict-for-look-up-table>`_
|
||||
page. For detailed information on the amount of time various common operations
|
||||
take on each of these data structures, see
|
||||
`this page <https://wiki.python.org/moin/TimeComplexity?>`_.
|
||||
@@ -496,7 +496,7 @@ Then run it on a file or series of files to get a report of any violations.
|
||||
optparse.py:472:29: E221 multiple spaces before operator
|
||||
optparse.py:544:21: W601 .has_key() is deprecated, use 'in'
|
||||
|
||||
The program `autopep8 <https://pypi.python.org/pypi/autopep8/>`_ can be used to
|
||||
The program `autopep8 <https://pypi.org/project/autopep8/>`_ can be used to
|
||||
automatically reformat code in the PEP 8 style. Install the program with:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
@@ -274,7 +274,7 @@ This way if you ever switch to a newer Python version and no longer need the
|
||||
unittest2 module, you can simply change the import in your test module without
|
||||
the need to change any other code.
|
||||
|
||||
`unittest2 <http://pypi.python.org/pypi/unittest2>`_
|
||||
`unittest2 <http://pypi.org/project/unittest2>`_
|
||||
|
||||
|
||||
mock
|
||||
|
||||
Reference in New Issue
Block a user