On 02/07/2010 09:32 PM, Jim Bosch wrote:
On Sun, 2010-02-07 at 11:47 +0100, Murray Cumming wrote:
And what's the correct way to check for PyNone other than
   if (obj == boost::python::object())
?

I think that's the standard way.  I suppose

if (obj.ptr() == Py_None)

might be faster on some compilers, but it's almost certainly not worth
worrying about.

if (obj) ...

is definitely the right way to do it.

    Stefan

--

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to