On Sat, 10 Oct 2020 at 19:28, Tim Peters
Try to spell out what you mean - precisely! - by "this". I can't do that for you. For any plausible way of fleshing it out I've thought of, the answer is "no".
Well, please, don't be so harsh. I'm trying to discuss to someone that co-created Python itself, it's not simple to me :-P
The closest you can get to BigDecimal's behavior "by magic" in Python is to set the context precision to its maximum allowed value.
I think there's another "trick" to get the BigDecimal behaviour. If you read the Javadoc, it says that each operation has a default precision. For example, multiplication a*b has precision = a_scale + b_scale. So, in reality, also BigDecimal has a context with finite precision. The difference is that the default context has a variable precision, depending on the operation. Could Python decimal have something similar, maybe by setting prec = -1?