MIN Mark unused variable as unused

Silences compiler warnings
ENH Convert std::bad_alloc to Python::MemoryError

Minor, but it is slightly more informative on the Python side