Tal Einat added the comment: I can take a look at get_surrounding_brackets() if you like, since I've worked with that code before. ---------- nosy: +taleinat _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue21694> _______________________________________