Minor alterations to capacitance/resistance classes to work around Python 2's limitations.