[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 87ecfd5cd5d1 by Eli Bendersky in branch '2.7': Normalize the keyword arguments documentation notation in re.rst. Closes issue #12875 http://hg.python.org/cpython/rev/87ecfd5cd5d1 --

[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___ Python-bugs-list

[issue12875] backport re.compile flags default value documentation

2011-11-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___

[issue12875] backport re.compile flags default value documentation

2011-11-12 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I have converted the Doc/library/re.rst doc of 2.7 to follow the new convention of 3.x, patch attached. -- keywords: +patch Added file: http://bugs.python.org/file23668/issue12875.1.patch ___ Python

[issue12875] backport re.compile flags default value documentation

2011-11-12 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: This patch looks fine. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___

[issue12875] backport re.compile flags default value documentation

2011-11-12 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: LGTM -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 02e4d3ebbb02 by Eli Bendersky in branch '2.7': Issue #12875: explicitly specify default value of the optional 'flags' argument to re.* functions. Closes #12875 http://hg.python.org/cpython/rev/02e4d3ebbb02

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___ Python-bugs-list

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The documentation now shows:: match(pattern, string[, flags=0]) Is it normal to have the brackets *and* the default value? -- nosy: +amaury.forgeotdarc status: closed - open ___ Python

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: No, it's not. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Amaury Georg, Grepping through the docs disagrees with your claims ;-) Try to grep for \=None\] to see what I mean. There are tons of places where default values are placed inside the brackets. For example in

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: but can we first get the convention documented somewhere? +1 This was on my todo list, but feel free to open a new issue about it. Grepping through the docs disagrees with your claims That's because is not documented and not everyone

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Ezio, what do you suggest to do regarding *this* issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I suggest removing the []. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___ ___

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Hmm, I've just notice that this [default=val] pattern already exists in the 're' docs in 2.7, for example: subn(repl, string[, count=0]) So my change was consistent within the documentation of this module. No doubt, the conventions are

[issue12875] backport re.compile flags default value documentation

2011-11-11 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I created #13386 about the conventions that should be followed in the doc. Converting the whole page is fine with me. -- ___ Python tracker rep...@bugs.python.org

[issue12875] backport re.compile flags default value documentation

2011-09-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: +1 to backporting [flags=0]. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875 ___

[issue12875] backport re.compile flags default value documentation

2011-09-01 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Ezio, but using ints instead of flags is discouraged (see #11957). OTOH there's no re.NOFLAGS flag that can be used instead. Indeed, there's no re.NOFLAGS, and as I mentioned the 3k docs mention 0 as the default value, thus (in a way)

[issue12875] backport re.compile flags default value documentation

2011-09-01 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Regarding backporting 106ee4eb5970 - it's probably a good thing to do but I wouldn't mix it with this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12875

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Eli Bendersky
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

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I don't think you are missing anything, but using ints instead of flags is discouraged (see #11957). OTOH there's no re.NOFLAGS flag that can be used instead. -- ___ Python tracker

[issue12875] backport re.compile flags default value documentation

2011-08-31 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Two more things: 1) Python 2 doc used to use the func(arg[, optional1[, optional2]]) notation, and with Python 3 we switched to func(arg, optional1=default1, optional2=default2). The latter is also used in Python 2 now, and the [] are