attributes of an object and is called immediately after an object has been newly created the _del_ (method is invoked when an object is about to be destroyed this method is invoked only when an object is no longer in use it' important to note that the statement del only decrements an object' reference count and doesn' necessarily result in call to this function further details about these methods can be found in table special methods for object creation and destruction method description _new_ (cls [,*args [,**kwargs]] class method called to create new instance called to initialize new instance called when an instance is being destroyed _init_ (self [,*args [,**kwargs]] _del_ (selfthe _new_ (and _init_ (methods are used together to create and initialize new instances when an object is created by calling (args)it is translated into the following stepsx _new_ ( ,argsis isinstance( , ) _init_ (argsin user-defined objectsit is rare to define _new_ (or _del_ ( _new_ (is usually only defined in metaclasses or in user-defined objects that happen to inherit from one of the immutable types (integersstringstuplesand so on_ _del_ (is only defined in situations in which there is some kind of critical resource management issuesuch as releasing lock or shutting down connection object string representation the methods in table are used to create various string representations of an object table special methods for object representation method description _format_ (selfformat_speccreates formatted representation _repr_ (selfcreates string representation of an object _str_ (selfcreates simple string representation the _repr_ (and _str_ (methods create simple string representations of an object the _repr_ (method normally returns an expression string that can be evaluated to re-create the object this is also the method responsible for creating the output of values you see when inspecting variables in the interactive interpreter this method is invoked by the built-in repr(function here' an example of using repr(and eval(togethera [ , , , repr(ab eval(screate list '[ ]turns back into list lib fl ff