Graphics/PackageItem.py

changeset 5651
982465f8389c
parent 5389
9b1c800daff3
child 6048
82ad8ec9548c
equal deleted inserted replaced
5650:4c52f07c186e 5651:982465f8389c
19 19
20 class PackageModel(UMLModel): 20 class PackageModel(UMLModel):
21 """ 21 """
22 Class implementing the package model. 22 Class implementing the package model.
23 """ 23 """
24 def __init__(self, name, moduleslist=[]): 24 def __init__(self, name, moduleslist=None):
25 """ 25 """
26 Constructor 26 Constructor
27 27
28 @param name package name (string) 28 @param name package name (string)
29 @param moduleslist list of module names (list of strings) 29 @param moduleslist list of module names (list of strings)
30 """ 30 """
31 super(PackageModel, self).__init__(name) 31 super(PackageModel, self).__init__(name)
32 32
33 self.moduleslist = moduleslist 33 self.moduleslist = [] if moduleslist is None else moduleslist[:]
34 34
35 def addModule(self, modulename): 35 def addModule(self, modulename):
36 """ 36 """
37 Public method to add a module to the package model. 37 Public method to add a module to the package model.
38 38

eric ide

mercurial