+ 2

How to delete a function

Is it possible to delete a function? If yes, How? and Why will someone want to delete it?

1st Aug 2019, 11:48 AM
Joseph Ojo
Joseph Ojo - avatar
3 Antworten
+ 10
def f() : print(l) del(f) It is necessary to free memory.
1st Aug 2019, 11:52 AM
Mikhail Gorchanyuk
Mikhail Gorchanyuk - avatar
+ 6
Yes it is possible.... refer to this resource at stackoverflow: https://stackoverflow.com/questions/22675968/how-delete-functions-on-JUMP_LINK__&&__python__&&__JUMP_LINK as to why because in a multiple cycle run rather a loop of sorting or a while we may not need certain functions or files to run over and over so you delete them which inturn may also speed up processing in a batch...
1st Aug 2019, 12:46 PM
BroFar
BroFar - avatar
+ 1
Yes it is possible ... as first you define the function and then print that and it is necessary to free the memory and for this we use del(). for example : def function name(): print(l) del(function name)
3rd Aug 2019, 2:28 AM
Vivek Kumar
Vivek Kumar - avatar