Update d/base.py