Re:Teach Yourself a New Programming Language in 21 Minutes (...
by rmidthun on Tuesday August 20, 2013 @01:13PM
(#6245059)
This is just a guess, but in ruby, you can perform methods directly on any value, such as "3.succ", which returns 4. I don't think that works in Python. Ruby allows you to extend any class with more methods, so you could create your own function and apply it directly to a number. In Python, you would need to pass that number into a function.
E.g. Ruby: (3.7).round opposed to Python round(3.7)
Re:Teach Yourself a New Programming Language in 21 Minutes (...
by afandian on Tuesday August 20, 2013 @04:35AM
(#6242443)
Agreed. Surely all Python objects are (*PyObject)s? Some values, such as integers, are cached in certain cases. But they are all PyObject pointers. Perhaps the author can clarify?
Re:Teach Yourself a New Programming Language in 21 Minutes (...
by coolsunglasses on Tuesday August 20, 2013 @12:18AM
(#6241732)
Might mean __dict__, but it's a silly point to make since underneath that and the rest is *PyObject.
As an expert Python programmer, I don't understand what is meant by this.