ez-class

Source code ez-class.py First analysis It seems we can write a class to a file, and open that class. But we also have restrictions on what we can write that are applied when input gets validated by get_legal_code. When running and selecting 1. Write new class we are prompted with {class name} {parent} {number of methods} for each method: {name{i}} {params{i}} {body{i}} and out class will look like: class {class name}({parent}): def {name{1}}({params{1}}): {body{1}} def {name{2}}({params{2}}): {body{2}} ... In exec_class() our class gets printed, so my_class.__repr__() gets run to get it’s string representation. ...

March 20, 2023 Β· 2 min Β· Max