Closed pwrose closed 1 year ago
Hi Peter, thanks for your feedback! This is not really an invalid syntax, but only works with Python 3.8. The :=
or "walrus" operator for assignment expressions was introduced in Python 3.8. Could you please check whether you are using an older version of Python?
To solve this problem and establish compatibility with older Python versions before 3.8, you can replace this line of code in question with the following two lines:
regex_cas = re.match("^(\d{2,7})\-(\d{2})-(\d{1})$", cas_rn)
if regex_cas :
I hope this helps.
Thanks, Alex. I learned a new cool feature of Python 3.8!
PS: Do you know a good resource to look up InChIkeys for CAS regnos? PubChem has some, but I'm wondering if there are other complementary resources.
Hi Peter, glad I could show you a new feature in Python 3.8. Unfortunately, I don't have much experience with InChI, so I cannot give you any valuable feedback on this topic - sorry.
SyntaxError: invalid syntax