I do a lot of work with numpy arrays and pytorch tensors, but occasionally throw some native lists around. I naturally want to write <list>.sum(), which would work for these other third-party iterables, but doesn't work for native lists.
It'd be very simple to give the native iterables a .sum() method (as opposed to using the built-in sum(...) function), but maybe there's a reason why this doesn't exist. Or is this just some python quirk? https://azar.pro https://chatrandom.download/
Thanks