Don't use mutables in signatures
This commit is contained in:
parent
8d3eede436
commit
a88706142f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user