I am using the Python IDE PyCharm and something that is have by default is it will showing warning when I have a mutbale type as a default value. For example, when I have this:
def status(self, options=[]):
PyCharm wants it to looks like:
def status(self, options=None):
if not options: options = []
My question is whether or not this is a standard way of doing things in the Python community or is this just the way PyCharm thinks it should be done? Are there any disadvantages of having mutable data type as defaults method arguments?