+ 1
Waht is the definition of "object" in python?
Is there is any difference between objects in a class and normal objects
3 Respuestas
+ 4
Everything in python is an object,
It means you can store them,you can assign them to a variable,
You can cteate an instance and so on,
And in python 2 every class should inherit from the object class.
0
Could you please explain you're question? If you are coming from javaScript then a javascript 'object' is sort of like a python dictionary. Normal python objects don't really have a direct js equivalence, although in python everything is an object. You can access an object as a dictionary by using the __dict__ property on any object.
0
An object is an instance of a class. You can think of a class as type to an object. Just like the the object ”X99” has the type str (string).
Not everything in Python are objects. Variables, for instance, are references.