Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-27 20:52:52

----- Original Message -----
From: "Mark Evans" <mark.evans_at_[hidden]>

> David,
> Another neat thing about the CXX classes is that they throw
> exceptions -- all the way back into Python -- from their
> constructors if the constructor arguments are wrong.

I assume you're speaking of the CXX wrappers for the Python built-in types
(e.g. tuple). Py_cpp does the same thing when the type is used as an
argument to a C++ function which is exposed in Python. For other situations,
I made a different design choice, under the assumption that it was probably
a programming error to construct a py::Tuple from a python object which was
not a tuple. For those situations, I have been using assert(). I am open to
discussion about this decision. In any case I think it would probably be a
very good idea to throw an exception back into Python after assert()ing so
that users will at least be protected when the code is compiled in Release


Boost list run by bdawes at, gregod at, cpdaniel at, john at