diff --git a/doc/tutorial/doc/call_policies.html b/doc/tutorial/doc/call_policies.html index bfc2726d..4f836700 100644 --- a/doc/tutorial/doc/call_policies.html +++ b/doc/tutorial/doc/call_policies.html @@ -142,7 +142,7 @@ or more policies can be composed by chaining. Here's the general syntax:

Here is the list of predefined call policies. A complete reference detailing -these can be found +these can be found here.

diff --git a/doc/tutorial/doc/class_data_members.html b/doc/tutorial/doc/class_data_members.html index 4718880c..39847ba8 100644 --- a/doc/tutorial/doc/class_data_members.html +++ b/doc/tutorial/doc/class_data_members.html @@ -56,12 +56,11 @@ Then, in Python:

Note that name is exposed as read-only while value is exposed as read-write.

-    >>> x.name = 'e' #can't change name
+    >>> x.name = 'e' # can't change name
     Traceback (most recent call last):
       File "<stdin>", line 1, in ?
-    AttributeError: can't set attribute
-
-
+ AttributeError: can't set attribute +
diff --git a/doc/tutorial/doc/class_virtual_functions.html b/doc/tutorial/doc/class_virtual_functions.html index 6ce22d62..6116678a 100644 --- a/doc/tutorial/doc/class_virtual_functions.html +++ b/doc/tutorial/doc/class_virtual_functions.html @@ -92,15 +92,16 @@ polymorphically fromC++.

Wrapping Base and the free function call_f:

-    class_<Base, BaseWrap, noncopyable>("Base", no_init)
+    class_<Base, BaseWrap, boost::noncopyable>("Base", no_init)
         ;
     def("call_f", call_f);
 

Notice that we parameterized the class_ template with BaseWrap as the second parameter. What is noncopyable? Without it, the library will try -to instantiate a copy constructor for returning Base objects from -functions.

+to create code for converting Base return values of wrapped functions to +Python. To do that, it needs Base's copy constructor... which isn't +available, since Base is an abstract class.

In Python, let us try to instantiate our Base class:

diff --git a/doc/tutorial/doc/constructors.html b/doc/tutorial/doc/constructors.html
index 621387f5..79237526 100644
--- a/doc/tutorial/doc/constructors.html
+++ b/doc/tutorial/doc/constructors.html
@@ -64,7 +64,7 @@ expose instead.

init<std::string>() exposes the constructor taking in a std::string (in Python, constructors are spelled -"__init__(...)").

+""__init__"").

We can expose additional constructors by passing more init<...>s to the def() member function. Say for example we have another World diff --git a/doc/tutorial/doc/derived_object_types.html b/doc/tutorial/doc/derived_object_types.html index 1372595f..54ffccb3 100644 --- a/doc/tutorial/doc/derived_object_types.html +++ b/doc/tutorial/doc/derived_object_types.html @@ -70,18 +70,21 @@ member functions.

Demonstrates that you can write the C++ equivalent of "format" % x,y,z in Python, which is useful since there's no easy way to do that in std C++.

-
- - - -
- Beware the common pitfall of -forgetting that the constructors of most of Python's mutable types -make copies, just as in Python.

- - dict d(x.attr("__dict__")); # makes a copy of x's dict
- d['whatever'] = 3; # modifies a copy of x.__dict__ (not the original)
-
+

+ Beware the common pitfall of forgetting that the constructors +of most of Python's mutable types make copies, just as in Python.

+

+Python:

+
+    >>> d = dict(x.__dict__)     #copies x.__dict__
+    >>> d['whatever']            #modifies the copy
+
+

+C++:

+
+    dict d(x.attr("__dict__"));  #copies x.__dict__
+    d['whatever'] = 3;           #modifies the copy
+

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/v2/acknowledgments.html b/doc/v2/acknowledgments.html index c0c47d29..5f149a64 100644 --- a/doc/v2/acknowledgments.html +++ b/doc/v2/acknowledgments.html @@ -39,31 +39,29 @@ Grosse-Kunstleve implemented the pickle support, and has enthusiastically supported the library since its birth, contributing to design decisions and providing invaluable - real-world insight into user requirements. Ralf has written some - extensions for converting C++ containers that I hope will be incorporated - into the library soon. He also implemented the cross-module support in - the first version of Boost.Python. More importantly, Ralf makes sure - nobody forgets the near-perfect synergy of C++ and Python for solving the - problems of large-scale software construction.

+ real-world insight into user requirements. Ralf has written some extensions for converting C++ containers that I + hope will be incorporated into the library soon. He also implemented the + cross-module support in the first version of Boost.Python. More + importantly, Ralf makes sure nobody forgets the near-perfect synergy of + C++ and Python for solving the problems of large-scale software + construction.

-

Aleksey - Gurtovoy wrote an incredible C++ Template Metaprogramming - Library which allows Boost.Python to perform much of its - compile-time magic. In addition, Aleksey very generously - contributed his time and deep knowledge of the quirks of various - buggy compilers to help us get around problems at crucial moments. +

Aleksey Gurtovoy + wrote an incredible C++ Template + Metaprogramming Library which allows Boost.Python to perform much of + its compile-time magic. In addition, Aleksey very generously contributed + his time and deep knowledge of the quirks of various buggy compilers to + help us get around problems at crucial moments.

-

Paul - Mensonides, building on the work Vesa Karvonen, - wrote a similarly amazing Preprocessor Metaprogramming - Library, and generously contributed the time and expertise to - get it working in the Boost.Python library, rewriting much of - Boost.Python to use the new preproccessor metaprogramming - constructs and helping us to work around buggy and slow C++ - preprocessors. +

Paul Mensonides, + building on the work Vesa + Karvonen, wrote a similarly amazing Preprocessor Metaprogramming + Library, and generously contributed the time and expertise to get it + working in the Boost.Python library, rewriting much of Boost.Python to + use the new preproccessor metaprogramming constructs and helping us to + work around buggy and slow C++ preprocessors.

Achim Domma contributed some of the Object Wrappers and