Mar-01-2020, 07:53 PM
Quote:@jefsummers - what is the purpose of g.go property? and the class - as it is it defy the purpose of class.From the OP
Quote:but it must not not display anything if it is imported as a module.So the go property is a flag, so that it does not display anything unless go is set to True. Someone importing as a module and accessing the functions directly will not get anything displayed. Running the file by itself will run properly.
@buran - in both of your solutions the functions can be called and will output even if the file is imported as a module.
Or maybe I misunderstood the question.