@@ -40,18 +40,23 @@ Introduction
4040------------
4141
4242``boost/parameter/python.hpp `` introduces a group of **def_visitors ** that can
43- be used to easily expose Boost.Parameter enabled member functions to Python via
43+ be used to easily expose Boost.Parameter- enabled member functions to Python with
4444Boost.Python. It also provides a function template ``def() `` that can be used
45- to expose Boost.Parameter enabled free functions.
45+ to expose Boost.Parameter-enabled free functions.
46+
47+ .. Need a link from "def_visitors" to the place in Python docs
48+ .. where that's defined.
4649
4750 concept |KeywordsSpec |
4851----------------------
4952
5053A |KeywordsSpec | is an MPL sequence where each element is either:
5154
52- * A *required * keyword tag, ``K ``
53- * **or **, an *optional * keyword tag, ``K* ``
54- * **or **, a *special * keyword tag ``K** ``
55+ * A *required * keyword tag of the form ``K ``
56+ * **or **, an *optional * keyword tag of the form ``K* ``
57+ * **or **, a *special * keyword tag of the formn ``K** ``
58+
59+ .. here you have to say, "where K is..."
5560
5661 The **arity range ** of a |KeywordsSpec | is determined by:
5762
@@ -62,22 +67,44 @@ The **arity range** of a |KeywordsSpec| is determined by:
6267 For example, the **arity range ** of ``mpl::vector2<x,y> `` is 2, the **arity range ** of
6368``mpl::vector2<x,y*> `` is 2 and the **arity range ** of ``mpl::vector2<x,y**> `` is 1.
6469
70+ .. It makes no sense to say that the "range" of something is x,
71+ .. where x is just a number. A range goes from x to y. I don't
72+ .. know what this is supposed to mean. I also don't know what the
73+ .. comma in the definition means, or why I don't see it in the
74+ .. results above. I'd have guessed that the arity range of
75+ .. vector2<x,y**> was [1,2] ... which makes some sense.
76+
6577 *special * keyword tags
6678---------------------------------
6779
6880If the default type for an argument is not convertible to the argument type, as
6981specified to the binding functions below, that argument must be specified as a
7082*special * argument.
7183
84+ .. This whole thing comes out of order. You need to explain that
85+ .. to bind pararameter-endabled functions to python you need to
86+ .. specify an parameter type (not an argument type), and that an
87+ .. optional argument has to have a default value _and_ type.
88+ .. I think. If that's not the right explanation, you need to say
89+ .. something that sets up similar context.
90+
7291 In the example below the default type for argument ``y `` is ``char const[5] ``, but
7392the argument type is ``int ``. Therefore ``y `` must be specified as a *special *
7493argument in the |KeywordsSpec |.
7594
95+ .. The example below doesn't make any sense to me. Where does char
96+ .. const[5] come from? Why would I choose a different argument
97+ .. type from a default type. What is the effect on the resulting
98+ .. Python interface?
99+
76100 Doing this will generate N^2 overloads, where N is the number of *special * arguments.
77101In this case two overloads will be generated, one with ``y `` included and one without.
78102Having many *special * keywords will result in lots of overloads, and stress the
79103compiler.
80104
105+ .. using "this" without an antecedent above. What are we "doing?"
106+ .. Don't you mean 2^N?
107+
81108 Note that this makes the *arity range * ``[1,2] ``, so we'll need two forwarding overloads.
82109
83110.. parsed-literal ::
@@ -118,6 +145,12 @@ Note that this makes the *arity range* ``[1,2]``, so we'll need two forwarding o
118145 }
119146
120147
148+ .. You don't explain what those boost::type<void> things are all
149+ .. about.
150+ .. Weren't we going to generate the f_fwd struct ourselves?
151+ .. I don't think this code has been tested. I see the identifier
152+ .. "fwd" above, which surely must be wrong.
153+
121154------------------------------------------------------------------------------
122155
123156class template ``init ``
0 commit comments