[Solved] Why won't class print the desc?
I have a class that won't print the desc, even though I have one written. What did I do wrong? https://code.sololearn.com/c1Zji7h1Ge5p/?ref=app
little things like 4 or 5 problems. check my code https://code.sololearn.com/chg9CCe0g3sZ/?ref=app
Also change the name of the method. Saw how the underscore was added? Try not to name things the same, for instance: def print_desc(self): ...
it was, delete the underscores and see for yourself. Thats also a handy little trick, if you like the variable name, but it has namespace clash, just throw an underscore before or after. gets confusing though, so try to stay on distiguishable variable names
There we go, desc is now about and desc_ is just fine. Thanks for your help, Slick.
Ahh, thanks! I have to put something in the class before I can call its desc.
Oh, that could be a problem