What do you mean by 'cannot modify built-in classes' in Ruby? You can monkey-patch any class in Ruby. What could 'modifying' do that monkey-patching can't?
I agree - as a concrete example, ActiveSupport adds days to Numbers (or maybe just to integers) so you can say things like 3.days.ago and get and answer that's the same as Time.now - 72.hours (hours is another patch on numbers to handle the conversion).
I suspect that might just have been a typo? I'm not familiar enough with Python to say if it's just those two columns are transposed. Can you modify/override List's __getitem__ in python to change how element access by offset works?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What do you mean by 'cannot modify built-in classes' in Ruby? You can monkey-patch any class in Ruby. What could 'modifying' do that monkey-patching can't?
I agree - as a concrete example, ActiveSupport adds
days
to Numbers (or maybe just to integers) so you can say things like3.days.ago
and get and answer that's the same asTime.now - 72.hours
(hours is another patch on numbers to handle the conversion).I suspect that might just have been a typo? I'm not familiar enough with Python to say if it's just those two columns are transposed. Can you modify/override List's __getitem__ in python to change how element access by offset works?