[C++-sig] object, handle<>, .ptr(), PyObject*
Ralf W. Grosse-Kunstleve
rwgk at yahoo.com
Sun Jun 23 12:11:12 CEST 2002
Consider these fragments from the latest CVS:
template <class T>
class handle
{
// ...
T* get() const;
// ...
};
class object : // ...
{
// ...
handle<> const& ptr() const;
// ...
};
To a novice it will be very confusing that object::ptr() returns
a handle<>. I'd expect that ptr() must be PyObject*, but in fact
another .get() is required to obtain that.
I'd find it significantly less misleading of we had object::hdl().
Ralf
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the Cplusplus-sig
mailing list