I have defined two boost python classes, one inheriting off the other; each with a static member variable of the same name.
Compiled with visual studio 2005 this triggers what I believe to be a subtle bug.

The following is an example of how you might trigger it. I've not compiled this example code so there might be a few typos.

//---------------------------------------------------------------------------------------
// C++ Classes
//---------------------------------------------------------------------------------------
class Base
{
public:
static const wstring Name;
};
const  wstring Base::Name(L"Base");

//---------------------------------------------------------------------------------------
class Derived : public Base
{
public:
static const wstring Name;
};
const  wstring Derived ::Name(L"Derived");

//---------------------------------------------------------------------------------------
// Boost Python Bindings
//---------------------------------------------------------------------------------------
wstring getBaseName()
{
return Base::Name;
}
void exposeBase()
{
py::class_<Base>("Base")
  .add_static_property("Name", &getBaseName)
;
}

//---------------------------------------------------------------------------------------
wstring getDerivedName()
{
return Derived::Name;
}
void exposeDerived()
{
py::class_<Derived, bases<Base> >("Derived")
  .add_static_property("Name", &getDerivedName)
;
}

//---------------------------------------------------------------------------------------
BOOST_PYTHON_MODULE(nmx)
{
exposeBase();
exposeDerived();
}

The affect is for the module to fail midway through loading. An exception is thrown by boost python which is then caught later on by boost python. Any classes exposed after exposeDerived() will not appear in the module.

My workaround for this is to not name the python properties the same name.
I rename "Name" for Base::Name to "Base_Name" and "Name" for Derived::Name to "Derived_Name", this seems to fix it. However it might be useful to throw up a more informative message, or to right something to stderr, it was quite difficult to find.

Luke