Skip to content

Tag Archives: python-object

We all know a very common drawback of Python when compared to programming languages such as C or C++. It is significantly slower and isn’t… Read More
with statement in Python is used in exception handling to make the code cleaner and much more readable. It simplifies the management of common resources… Read More
In Python shelve you access the keys randomly. In order to access the keys randomly in python shelve we use open() function. This function works… Read More
In python, each variable to which we assign a value/container is treated as an object. Object in itself is a class. Let’s discuss the properties… Read More
setattr() is used to assign the object attribute its value. Apart from ways to assign values to class variables, through constructors and object functions, this… Read More
getattr() function is used to access the attribute value of an object and also give an option of executing the default value in case of… Read More
hasattr() is an inbuilt utility function in Python which is used in many day-to-day programming applications. Its main task is to check if an object… Read More