10 Nov
2011
10 Nov
'11
2:40 a.m.
Masklinn wrote:
That makes no sense.
I think it does. I could write code relying on the math.XXX failing for types other than the built in numeric types, or for particular exceptions for particular calls. Also, if you override a standard module as a quick way to get existing code working, you can get lots of existing code paths which might fail in interesting ways, especially if there weren't unit tests for these cases. It would make more sense if the possibility was documented in the math documentation. If you go and change the behaviour of built-in functions just by importing a module it could lead to some weird bugs. I know monkey patching can do this currently, but doing it by default seems dangerous to me. Jeremy