Everything is an object in python - object class and type class

Jon Ribbens jon+usenet at unequivocal.co.uk
Tue Jun 2 14:10:38 EDT 2015


On 2015-06-02, BartC <bc at freeuk.com> wrote:
> On 02/06/2015 18:00, Steven D'Aprano wrote:
>> Again, this is not relevant. Javascript is dynamically typed, but some
>> values are machine primitives and other values are objects. The interpreter
>> keeps track of this at runtime.
>
> Javascript primitives include Number and String.
>
> What does Python allow to be done with its Number (int, etc) and String 
> types that can't be done with their Javascript counterparts, that makes 
> /them/ objects?

The fact that they are, er, objects? They are instances of classes,
they have methods that you can call, you can create subclasses, etc?



More information about the Python-list mailing list