diff --git a/pyaedt/application/Analysis3DLayout.py b/pyaedt/application/Analysis3DLayout.py index 932296c4ae9..e62a71e73d8 100644 --- a/pyaedt/application/Analysis3DLayout.py +++ b/pyaedt/application/Analysis3DLayout.py @@ -340,7 +340,7 @@ def get_next_xtalk_list(self, trlist=[], tx_prefix=""): return next @pyaedt_function_handler() - def get_fext_xtalk_list(self, trlist=[], reclist=[], tx_prefix="", rx_prefix="", skip_same_index_couples=True): + def get_fext_xtalk_list(self, trlist=None, reclist=None, tx_prefix="", rx_prefix="", skip_same_index_couples=True): """Retrieve a list of all the far end XTalks from two lists of exctitations (driver and receiver). Parameters @@ -371,9 +371,9 @@ def get_fext_xtalk_list(self, trlist=[], reclist=[], tx_prefix="", rx_prefix="", >>> oModule.GetAllPorts """ fext = [] - if not trlist: + if trlist is None: trlist = [i for i in self.excitations if tx_prefix in i] - if not reclist: + if reclist is None: reclist = [i for i in self.excitations if rx_prefix in i] for i in trlist: for k in reclist: diff --git a/pyaedt/application/AnalysisNexxim.py b/pyaedt/application/AnalysisNexxim.py index 716fb0fc605..ef087ec72bd 100644 --- a/pyaedt/application/AnalysisNexxim.py +++ b/pyaedt/application/AnalysisNexxim.py @@ -526,15 +526,10 @@ def get_fext_xtalk_list(self, trlist=None, reclist=None, tx_prefix="", rx_prefix >>> oEditor.GetAllPorts """ - if trlist == None: - trlist = [] - if reclist == None: - reclist = [] - fext = [] - if not trlist: + if trlist is None: trlist = [i for i in list(self.excitations.keys()) if tx_prefix in i] - if not reclist: + if reclist is None: reclist = [i for i in list(self.excitations.keys()) if rx_prefix in i] for i in trlist: for k in reclist: