Westley Martínez <aniko...@gmail.com> added the comment: You're right. The code shouldn't *have* to check if the name is valid. It should just accept that the name is already valid. This would simplify things.
Here's the problem: the code needs to find the index of where the string with the filename starts. The way the code does it now by checking for a quote in a rather obfuscated way (while i and curline[i-1] in FILENAME_CHARS + SEPS:). So, changing that line to say curline[i-1] != "'" or curline[i-1] != '"' would work (in theory) but I'm really hoping there's a better way. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com