in this case, the error disappeared mysteriously while adding and removing test code. Both the snippet posted here and the one on my computer diff identical. My best guess is that there must have been some junk Unicode character that either displayed as a space, or not at all, and that made the script choke, and in the doing and undoing, I may have at some point added a space or a newline manually that overrode the junk character. Or perhaps the editor got rid of it upon undoing. In case it helps someone in a similar situation...