Apologies if this has been asked before, I'm not sure how to search for this.
I'm trying to structure my module in a way that allows me to do this:
import module
module()
How can I do this?
My module is a file parser, and right now I'm doing this:
from module import module
with open('file') as f:
parsed_file = module(f)
Importing the same name as the module feels redundant.