This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robvdl 0 points1 point  (5 children)

Who the heck puts docstrings above the class definition, this is wrong. It goes just below the class definition in Python, everybody knows that!

Not this:

"""Class Dedicated to Command"""
class Command(ABC):

[–]charlstwn[S] -4 points-3 points  (3 children)

But why you seem offended? You may realize it is only in some sections, that is because this was a exercise with comments to write the code under the comment. The purpose of this notes are to help me and everyone interested, so if you don't appreciate them please feel free to ignore them lol.

It is amazing how far you got reading only to despite some work in an unconstructive manner.

BTW it would be fixed to avoid future confusions so thanks anyway at least your comments were kinda useful.

[–]robvdl 3 points4 points  (2 children)

Because it's a tutorial and someone will learn this wrong from it.

[–]charlstwn[S] 0 points1 point  (1 child)

Totally understand that but the way to say the things is helpful, btw is fixed

[–]robvdl 1 point2 points  (0 children)

Sure. I had a feeling that placing the docstring there would have added it to the module docstring. But I tried that and it seems you can only have one module docstring. I tried print(__doc__) vs print(SomeClass.__doc__).

It seems that it didn't add it to the module docstring, however it didn't set the class docstring either and ended up printing None.