You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is simpler but instantiating objects like that will maybe became troublesome because every instance will receive the same reference to the "" string.
I'n not an expert but i would like to know if there wasn't better to type the init method like this:
class Shape:
def init(self, color=None):
if color == None:
self.color = ""
else:
self.color = color
since the input for color is expected to be a string type
The text was updated successfully, but these errors were encountered: