3 ms·
Python kind of cheats, though. Not everything is an object -- most low level things like arrays and numbers aren't. Ruby is from the Smalltalk tradition where e
by jhbadger 9y ago
Python kind of cheats, though. Not everything is an object -- most low level things like arrays and numbers aren't. Ruby is from the Smalltalk tradition where everything literally is an object -- and I say that as a good thing. Even the "functions" that you can define are really methods of the Object class -- it just happens to be the case that Object.foo(x) can be abbreviated as foo(x).
- pjmlp 9y agoFor the regular user they behave like objects > import builtins > builtins.int => <class 'future.types.newint.newint'> class myint(int): pass