bpo-31672 - Add one last minor clarification for idpattern by warsaw · Pull Request #4483 · python/cpython

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I don't think we can remove A-Z from the pattern because that could be seen as a backward compatibility break. E.g. what if there's code out there that sets flags=0? Then the regexp wouldn't be case-insensitive and the removal of A-Z would break that code.

I think it is safe to swap a for -i though, so I'll do that. I'll also update the comment and, as I just also noticed, the documentation.