mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
Fixed some type-os
This commit is contained in:
@@ -101,7 +101,7 @@ background information about Python, then focuses on next steps.
|
||||
|
||||
--------------------------------------
|
||||
|
||||
Contibution notes and legal information are here (for those interested).
|
||||
Contribution notes and legal information are here (for those interested).
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
@@ -91,7 +91,7 @@ The following command lists all available minion hosts, using the ping module.
|
||||
|
||||
$ salt '*' test.ping
|
||||
|
||||
The host filtering is acomplished by matching the minion id, or using the grains system.
|
||||
The host filtering is accomplished by matching the minion id, or using the grains system.
|
||||
The `grains <http://docs.saltstack.org/en/latest/topics/targeting/grains.html>`_ system
|
||||
uses static host information like the operating system version or the CPU architecture to
|
||||
provide a host taxonomy for the salt modules.
|
||||
|
||||
@@ -40,7 +40,7 @@ Gtk
|
||||
---
|
||||
PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library
|
||||
itself, it is currently licensed under the GNU LGPL. It is worth noting that
|
||||
PyGTK only currenty supports the Gtk-2.X API (NOT Gtk-3.0). It is currently
|
||||
PyGTK only currently supports the Gtk-2.X API (NOT Gtk-3.0). It is currently
|
||||
recommended that PyGTK is not used for new projects and existing applications
|
||||
be ported from PyGTK to PyGObject.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ The GIL
|
||||
|
||||
`The GIL`_ (Global Interpreter Lock) is how Python allows multiple threads to
|
||||
operate at the same time. Python's memory management isn't entirely thread-safe,
|
||||
so the GIL is requried to prevents multiple threads from running the same
|
||||
so the GIL is required to prevents multiple threads from running the same
|
||||
Python code at once.
|
||||
|
||||
David Beazley has a great `guide`_ on how the GIL operates. He also covers the
|
||||
@@ -51,7 +51,7 @@ Python application requires a strong understanding of the GIL, how it affects
|
||||
your specific application, how many cores you have, and where your application
|
||||
bottlenecks are.
|
||||
|
||||
C Extentions
|
||||
C Extensions
|
||||
------------
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ clearer construct is sufficient to express the function's intention.
|
||||
It is up to the programmer writing the function to determine which arguments
|
||||
are positional arguments and which are optional keyword arguments, and to
|
||||
decide whether to use the advanced techniques of arbitrary argument passing. If
|
||||
the advices above are followed wisely, it is possible and enjoyable to write
|
||||
the advice above is followed wisely, it is possible and enjoyable to write
|
||||
Python functions that are:
|
||||
|
||||
* easy to read (the name and arguments need no explanations)
|
||||
|
||||
@@ -290,7 +290,7 @@ always returns the same result (but only for the duration of the test).
|
||||
# get_search_results runs a search and iterates over the result
|
||||
self.assertEqual(len(myapp.get_search_results(q="fish")), 3)
|
||||
|
||||
Mock has many other ways you can configure it and control its behaviour.
|
||||
Mock has many other ways you can configure it and control its behavior.
|
||||
|
||||
`mock <http://www.voidspace.org.uk/python/mock/>`_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user