Fixed the urls pointing to contribute and fixed some lines that were

longer than 78 characters.
This commit is contained in:
Vincent Zee
2015-02-28 22:23:07 +01:00
parent d6c2c8d16d
commit 5aac29d245
5 changed files with 20 additions and 16 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ How to contribute
This guide is under heavy development. If you would like to contribute, please
see:
http://python-guide.readthedocs.org/en/latest/notes/contribute.html
http://docs.python-guide.org/en/latest/notes/contribute.html
Style Guide
+1 -1
View File
@@ -23,7 +23,7 @@
This guide is the result of the collaboration of
<a href="https://github.com/kennethreitz/python-guide/graphs/contributors">135+ people</a>
around the world, and your contributions
<a href="http://python-guide.readthedocs.org/en/latest/notes/contribute.html">are welcome</a>!
<a href="http://docs.python-guide.org/en/latest/notes/contribute.html">are welcome</a>!
</p>
+6 -5
View File
@@ -40,12 +40,12 @@ of the following components:
done with the product, using one or two extremely simplified use
cases. This is the thirty-second pitch for your project.
- A *tutorial* should show some primary use cases in more detail. The reader will
follow a step-by-step procedure to set-up a working prototype.
- A *tutorial* should show some primary use cases in more detail. The reader
will follow a step-by-step procedure to set-up a working prototype.
- An *API reference* is typically generated from the code (see
:ref:`docstrings <docstring-ref>`). It will list all publicly available interfaces,
parameters, and return values.
:ref:`docstrings <docstring-ref>`). It will list all publicly available
interfaces, parameters, and return values.
- *Developer documentation* is intended for potential contributors. This can
include code convention and general design strategy of the project.
@@ -107,7 +107,8 @@ In Python, *docstrings* describe modules, classes, and functions:
"""Returns the square root of self times self."""
...
In general, follow the comment section of :pep:`8#comments` (the "Python Style Guide").
In general, follow the comment section of :pep:`8#comments` (the "Python Style
Guide").
Commenting Sections of Code
~~~~~~~~~~~~~~~~~~~~~~~~~~~
+9 -7
View File
@@ -6,9 +6,10 @@ avoids surprises. However, there are a few cases that can be confusing to
newcomers.
Some of these cases are intentional but can be potentially surprising. Some
could arguably be considered language warts. In general though, what follows is a collection
of potentially tricky behavior that might seem strange at first glance, but is
generally sensible once you're aware of the underlying cause for the surprise.
could arguably be considered language warts. In general though, what follows
is a collection of potentially tricky behavior that might seem strange at first
glance, but is generally sensible once you're aware of the underlying cause for
the surprise.
.. _default_args:
@@ -139,7 +140,8 @@ completed and ``i`` is left with its final value of 4.
What's particularly nasty about this gotcha is the seemingly prevalent
misinformation that this has something to do with :ref:`lambdas <python:lambda>`
in Python. Functions created with a ``lambda`` expression are in no way special,
and in fact the same exact behavior is exhibited by just using an ordinary ``def``:
and in fact the same exact behavior is exhibited by just using an ordinary
``def``:
.. code-block:: python
@@ -179,6 +181,6 @@ Alternatively, you can use the functools.partial function:
When the Gotcha Isn't a Gotcha
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes you want your closures to behave this way. Late binding is good in lots of
situations. Looping to create unique functions is unfortunately a case where
they can cause hiccups.
Sometimes you want your closures to behave this way. Late binding is good in
lots of situations. Looping to create unique functions is unfortunately a case
where they can cause hiccups.
+3 -2
View File
@@ -48,5 +48,6 @@ To help you choose one for your project, there's a `license chooser <http://choo
+ GPLv2
+ GPLv3
A good overview of licenses with explanations of what one can, cannot, and must do using a particular software can be found at `tl;drLegal <https://tldrlegal.com/>`_.
A good overview of licenses with explanations of what one can, cannot,
and must do using a particular software can be found at
`tl;drLegal <https://tldrlegal.com/>`_.