+ 1

Use of __del__ in python ?

pls give any examples.

7th May 2017, 10:41 AM
Sriram Chowdary Mellamputi
Sriram Chowdary Mellamputi - avatar
3 Antworten
+ 7
__del__ is one of the 'magic methods' of Python... Its purpose is to be called when object is deleted ( destructor method, as you have the __init__ constructor ) More stuff by checking this link: http://minhhh.github.io/posts/a-guide-to-pythons-magic-methods
7th May 2017, 6:05 PM
visph
visph - avatar
+ 5
It's not really the place for a generic explanation ^^ But you could find some stuff by searching on internet: http://blog.thedigitalcatonline.com/blog/2014/08/21/JUMP_LINK__&&__python__&&__JUMP_LINK-3-oop-part-4-polymorphism/#.WQ_4Dp46_xA
8th May 2017, 4:56 AM
visph
visph - avatar
+ 1
thank you for Visph. It is very useful.. Could you explain what is polymorphism and how to achieve in Python with examples pls.
8th May 2017, 2:55 AM
Sriram Chowdary Mellamputi
Sriram Chowdary Mellamputi - avatar