TallJimbo/bp3 — Issue #11: simplify handle<> and avoid raw PyObject*
Author: TallJimbo
Created: 2012-02-12 18:01:26+00:00
State: open

The `handle<>` template is a `PyObject`-specific smart pointer that can be templated over `PyObject` subclasses (which are not C++ subclasses). The template feature is very rarely used, and should be removed to simplify the class and make it easier to use elsewhere.

In addition, the internals of Boost.Python don't consistently prefer `handle` over using raw `PyObject*` with manual reference counting. While we can't avoid dealing with `PyObject*` at some level, any part of the code that users may want to extend should use `handle` (or `object` if possible), and we should generally avoid raw `PyObject` even in pure-internal code.