I\'m writing some code that takes a filename, opens the file, and parses out some data. I\'d like to do this in a class. The following code works:
class MyCl
In parse_file, take the self argument (just like in __init__). If there's any other context you need then just pass it as additional arguments as usual.
parse_file
self
__init__