Don't use mutables in signatures
(cherry picked from commit a88706142f
)
This commit is contained in:
parent
726406e11b
commit
30747a50b0
@ -1,12 +1,12 @@
|
|||||||
init python:
|
init python:
|
||||||
class book_readable_class(object):
|
class book_readable_class(object):
|
||||||
def __init__(self, title, contents=[], **kwargs):
|
def __init__(self, title, contents=(), **kwargs):
|
||||||
self.title = title
|
self.title = title
|
||||||
self.page = 0
|
self.page = 0
|
||||||
self.overflow=None
|
self.overflow=None
|
||||||
|
|
||||||
self.title = title
|
self.title = title
|
||||||
self.contents = contents
|
self.contents = list(contents)
|
||||||
self.__dict__.update(**kwargs)
|
self.__dict__.update(**kwargs)
|
||||||
|
|
||||||
self.pages = len(self.contents)-1
|
self.pages = len(self.contents)-1
|
||||||
|
Loading…
Reference in New Issue
Block a user