inheritance in js/python