Don't use mutables in signatures

This commit is contained in:
Gouvernathor 2023-11-17 04:37:45 +01:00
parent 8d3eede436
commit a88706142f

View File

@ -1,12 +1,12 @@
init python:
class book_readable_class(object):
def __init__(self, title, contents=[], **kwargs):
def __init__(self, title, contents=(), **kwargs):
self.title = title
self.page = 0
self.overflow=None
self.title = title
self.contents = contents
self.contents = list(contents)
self.__dict__.update(**kwargs)
self.pages = len(self.contents)-1