operator + method
Adds two PyNums, returning a PyNum.
Preserves integer type if both operands are integers.
Implementation
PyNum operator +(PyNum other) {
if (isInt && other.isInt) {
return PyNum.bigInt(_intValue! + other._intValue!);
}
final a = isInt ? _intValue!.toDouble() : _doubleValue!;
final b = other.isInt ? other._intValue!.toDouble() : other._doubleValue!;
return PyNum.double(a + b);
}