New submission from Eli Bendersky <eli...@gmail.com>: In the 2.7 docs, re.compile has this signature:
re.compile(pattern[, flags]) >From here it isn't clear what the default value of 'flags' is, to be able to >write code like this: re.compile(pattern, re.I if options['ignore_case'] else <WHAT??>) Of course, looking at the source shows immediately that the default flag value is 0 (which is kind-of implied by the flags being a bit-OR of flags, but not mentioned explicitly). I saw that in the latest 3K docs, it is documented properly: re.compile(pattern, flags=0) Naturally this applies to other methods of 're' that take 'flags'. I hope I'm not missing something and this really is just a documentation issue. If no objections arise, I will commit a fix to the docs of 're' in 2.7 ---------- assignee: docs@python components: Documentation messages: 143300 nosy: docs@python, eli.bendersky, ezio.melotti, pitrou priority: normal severity: normal status: open title: backport re.compile flags default value documentation versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12875> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com