• Yannick Jadoul's avatar
    Check scope's __dict__ instead of using hasattr when registering classes and exceptions (#2335) · 71aea49b
    Yannick Jadoul authored
    * Check scope's __dict__ instead of using hasattr when registering classes and exceptions, to allow registering the same name in a derived class scope
    
    * Extend test_base_and_derived_nested_scope test
    
    * Add tests on error being thrown registering duplicate classes
    
    * Circumvent bug with combination of test_class.py::test_register_duplicate_class and test_factory_constructors.py::test_init_factory_alias
    71aea49b
test_class.cpp 20.4 KB