Don't use mutables in signatures

(cherry picked from commit a88706142f)
This commit is contained in:
Gouvernathor 2023-11-17 04:37:45 +01:00 committed by LoafyLemon
parent 726406e11b
commit 30747a50b0
1 changed files with 2 additions and 2 deletions

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