From 93cc6f4a5def8e3451d38f937df5aac2b0098adb Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Mon, 15 May 2017 17:34:48 -0400 Subject: [PATCH] Use in syntax for key lookup for Python 3 compatibility --- examples/python/lj-melt-potential.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/lj-melt-potential.py b/examples/python/lj-melt-potential.py index fb544f90b8..41fa073ebd 100644 --- a/examples/python/lj-melt-potential.py +++ b/examples/python/lj-melt-potential.py @@ -12,7 +12,7 @@ class LAMMPSLJCutPotential(object): 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} def map_coeff(self,name,type): - if self.coeff.has_key(name): + if name in self.coeff: self.pmap[type] = name else: raise Exception("cannot match atom type %s" % name)