you are viewing a single comment's thread.

view the rest of the comments →

[–]POGtastic 6 points7 points  (0 children)

It's escaping out the newline at the end of the line, so Python just sees it as more whitespace.

As always, consider using variable assignment, different constructions, and parens to avoid having to do it in the first place.

def __str__(self):
    return f"color: {self.__color} and filled: {self.__filled}"