Added a simple optimization on Cadair's suggestion.
kwargs.get('D0', self.D0) returns 'D0' if it exists in kwargs, or else returns self.D0 as the default value. The if-elif blocks were unnecessary.