=<
take into account the different functions that object and handle
perform.
-Exception handling
+Exception handling
-If an exception occurs in the execution of some Python code, the PyRun_String
-function returns a null pointer. Constructing a handle out of this null
-pointer throws error_already_set,
-so basically, the Python exception is automatically translated into a
+If an exception occurs in the execution of some Python code, the PyRun_String
+function returns a null pointer. Constructing a handle out of this null
+pointer throws error_already_set,
+so basically, the Python exception is automatically translated into a
C++ exception when using handle:
try
{
@@ -290,14 +290,13 @@ catch(error_already
// handle the exception in some way
}
-The error_already_set exception class doesn't carry any information in itself.
-To find out more about the Python exception that occurred, you need to use the
-exception handling functions
-of the Python/C API in your catch-statement. This can be as simple as calling
-PyErr_Print() to
-print the exception's traceback to the console, or comparing the type of the
-exception with those of the
-standard exceptions:
+The error_already_set exception class doesn't carry any information in itself.
+To find out more about the Python exception that occurred, you need to use the
+exception handling functions
+of the Python/C API in your catch-statement. This can be as simple as calling
+PyErr_Print() to
+print the exception's traceback to the console, or comparing the type of the
+exception with those of the exceptions:
catch(error_already_set)
{
if (PyErr_ExceptionMatches(PyExc_ZeroDivisionError))
@@ -311,11 +310,11 @@ standard exceptions:
}
}
-(To retrieve even more information from the exception you can use some of the other
+(To retrieve even more information from the exception you can use some of the other
exception handling functions listed here.)
-If you'd rather not have handle throw a C++ exception when it is constructed, you
-can use the allow_null function in the same
+If you'd rather not have handle throw a C++ exception when it is constructed, you
+can use the allow_null function in the same
way you'd use borrowed:
handle<> result((allow_null(PyRun_String(
"5/0"
diff --git a/doc/tutorial/doc/html/python/functions.html b/doc/tutorial/doc/html/python/functions.html
index 6dbf93bd..b8fa2735 100644
--- a/doc/tutorial/doc/html/python/functions.html
+++ b/doc/tutorial/doc/html/python/functions.html
@@ -172,7 +172,7 @@ A reference to y.x is returned
BOOM!
-Call Policies
+Call Policies
Call Policies may be used in situations such as the example detailed above.
In our example, return_internal_reference and with_custodian_and_ward
@@ -335,7 +335,7 @@ are overloaded with a common sequence of initial arguments
-BOOST_PYTHON_FUNCTION_OVERLOADS
+BOOST_PYTHON_FUNCTION_OVERLOADS
Boost.Python now has a way to make it easier. For instance, given a function:
int foo(int a, char b = 1, unsigned c = 2, double d = 3)
@@ -354,7 +354,7 @@ and the maximum number of arguments is 4. The def(...)
automatically add all the foo variants for us:
def("foo", foo, foo_overloads());
-BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
Objects here, objects there, objects here there everywhere. More frequently
than anything else, we need to expose member functions of our classes to
@@ -386,7 +386,7 @@ fourth macro argument). The thin wrappers are all enclosed in a class named
See the overloads reference
for details.
-init and optional
+init and optional
A similar facility is provided for class constructors, again, with
default arguments or a sequence of overloads. Remember init<...>? For example,
@@ -441,7 +441,7 @@ Then...
Notice though that we have a situation now where we have a minimum of zero
(0) arguments and a maximum of 3 arguments.
-Manual Wrapping
+Manual Wrapping
It is important to emphasize however that the overloaded functions must
have a common sequence of initial arguments. Otherwise, our scheme above
diff --git a/doc/tutorial/doc/html/python/hello.html b/doc/tutorial/doc/html/python/hello.html
index 0af79eb3..c8ae53bc 100644
--- a/doc/tutorial/doc/html/python/hello.html
+++ b/doc/tutorial/doc/html/python/hello.html
@@ -26,7 +26,7 @@
-From Start To Finish
+From Start To Finish
Now the first thing you'd want to do is to build the Hello World module and
try it for yourself in Python. In this section, we shall outline the steps
@@ -92,11 +92,11 @@ minimalist bjam script that builds the DL
Before anything else, you should have the bjam executable in your boost
directory or somewhere in your path such that bjam can be executed in
the command line. Pre-built Boost.Jam executables are available for most
-platforms. The complete list of Bjam executables can be found
+platforms. The complete list of Bjam executables can be found
here.
-Let's Jam!
-
+Let's Jam!
+
Here is our minimalist Jamfile:
subproject libs/python/example/tutorial ;
@@ -128,7 +128,7 @@ Finally we declare our hello extension:
;
-Running bjam
+Running bjam
bjam is run using your operating system's command line interpreter.
diff --git a/doc/tutorial/doc/html/python/object.html b/doc/tutorial/doc/html/python/object.html
index 1764e057..c842c3f1 100644
--- a/doc/tutorial/doc/html/python/object.html
+++ b/doc/tutorial/doc/html/python/object.html
@@ -42,7 +42,7 @@ As mentioned, one of the goals of Boost.Python is to provide a
bidirectional mapping between C++ and Python while maintaining the Python
feel. Boost.Python C++ objects are as close as possible to Python. This
should minimize the learning curve significantly.
-
+
@@ -146,7 +146,7 @@ C++:
dict d(x.attr("__dict__")); # copies x.__dict__
d['whatever'] = 3; # modifies the copy
-class_<T> as objects
+
class_<T> as objects
Due to the dynamic nature of Boost.Python objects, any class_<T> may
also be one of these types! The following code snippet wraps the class
diff --git a/doc/tutorial/doc/html/python/techniques.html b/doc/tutorial/doc/html/python/techniques.html
index 3be6d38b..db9c6e11 100644
--- a/doc/tutorial/doc/html/python/techniques.html
+++ b/doc/tutorial/doc/html/python/techniques.html
@@ -102,7 +102,7 @@ actually a Python package. It can be a empty file, but can also perform some
magic, that will be shown later.
Now our package is ready. All the user has to do is put sounds into his
-PYTHONPATH
+PYTHONPATH
and fire up the interpreter:
>>> import sounds.io
>>> import sounds.filters
@@ -212,7 +212,7 @@ BOOST_PYTHON_MODULE(
If we are using the technique from the previous session,
-Creating Packages, we can code directly
+Creating Packages, we can code directly
into geom/_init_.py:
from _geom import *