pythonpython-3.xpython-2.7darkflow

Python's self.parse - why do we use it?


Why and when do we use self.parse()?

I've seen this in few functions when I was going through the code of tensorflow's- darkflow

source where I found this: https://github.com/thtrieu/darkflow/blob/master/darkflow/net/yolo/data.py


Solution

  • self.parse is simply a variable name you declared in your code, or could be a function you declared in your code.

    You do:

    print(self.parse)
    

    Output will be it's value.