From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-18 19:58:05
----- Original Message -----
Sent: Wednesday, July 18, 2001 5:57 PM
Subject: [boost] Boost.Python Rich Comparisons
> I have completed the integration of Python 2.1 Rich Comparisons
> into Boost.Python. The documentation is in the boost_python_richcmp
> CVS branch, but can also be viewed at this URL:
Cool! The only thing that's the slightest bit unclear here is whether
NotImplemented is supplied by boost or by the user, and if it's not supplied
by boost, why not?
> Links to three examples are at the bottom of the document.
> See also the (fairly minor) changes to:
The DVECT_BINARY_OPERATORS macro is a little ugly. Couldn't something be
done with templates and std::less<double>, std::less_equal<double>, etc...?
Why do you need to tell python explicitly that < <= >= and > are not
implemented with later python versions? It seems as though the fact that
you've defined == and != with this line:
should be enough.
Whoa! I'm overwhelmed by the number of macros in this example. Macros aren't
bad in and of themselves, but they're usually better avoided... for so many
reasons... not the least of which is that especially in examples they tend
to obscure what's going on.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk