Update base.py

inheritance