def __getattribute__(self, attr): ''' 确保dict能够及时根据data, tf值的变化更新. ''' if attr == 'atomco_dict': return self.get_atomco_dict(self.data) elif attr == 'tf_dict': return self.get_tf_dict(self.tf) else: return VasPy.__getattribute__(self, attr)
def __getattribute__(self, attr): ''' 确保dict能够及时根据data, tf值的变化更新. ''' if attr == 'atomco_dict': return self.get_atomco_dict(self.data) elif attr == 'tf_dict': return self.get_tf_dict(self.tf) else: return VasPy.__getattribute__(self, attr)
def __getattribute__(self, attr): """ Make sure we can return the newest data and tf. 确保dict能够及时根据data, tf值的变化更新. """ if attr == 'atomco_dict': return self.get_atomco_dict(self.data) elif attr == 'tf_dict': return self.get_tf_dict(self.tf) else: return VasPy.__getattribute__(self, attr)
def __getattribute__(self, attr): """ Make sure we can return the newest data and tf. 确保dict能够及时根据data, tf值的变化更新. """ if attr == "atomco_dict": return self.get_atomco_dict(self.data) elif attr == "tf_dict": return self.get_tf_dict(self.tf) else: return VasPy.__getattribute__(self, attr)