I am currently writing a paper on python fundamentals and I need some help on it as I could not find a single consistent definition for Attribute
class Person:
def __init__(self,weight):
self.weight = weight
An attribute is something that describes an object for example weight = 75. In this case, what is an attribute exactly is it 75 or is it weight(the variable) or is the combination of both the variable and the value.
Some people say attribute is the data stored in the object, which is correct if we consider 75 to be an attribute.
Some people call attribute to be instance and class variables that store data pertaining to the class and the instance, which is correct if we consider weight to be an attribute(the variable name)
Some call attribute the combination of name and a value which means weight = 75 as a whole becomes the attribute
All the above definitions are slightly different if we go by their literal meaning and people use them interchangeably
Am I missing something??
I just need to be sure before I send the draft to my HOD
Thank you, everyone
Please do take good care of yourself and avoid traveling as much as possible Chyanit