+ 1

Waht is the definition of "object" in python?

Is there is any difference between objects in a class and normal objects

6th Jul 2020, 1:46 PM
Hari Krishna Sahu
Hari Krishna Sahu - avatar
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.
6th Jul 2020, 3:53 PM
Sadness
Sadness - avatar
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.
6th Jul 2020, 3:54 PM
Zachiah sawyer
Zachiah sawyer - avatar
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.
6th Jul 2020, 8:12 PM
Per Bratthammar
Per Bratthammar - avatar