From report at bugs.python.org Mon Nov 1 01:00:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 00:00:42 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288569641.92.0.283107571638.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?Python? is lower-cased only when referring to the executable (as a file) itself. When talking about the language, the implementation or the VM in an abstract way (not a file), It think it?s always ?Python?. ---------- _______________________________________ Python tracker _______________________________________ From georg at python.org Mon Nov 1 13:29:01 2010 From: georg at python.org (Georg Brandl) Date: Mon, 01 Nov 2010 12:29:01 +0000 Subject: [docs] Typo in 16.6.1.1. In-Reply-To: <4CCC6401.3090305@ivs.cs.uni-magdeburg.de> References: <4CCC6401.3090305@ivs.cs.uni-magdeburg.de> Message-ID: <4CCEB28D.9030404@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 30.10.2010 18:29, schrieb Sebastian Zug: > Dear Python documentation team, > > on page > > http://docs.python.org/library/multiprocessing.html > > in chapter "16.6.1.1. The Process class" there is a obvious typo inside > the second code example in line 7 > > from multiprocessing import Process > import os > > def info(title): > print title > print 'module name:', __name__ > print 'parent process:', os.getppid() <-- it means os.getpid() I think this is correct -- getpid() is called in the next line. os.getppid() does exist and returns the parent process ID. > print 'process id:', os.getpid() > > def f(name): > info('function f') > print 'hello', name > > if __name__ == '__main__': > info('main line') > p = Process(target=f, args=('bob',)) > p.start() > p.join() > > Best wishes from Germany Best wishes back, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzOso0ACgkQN9GcIYhpnLAMQwCgkoQEmAGGd7ff2veIg1oQzwlg L4EAnAvxv1AXD6i1ghSuuKL5e7lu2ox0 =q5gc -----END PGP SIGNATURE----- From report at bugs.python.org Mon Nov 1 21:25:23 2010 From: report at bugs.python.org (=?utf-8?q?Julien_=C3=89LIE?=) Date: Mon, 01 Nov 2010 20:25:23 +0000 Subject: [docs] [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> New submission from Julien ?LIE : > +.. method:: NNTP.list(*, file=None) > + > + Send a ``LIST`` command. Return a pair ``(response, list)`` where *list* is a > + list of tuples representing all the groups available from this NNTP server. > + Each tuple has the form ``(group, last, first, flag)``, where > + *group* is a group name, *last* and *first* are the last and first article > + numbers, and *flag* is ``'y'`` if posting is allowed, ``'n'`` if not, > + and ``'m'`` if the newsgroup is moderated. (Note the ordering: *last*, *first*.) There are other values: 'x', 'j', and '=' followed by the name of a newsgroup (alias). I believe the best would be to use what INN mentions in its documentation! (Or otherwise, RFC 3977 and RFC 6048.) http://www.eyrie.org/~eagle/software/inn/docs/active.html It would then give: ------------------------------------------------------------------------------------- ... and *flag* usually takes one of these values: y Local postings and articles from peers are allowed. m The group is moderated and all postings must be approved. n No local postings are allowed, only articles from peers. j Articles from peers are filed in the junk group instead. x No local postings, and articles from peers are ignored. =foo.bar Articles are filed in the group foo.bar instead. If *flag* has another value, then the status of the newsgroup should be considered to be unknown. ------------------------------------------------------------------------------------- Can a bullet list be used in the documentation, to properly indent the flag values? ---------- assignee: docs at python components: Documentation, Extension Modules messages: 120162 nosy: docs at python, jelie priority: normal severity: normal status: open title: Other status field flags in documentation for NNTP LIST command type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:54:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2010 23:54:57 +0000 Subject: [docs] [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> New submission from ?ric Araujo : At the top of Doc/library/functions.rst, which documents built-in functions like abs, getattr or hash, a comment reads ?document all delegations to __special__ methods?. Some functions are already good: enumerate for instance does link to the definition of iterator and hints about the __next__ method, format points to __format__, etc. They can serve as example for how to add links (in plain text and in the global index). ---------- assignee: docs at python components: Documentation messages: 120189 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Document magic methods called by built-in functions versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:03:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 02 Nov 2010 00:03:10 +0000 Subject: [docs] [issue10289] Document magic methods called by built-in functions In-Reply-To: <1288655696.94.0.809001507215.issue10289@psf.upfronthosting.co.za> Message-ID: <1288656190.53.0.0933186272062.issue10289@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: ?ric, I just wanted to link to a related discussion we had under issue 8983. See msg107689. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:25:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Nov 2010 00:25:02 +0000 Subject: [docs] [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288657502.18.0.354858685.issue10285@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:33:08 2010 From: report at bugs.python.org (Nik Tautenhahn) Date: Tue, 02 Nov 2010 15:33:08 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288711987.81.0.567678697514.issue10038@psf.upfronthosting.co.za> Nik Tautenhahn added the comment: There is even more inconsistency here. As already mentioned, we have this: >>> import json >>> json.loads(json.dumps("abc")) 'abc' If, however, I am evil and hide _json.so (which is the C-part of the json module for speedup), the JSON code falls back to its python implementation and voila: >>> import json >>> json.loads(json.dumps("abc")) u'abc' Not so neat, if your fallback is not a fallback but shows such different behaviour. ---------- _______________________________________ Python tracker _______________________________________ From fdrake at acm.org Tue Nov 2 16:41:20 2010 From: fdrake at acm.org (Fred Drake) Date: Tue, 2 Nov 2010 11:41:20 -0400 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1288711987.81.0.567678697514.issue10038@psf.upfronthosting.co.za> References: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> <1288711987.81.0.567678697514.issue10038@psf.upfronthosting.co.za> Message-ID: Alternately, the Python implementation may be thought of as definitive and the optimizations are broken. From report at bugs.python.org Tue Nov 2 17:15:10 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Tue, 02 Nov 2010 16:15:10 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288714510.61.0.056228589077.issue10038@psf.upfronthosting.co.za> Walter D?rwald added the comment: The following patch (against the release27-maint branch) seems to fix the problem. ---------- keywords: +patch nosy: +doerwalter Added file: http://bugs.python.org/file19468/json.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:19:54 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 19:19:54 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288725594.76.0.792081299268.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The fact that the C and Python versions are not fully tested (afaict) is not good. I'm not sure that's worth fixing for 2.7 and it's probably worth a separate bug report for Python 3.2 on that. In the meantime, I'll test Walter's patch and add a unit test for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:27:16 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 02 Nov 2010 19:27:16 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288726036.02.0.223144996929.issue10038@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The incomplete testing and C/Python implementation mismatch are covered by issue 5723 and issue 9233. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:35:47 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Nov 2010 20:35:47 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288730147.66.0.0404222266806.issue10038@psf.upfronthosting.co.za> Raymond Hettinger added the comment: To mitigate possible negative impacts from changing the return type, consider adding a parse_string hook that lets users control the return type: json.loads(f, parse_int=decimal.Decimal, parse_string=repr) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:40:22 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 20:40:22 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288730422.01.0.480379872702.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Adding that argument to Python 2.7 seems like new feature territory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:57:39 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 20:57:39 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288731459.08.0.115697320596.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: @doerwalter: patch looks good. I've added a test and will commit momentarily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:04:29 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 02 Nov 2010 21:04:29 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288731869.49.0.802177206349.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r86126 ---------- assignee: bob.ippolito -> barry resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:30:21 2010 From: report at bugs.python.org (hafiza jameel) Date: Wed, 03 Nov 2010 10:30:21 +0000 Subject: [docs] [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> New submission from hafiza jameel : the documentation does not show the import statement of decimal module in the introduction: http://docs.python.org/library/decimal.html import should have been done like this: from decimal import * ---------- assignee: docs at python components: Documentation messages: 120315 nosy: docs at python, hafiza.jameel priority: normal severity: normal status: open title: decimal module documentation is misguiding versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:24:59 2010 From: report at bugs.python.org (nestor) Date: Wed, 03 Nov 2010 14:24:59 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> New submission from nestor : The built-in function page (http://docs.python.org/dev/py3k/library/functions.html) is pretty long. Each function has an anchor but unlike the built-in types section there is no quick way to get an overview or jump to a specific function (like open or print) short of scrolling through 22 pages. It would be nice to have an index of all built-in functions linked to the specific entry on the built-in functions page. This could be either somehow added to the index page (http://docs.python.org/dev/py3k/library/index.html) or to the top of the built-in functions page itself. For efficient use of real-estate multiple function names could be on one single line alphabetically sorted and separated by spaces. ---------- assignee: docs at python components: Documentation messages: 120327 nosy: docs at python, georg.brandl, nestor priority: normal severity: normal status: open title: Add index with links section for built-in functions type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:26:57 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 14:26:57 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288794417.96.0.359362842123.issue10299@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:54:22 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Wed, 03 Nov 2010 15:54:22 +0000 Subject: [docs] [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> New submission from Hagen F?rstenau : The documentation of the functions PyDict_Items, PyDict_Keys and PyDict_Values is incorrect: They do return PyListObject, but in Python 3.x this is not the same as dict.items() etc. ---------- assignee: docs at python components: Documentation messages: 120328 nosy: docs at python, hagen priority: normal severity: normal status: open title: Documentation of three PyDict_* functions versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:03:24 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 03 Nov 2010 17:03:24 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288803804.38.0.784294249007.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: The attached patch adds a 4-columns table that lists the functions without args. ---------- assignee: docs at python -> ezio.melotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19478/issue10299.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:10:51 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 03 Nov 2010 17:10:51 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288804251.24.0.742619462579.issue10299@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:27:52 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 03 Nov 2010 17:27:52 +0000 Subject: [docs] [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288805272.57.0.418567739304.issue10297@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:33:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Nov 2010 18:33:15 +0000 Subject: [docs] [issue10285] Other status field flags in documentation for NNTP LIST command In-Reply-To: <1288643123.11.0.762395184057.issue10285@psf.upfronthosting.co.za> Message-ID: <1288809195.7.0.118303957124.issue10285@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Improvement committed in r86140, thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 22:35:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 03 Nov 2010 21:35:55 +0000 Subject: [docs] [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288820155.26.0.821267091486.issue10300@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86144 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:21:21 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:21:21 +0000 Subject: [docs] [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> New submission from Malte Helmert : Section "3.1.2. Strings" says "*Once again*, the print() function produces the more readable output.", but as far as I can see (or grep), this is the first time that this aspect of print() is mentioned. ---------- assignee: docs at python components: Documentation messages: 120362 nosy: docs at python, maltehelmert priority: normal severity: normal status: open title: small inconsistency in tutorial versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:27:53 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 00:27:53 +0000 Subject: [docs] [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288830473.86.0.698611143734.issue10303@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:28:23 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:28:23 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> New submission from Malte Helmert : >From Section 3.1.2 of the tutorial: print(""" Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """) produces the following output: _____________________________________________________________ Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to _____________________________________________________________ That doesn't quite match the behaviour: there should be an extra blank line prepended to the output. ---------- assignee: docs at python components: Documentation messages: 120364 nosy: docs at python, maltehelmert priority: normal severity: normal status: open title: error in tutorial triple-string example versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:30:19 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 04 Nov 2010 00:30:19 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288830619.89.0.708691087624.issue10304@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 01:44:11 2010 From: report at bugs.python.org (Malte Helmert) Date: Thu, 04 Nov 2010 00:44:11 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288831451.29.0.13903656512.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: Here's a related one if you want to get the sample output really 100% correct. In the last example of Section 3, the output in {>>> a, b = 0, 1 >>> while b < 1000: ... print(b, end=' ') ... a, b = b, a+b ... 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987} should have an extra space at the end. (Granted, this is very very minor, but this may make a Python 2.x oldtimer like me wonder if print's end=" " does the same as old Python 2.x's "print b," including suppression of the "softspace".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:48:04 2010 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Thu, 04 Nov 2010 06:48:04 +0000 Subject: [docs] [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288799659.81.0.759259964025.issue10300@psf.upfronthosting.co.za> Message-ID: <1288853283.95.0.565693563934.issue10300@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: The ReST links in http://docs.python.org/py3k/c-api/dict.html#PyDict_Items seem to be broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:50:46 2010 From: report at bugs.python.org (Baiju M) Date: Thu, 04 Nov 2010 11:50:46 +0000 Subject: [docs] [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1288871446.56.0.309513922.issue10297@psf.upfronthosting.co.za> Changes by Baiju M : ---------- nosy: +baijum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:14:26 2010 From: report at bugs.python.org (Henning Hraban Ramm) Date: Thu, 04 Nov 2010 20:14:26 +0000 Subject: [docs] [issue10315] smtplib.SMTP_SSL new in 2.6 In-Reply-To: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> Message-ID: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> New submission from Henning Hraban Ramm : The docs tell us that smtplib.SMTP_SSL was only changed in 2.6, but it is new (i.e. it didn't exist in 2.5.x). ---------- assignee: docs at python components: Documentation messages: 120432 nosy: docs at python, hraban priority: normal severity: normal status: open title: smtplib.SMTP_SSL new in 2.6 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:50:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 04 Nov 2010 21:50:21 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288907421.55.0.72053422709.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch that adds a hack that allows to run turtle doctests using turtle.run_doctests() function. Running this function has revealed numerous mistakes in doctests that are corrected in the patch. The patch is against release27 branch because there are even more problems in py3k. I don't think run_doctests hack belongs to turtle module. I think it would be more appropriate to place it in test.test_turtle. I have also not been able to figure out how to make global functions' doctests runnable. The current patch disables them by mangling the >>> prompts in docstrings. ---------- Added file: http://bugs.python.org/file19500/issue7061-docstrings-r27.diff _______________________________________ Python tracker _______________________________________ From ian.sweeney at lljproperty.com Thu Nov 4 19:06:04 2010 From: ian.sweeney at lljproperty.com (Ian Sweeney) Date: Thu, 4 Nov 2010 18:06:04 +0000 Subject: [docs] SyntaxError: invalid syntax Message-ID: Hi, I've just installed Python v3.1.2 onto Windows Vista. I started IDLE and typed help() which suggested I look at http://docs.python.org/tutorial/ Section 2.1.2. Interactive Mode suggested the following code: the_world_is_flat = 1if the_world_is_flat: print "Be careful not to fall off!" The line print "Be careful not to fall off!" generates SyntaxError: invalid syntax The Python v3.1.2 documentation on Windows which was installed as a Windows help file gives a slightly different Section 2.1.2. Interactive Mode suggestion: the_world_is_flat = 1if the_world_is_flat: print ("Be careful not to fall off!") This code works. The online documentation needs to change to show working code (or if appropriate indicate that the code is version specific). -- Regards, *Ian Sweeney* Head of IT * ------------------------------ * LLJ Property LLC PO Box 107729 Abu Dhabi UAE Tel: +44 7941 045102 Email: ian.sweeney at lljproperty.com* *www.lljproperty.com DISCLAIMER: The information contained in this mail is for the intended addressee only, if you have received this mail by mistake, please forward it to admin at lljproperty.com. Any opinions expressed, implied or presented are solely those of the author and do not necessarily represent those of LLJ Property LLC. -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.baumgartner at live.com Fri Nov 5 07:51:30 2010 From: john.baumgartner at live.com (John Baumgartner) Date: Fri, 5 Nov 2010 17:21:30 +1030 Subject: [docs] Error in text Message-ID: Hi Team, It's not technically a bug, but the following code (on page http://docs.python.org/tutorial/datastructures.html#functional-programming-tools) is claimed to compute primes, but it does not return only primes... >>> def f(x): return x % 2 != 0 and x % 3 != 0 ... >>> filter(f, range(2, 25)) [5, 7, 11, 13, 17, 19, 23] Sure, for the range given in the filter only primes are returned, but if this range was expanded, composites would sneak in. Great docs though! I'm new to Python and the examples are fantastic. Cheers, John -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Nov 5 08:34:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 07:34:13 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288942452.88.0.931355211696.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: Why shouldn't global function doctests be runnable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:38:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 07:38:04 +0000 Subject: [docs] [issue10315] smtplib.SMTP_SSL new in 2.6 In-Reply-To: <1288901666.81.0.218057119797.issue10315@psf.upfronthosting.co.za> Message-ID: <1288942684.23.0.689903188027.issue10315@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r86189. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Fri Nov 5 08:35:21 2010 From: georg at python.org (Georg Brandl) Date: Fri, 05 Nov 2010 07:35:21 +0000 Subject: [docs] SyntaxError: invalid syntax In-Reply-To: References: Message-ID: <4CD3B3B9.30604@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 04.11.2010 18:06, schrieb Ian Sweeney: > Hi, > > I've just installed Python v3.1.2 onto Windows Vista. > > I started IDLE and typed help() which suggested I look > at http://docs.python.org/tutorial/ > > Section 2.1.2. Interactive Mode suggested the following code: > > the_world_is_flat = 1 > if the_world_is_flat: > print "Be careful not to fall off!" > > > The line > print "Be careful not to fall off!" > generates SyntaxError: invalid syntax > > The Python v3.1.2 documentation on Windows which was installed as a Windows help > file gives a slightly different Section 2.1.2. Interactive Mode suggestion: > > the_world_is_flat = 1 > if the_world_is_flat: > print ("Be careful not to fall off!") > > > This code works. The online documentation needs to change to show working code > (or if appropriate indicate that the code is version specific). That's true. In fact, the whole page identifies itself as the "Python v2.7 documentation"; and there is also a separate set for Python 3 at http://docs.python.org/py3k. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEUEARECAAYFAkzTs7kACgkQN9GcIYhpnLA/CwCeK2pwEZhKE9RhAaa4CjltqhgE HR8AlRAHuBu/4o+H07MFAYvHRdKFfIs= =Gw5n -----END PGP SIGNATURE----- From report at bugs.python.org Fri Nov 5 15:16:15 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:16:15 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288966575.74.0.102568930526.issue10318@psf.upfronthosting.co.za> Nick Coghlan added the comment: A few more deeper in the py3k source tree: Doc/tools/docutils/_string_template_compat.py Doc/tools/docutils/readers/python/pynodes.py Doc/tools/sphinx/pycode/pgen2/token.py Lib/lib2to3/tests/data/different_encoding.py Adding Georg, since this affects the docs as well as the source code. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:16:24 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Nov 2010 14:16:24 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288966584.83.0.779197677581.issue10318@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: docs at python -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:43:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 05 Nov 2010 14:43:44 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288942452.88.0.931355211696.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Nov 5, 2010 at 3:34 AM, Georg Brandl wrote: .. > Why shouldn't global function doctests be runnable? They should - I just couldn't figure out a better hack that would work for both mathods and functions. Note that functions are auto-generated in turtle from Screen and Turtle methods. The doctests are just method doctests with turtle. or screen. prefix dropped. In order to remove dependency between doctests, I create a new turtle for each test and assign it to global "turtle" variable. For some reason similar approach did not work for functions. I'll keep trying, though. On the other hand, since function doctests are auto-generated from method doctests, there is little to be gained from running them separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:26:45 2010 From: report at bugs.python.org (Gregor Lingl) Date: Fri, 05 Nov 2010 15:26:45 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288970805.51.0.00394839332218.issue7061@psf.upfronthosting.co.za> Gregor Lingl added the comment: What do you mean with "similar approach"? Keep in mind, that functions derived form turtle methods, call methods for the class variable _pen of class Turtle. A new Turtle-object is bound to _pen, if it is not already present, whenever one of these functions is called, via _getpen() So perhaps _getpen() can do for you what you need? (A similar approach is used for screen-oriented functions with turtle._screen.) I'm very sorry that, due to time restrictions, for the next two or three months I'm not able to participate in these discussions as intensely as I'd like to. Best regards, Gregor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:40:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 05 Nov 2010 15:40:47 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288971646.77.0.893727217128.issue10318@psf.upfronthosting.co.za> Georg Brandl added the comment: You can ignore those under Doc/tools; they are neither part of the distribution and nor installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:19:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2010 17:19:55 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288977595.37.0.652854788295.issue10318@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:48:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 21:48:25 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1288993705.43.0.64342455247.issue10299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +1 from me on a table at the top of the functions page. I am assuming that the markup will induce hotlinks. The main problem I see is the need to hand rewrite when another function is added ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:59:43 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 05 Nov 2010 21:59:43 +0000 Subject: [docs] [issue10300] Documentation of three PyDict_* functions In-Reply-To: <1288853283.95.0.565693563934.issue10300@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: This is fixed now. 2010/11/4 Hagen F?rstenau : > > Hagen F?rstenau added the comment: > > The ReST links in http://docs.python.org/py3k/c-api/dict.html#PyDict_Items seem to be broken. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:13:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:13:42 +0000 Subject: [docs] [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1288995222.61.0.315663210388.issue10303@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The sentence should be deleted. Print is *not* used in any of the previous examples. This is the first mention of print() in the chapter and is nonsensical in context. ---------- keywords: +easy nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:20:48 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Nov 2010 22:20:48 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1288995647.92.0.32062081694.issue10318@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Eric's comment about why have shebang lines at all for files in the standard library. There isn't any use case or recommendation for ever putting /path/to/lib/pythonx.x or its subdirectories directly on a shell search path is there? WRT the three files found in the Mac directory, I think all of these should be left alone for right now. Specifically: Mac/BuildScript/build-installer.py is the script used to build OS X installer images; at the moment, it depends on a system Python 2 as a build tool, primarily because of Sphinx, and there has been an effort to keep the Python 2 and Python 3 versions of the script in sync. Eventually that will need to be changed. The shebang line could simply be removed. Mac/Tools/fixapplepython23.py: this one needs to be looked at a bit more as it runs during the installation process but only on OS X 10.3, a minor and dwindling niche of the user base. I think that it actually depends on the Apple-installed system Python at run time. I'll follow up on it. Mac/Tools/bundlebuilder.py: #! /usr/bin/env python AFAIK, bundlebuilder is neither used during the build process of Python 3 nor is it installed. It is used in the Python 2 build process. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:28:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:28:57 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996137.4.0.0926914706198.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. Rather than add a blank line to the output, the input should have the newline suppressed with \ (which has been done in previous examples). print("""\ 2. It is rather difficult to see that there is no blank at the end (highlight with mouse). I can imagine that either the formatter or display system might delete even if in the master .rst file. In interactive use, the interpreter will go to a new line anyway before printing the >>> prompt. The intent and effect of end=' ' is that the outputs are all on one line (as with 2.x print) instead of each on a separate line ---------- nosy: +terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:29:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Nov 2010 22:29:12 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996152.64.0.74722665409.issue10304@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:37:20 2010 From: report at bugs.python.org (Malte Helmert) Date: Fri, 05 Nov 2010 22:37:20 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288996640.4.0.934027495891.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: > 1. Rather than add a blank line to the output, the input should have > the newline suppressed with \ (which has been done in previous > examples). > print("""\ I think that would be didactically bad after just mentioning that newlines in triple-quoted strings don't have to be escaped etc. I think this would confuse the reader. Better use print("""Usage... > In interactive use, the interpreter will go to a new line anyway > before printing the >>> prompt. It won't (at least in Python 3.1). I just tried it. > The intent and effect of end=' ' is that the outputs are all on one > line (as with 2.x print) instead of each on a separate line Sure. But I think that in an example that is essentially about whitespace produced by print, the actual whitespace in the output should match the actual behaviour of print. One why to get rid of this problem altogether is to add a 'print "done!"' or whatever at the end, or use a different separator from " ". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:01:31 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 05 Nov 2010 23:01:31 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1288998091.81.0.834405612339.issue10304@psf.upfronthosting.co.za> R. David Murray added the comment: I think the commit hook might object to the trailing blank (I'm not sure it applies to rst files, but I think it does). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 03:55:07 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2010 02:55:07 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289012106.84.0.224800246626.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should have said that IDLE puts >>> on a new line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:18:46 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 06 Nov 2010 06:18:46 +0000 Subject: [docs] [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1289024326.53.0.191714730337.issue6269@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:18:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 07:18:31 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1289027911.03.0.441186851904.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on the general idea. I applied the patch and built the documentation to see what the output looks like: The hotlinks are here and work, that?s cool, but I think the table wastes space. You could use five columns without damaging usability (that is, summoning the hateful horizontal scrollbar), even in 800?600 with an uncollapsed sidebar. Alternative ideas like using a special unordered list with automatic CSS?3 flowing or replacing the manual table with a new Sphinx directive would take a lot of time, so consider I?m +1 on whatever you decide best. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:40:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 06 Nov 2010 07:40:59 +0000 Subject: [docs] [issue8910] Write a text file explaining why Lib/test/data exists In-Reply-To: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> Message-ID: <1289029259.11.0.499200164297.issue8910@psf.upfronthosting.co.za> ?ric Araujo added the comment: By the way, is this file picked up by Tools/msi/msi.py? ---------- nosy: +loewis versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From moshisushi at gmail.com Fri Nov 5 18:28:01 2010 From: moshisushi at gmail.com (Henry Rodrick) Date: Fri, 5 Nov 2010 10:28:01 -0700 Subject: [docs] Windows executable script bug Message-ID: Hello! I found a little issue with making python scripts executable in Windows (as described here: http://docs.python.org/faq/windows#how-do-i-make-python-scripts-executable): @setlocal enableextensions & python -x %~f0 %* & goto :EOF This won't work well if the script resides in a directory named something with spaces. The fix is to add quotes around the script path: @setlocal enableextensions & python -x "%~f0" %* & goto :EOF Regards, Henry Rodrick From eriel at google.com Fri Nov 5 20:01:10 2010 From: eriel at google.com (Eriel Thomas) Date: Fri, 5 Nov 2010 12:01:10 -0700 Subject: [docs] Typo in ConfigParser documentation Message-ID: In the third paragraph of the ConfigParser documentation ( http://docs.python.org/library/configparser.html), there is a typo where the word "spection" should instead read "section". Thanks, Eriel Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Nov 6 16:22:38 2010 From: report at bugs.python.org (Malte Helmert) Date: Sat, 06 Nov 2010 15:22:38 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289056958.01.0.312393467621.issue10304@psf.upfronthosting.co.za> Malte Helmert added the comment: I see. (The tutorial really talks about the interactive interpreter though -- I don't think IDLE has been mentioned yet.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:17:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 11:17:45 +0000 Subject: [docs] [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1289128665.88.0.550649121196.issue10297@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:29:42 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 11:29:42 +0000 Subject: [docs] [issue10297] decimal module documentation is misguiding In-Reply-To: <1288780221.67.0.597486897879.issue10297@psf.upfronthosting.co.za> Message-ID: <1289129382.31.0.136814132171.issue10297@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r86286, r86287, r86288. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:53:33 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2010 12:53:33 +0000 Subject: [docs] [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1289134413.22.0.633299688942.issue10145@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r86293, r86394, r86295. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 14:22:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 07 Nov 2010 13:22:01 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1289136121.25.0.718608734675.issue10226@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed the wordings in r86296(py3k), r86297(release31-maint) and r86298(release27-maint). David, for the examples you mentioned, the first one's parsing logic follows the explanation that is written. It is correct. For the second example, the port value not being a DIGIT exhibits such a behavior. I am unable to recollect the reason for this behavior. Either the URL is invalid (PORT is not a DIGIT, and parse module is simply ignoring to raise an error - it's okay, given the input is invalid) or it needs to distinguish the ':' as a port separator from path separator for some valid urls. I think, if we find a better reason to change something for the second scenario, we shall address that. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:13:00 2010 From: report at bugs.python.org (Kent Johnson) Date: Mon, 08 Nov 2010 01:13:00 +0000 Subject: [docs] [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1289178776.5.0.580896427331.issue10303@psf.upfronthosting.co.za> Kent Johnson added the comment: Attached patch deletes the referenced sentence. ---------- keywords: +patch nosy: +kjohnson Added file: http://bugs.python.org/file19536/issue10303.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:57:53 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 08 Nov 2010 01:57:53 +0000 Subject: [docs] [issue10303] small inconsistency in tutorial In-Reply-To: <1288830081.73.0.485204964128.issue10303@psf.upfronthosting.co.za> Message-ID: <1289181473.5.0.859372344423.issue10303@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r86310. print was used in some examples following its mention, so a simple introduction to it was okay. It is introduced properly further down in the tutorial. ---------- nosy: +orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:37:28 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 02:37:28 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1289183848.54.0.770619572048.issue10226@psf.upfronthosting.co.za> R. David Murray added the comment: Senthil, no it isn't. There is no way to know a priori that ':80' represents a port number rather than a path, absent the // introducer for the netloc. This bug is fixed; I ought to open a new one for the path thing but perhaps I will wait for a user report instead :) ---------- _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Mon Nov 8 01:16:19 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Sun, 7 Nov 2010 19:16:19 -0500 Subject: [docs] Glossary entry for __future__ module contradicts module's documentation Message-ID: Compare: __future__: A *pseudo-module* which programmers can use to enable new language features which are not compatible with the current interpreter. (Glossary) and __future__ is a *real module*, and serves three purposes: ... (__future__ documentation) I suggest not to use pseudo/real module terminology and have two definitions for __future__ in glossary: one as a name of a module and the other as a keyword in the future statement. From laflechaverde at gmail.com Mon Nov 8 10:52:23 2010 From: laflechaverde at gmail.com (Jacques Verron) Date: Mon, 8 Nov 2010 10:52:23 +0100 Subject: [docs] Python tutorial for version 2.5.4 Message-ID: Dear sir/madam, I am searching for the Python tutorial in a format that is easily printable. I use Python with Arcgis 9.3.1 and the last version of Python that is certified to work with this software is Python 2.5.4 with Numpy 1.0.3. So far I have not seen the python tutorial for the 2.5.4 version in a printable format (pdf). Would you as kind as to send me the tutorial in pdf or to point me out where can I find it?. Looking forward to hearing from you, Jacques -------------- next part -------------- An HTML attachment was scrubbed... URL: From manlio.perillo at gmail.com Mon Nov 8 11:33:44 2010 From: manlio.perillo at gmail.com (Manlio Perillo) Date: Mon, 08 Nov 2010 11:33:44 +0100 Subject: [docs] formatting problems with SAX features and properties list Message-ID: <4CD7D208.5090307@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi. I think that formatting style is bad for SAX features and properties list: http://docs.python.org/library/xml.sax.handler.html In the old doc format it was more readable: http://docs.python.org/release/2.4.3/lib/module-xml.sax.handler.html Thanks Manlio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzX0ggACgkQscQJ24LbaURGjwCglJ2C0fFXxviOVg91Qno69ckC +YsAnj57xGszYNLcYz5xvJb1FwW/q72k =apFO -----END PGP SIGNATURE----- From georg at python.org Mon Nov 8 12:04:52 2010 From: georg at python.org (Georg Brandl) Date: Mon, 08 Nov 2010 12:04:52 +0100 Subject: [docs] formatting problems with SAX features and properties list In-Reply-To: <4CD7D208.5090307@gmail.com> References: <4CD7D208.5090307@gmail.com> Message-ID: <4CD7D954.8030200@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 08.11.2010 11:33, schrieb Manlio Perillo: > Hi. > > I think that formatting style is bad for SAX features and properties list: > http://docs.python.org/library/xml.sax.handler.html > > In the old doc format it was more readable: > http://docs.python.org/release/2.4.3/lib/module-xml.sax.handler.html You're right, that was a conversion glitch. Fixed now in the development docs. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzX2VQACgkQN9GcIYhpnLC9CACfTKGU2az0fzHfy/10ePVWaFLX MJAAn3aHafix8i5YWAT8E2sEOKe8PoiV =gqmz -----END PGP SIGNATURE----- From georg at python.org Mon Nov 8 12:06:51 2010 From: georg at python.org (Georg Brandl) Date: Mon, 08 Nov 2010 12:06:51 +0100 Subject: [docs] Python tutorial for version 2.5.4 In-Reply-To: References: Message-ID: <4CD7D9CB.8020403@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 08.11.2010 10:52, schrieb Jacques Verron: > Dear sir/madam, > > I am searching for the Python tutorial in a format that is easily printable. I > use Python with Arcgis 9.3.1 and the last version of Python that is certified to > work with this software is Python 2.5.4 with Numpy 1.0.3. > > So far I have not seen the python tutorial for the 2.5.4 version in a printable > format (pdf). Would you as kind as to send me the tutorial in pdf or to point me > out where can I find it?. Dear Jacques, you can download the 2.5.4 PDF documents in letter or a4 paper size from this location: http://www.python.org/ftp/python/doc/2.5.4/ regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzX2csACgkQN9GcIYhpnLBmSQCgiZE7Dwhrz4DUsk83X7PczdVI iJsAnitg0GTBYowtzI/rPc+FmCX2B/sm =zWtJ -----END PGP SIGNATURE----- From report at bugs.python.org Mon Nov 8 14:16:28 2010 From: report at bugs.python.org (Fergal Daly) Date: Mon, 08 Nov 2010 13:16:28 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> New submission from Fergal Daly : According to the index, the only place that mentions ** in argument lists is http://docs.python.org/tutorial/controlflow.html#index-1099 and gives no indication of what an object must support to allow **. When you attempt to ** an object the real attribute exception is suppressed and you get a message "argument after ** must be a mapping" "mapping" is quite loosely defined. There are 3 definitions, the glossary entry seems the most complete http://docs.python.org/library/stdtypes.html#index-625 http://docs.python.org/reference/datamodel.html#index-842 http://docs.python.org/glossary.html#term-mapping But even the glossary entry doesn't tell you what you need for **. Only by reading the C source code did I discover that to be usable in **, an object must implement .keys() and .__getitem__(). The docs either should add .keys() to the definition of mapping or the code should use some other term or simply allow the original exception to reach the user. ---------- assignee: docs at python components: Documentation messages: 120739 nosy: Fergal.Daly, docs at python priority: normal severity: normal status: open title: ** and "mapping" are poorly defined in python docs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:22:14 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 08 Nov 2010 13:22:14 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289222534.0.0.820300224232.issue10357@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:48:07 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 08 Nov 2010 13:48:07 +0000 Subject: [docs] [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> New submission from Fred L. Drake, Jr. : The HTML version of the documentation should include style settings for printing that use fairly dark colors, so that printed copies of pages are more readable. Using a printer that reduces colors to grays causes the light colors in code examples (or inlined references to classes and the like) to nearly drop out, making the result very painful to read. ---------- assignee: docs at python components: Documentation keywords: easy messages: 120741 nosy: docs at python, fdrake priority: normal severity: normal stage: needs patch status: open title: Doc styles for print should only use dark colors type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:26:13 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 08 Nov 2010 15:26:13 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1289229973.99.0.649610782204.issue10225@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:00:51 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Nov 2010 16:00:51 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289232051.52.0.341797882835.issue10357@psf.upfronthosting.co.za> R. David Murray added the comment: I think the Glossary entry needs to be updated to point to the authoritative source for 'mapping' methods: http://docs.python.org/library/collections.html#abcs-abstract-base-classes (and yes, I realize that info is not located in a particularly intuitive location!) I wonder, however, if the code should be updated to use a dictionary iterator rather than 'keys'. ---------- nosy: +r.david.murray, rhettinger stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:12:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 16:12:59 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1289232779.54.0.416970122574.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As discussed on #python-dev, building 3.x documentation using python3.x will require Sphinx 1.1 which will not be released in time for 3.2. I am adding #10225 as a dependency because I feel that fixing actual errors in ReST doctests is more important than upgrading documentation tool chain. Hopefully this will bring more eyes to that issue. This said, I believe it is important for python-dev to "eat their own dogfood" and make 3.2 self-hosting. In other words, if we want to convince users that 3.x is ready, we should not require 2.x in the build process. Fortunately, Doc/tools is not shipped with python releases, so the transition can be made at any time regardless of python release schedule. ---------- dependencies: +Fix doctest runable examples in python manual stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:20:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 08 Nov 2010 16:20:16 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1289233216.34.0.852823658728.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree that 3.2 should eventually be independent of a 2.x Python. Since the "port to 3.x" part of Sphinx 1.1 is basically done, I might just do an early alpha release and use that for Doc/tools before 3.2 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:28:31 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Nov 2010 16:28:31 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289233711.19.0.388788804497.issue10357@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:19:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2010 19:19:12 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In 3.x, "(object)" is now superfluous in class statements. Reference manual 7.7. Class definitions has simply class Foo: pass In library manual 2. Built-in Functions, class examples for classmethod and staticmethod are the same. Class examples for dir, property, and type still have '(object)' in their class examples. Section 5.11.4. Methods example omits it. I cannot think of anywhere else there should be such examples. I think we should be consistent and remove the remaining occurrences of '(object)' in the function examples. They can only confuse newcomers. This part is easy. I also think the doc for 'class' should say that the default inheritance is from the base class *object* (I presume this should be true in all implementations) and that class Foo(object): pass is the same as the above (unless the name 'object' has been rebound!). ---------- assignee: docs at python components: Documentation keywords: easy messages: 120795 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Remove unneeded '(object)' from 3.x class examples versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:51:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 19:51:38 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289245898.06.0.770831802804.issue10366@psf.upfronthosting.co.za> ?ric Araujo added the comment: Other unneeded uses of object, courtesy of grep: library/sqlite3.rst:713: class Point(object): library/multiprocessing.rst:1335: class MathsClass(object): library/functions.rst:281: >>> class Foo(object): library/functions.rst:897: class C(object): library/functions.rst:916: class Parrot(object): library/functions.rst:933: class C(object): library/functions.rst:1237: >>> class X(object): library/argparse.rst:1315: >>> class C(object): library/ctypes.rst:372: >>> class Bottles(object): library/itertools.rst:326: class groupby(object): howto/descriptor.rst:156: class RevealAccess(object): howto/descriptor.rst:173: >>> class MyClass(object): howto/descriptor.rst:205: class C(object): howto/descriptor.rst:214: class Property(object): howto/descriptor.rst:250: class Cell(object): howto/descriptor.rst:278: class Function(object): howto/descriptor.rst:286: >>> class D(object): howto/descriptor.rst:358: >>> class E(object): howto/descriptor.rst:371: class StaticMethod(object): howto/descriptor.rst:384: >>> class E(object): howto/descriptor.rst:419: class ClassMethod(object): howto/sorting.rst:228: class K(object): reference/datamodel.rst:1990: >>> class C(object): includes/sqlite3/adapter_point_2.py:3:class Point(object): includes/sqlite3/converter_point.py:3:class Point(object): includes/sqlite3/adapter_point_1.py:3:class Point(object): includes/mp_newtype.py:15:class Foo(object): ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:52:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Nov 2010 19:52:51 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289245971.24.0.207520780076.issue10366@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 22:56:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2010 21:56:46 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1289253406.51.0.866400371005.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: Using cell spanning breaks ?make latex? (and thus PDF), you may want to rework the reST table markup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:38:41 2010 From: report at bugs.python.org (Fergal Daly) Date: Mon, 08 Nov 2010 22:38:41 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289255921.24.0.228310493256.issue10357@psf.upfronthosting.co.za> Fergal Daly added the comment: Even if the glossary pointed to collections.html, there are far more methods specified there than are needed to be **able. The code just calls into the same code as dict.update(dict) (although .update can also work on a sequence of twouples). dict.update's doc string is explicit about what it requires from the argument: | update(...) | D.update(E, **F) -> None. Update D from dict/iterable E and F. | If E has a .keys() method, does: for k in E: D[k] = E[k] | If E lacks .keys() method, does: for (k, v) in E: D[k] = v | In either case, this is followed by: for k in F: D[k] = F[k] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:13:21 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Nov 2010 23:13:21 +0000 Subject: [docs] [issue10357] ** and "mapping" are poorly defined in python docs In-Reply-To: <1289222187.72.0.886873143688.issue10357@psf.upfronthosting.co.za> Message-ID: <1289258001.62.0.623259608123.issue10357@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Even if the glossary pointed to collections.html, > there are far more methods specified there than > are needed to be **able. That is an implementation detail and is subject to change. If someone supplies an argument satisfying collections.Mapping, that should be sufficient across all implementations. > dict.update's doc string is explicit about what > it requires from the argument: Duck-typing is still allowed when explicit requirements have been exposed (we do this a lot with .readline() for example). For the most part though, we want to specify "needs a Mapping" in the sense of collections.Mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:56:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 02:56:23 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289271383.15.0.956065974254.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: >From IRC (raymondh): in the turtle docs, can you add a quick start guide (like we have in the unittest docs) the turtle docs have grown into a small book and is intimidating to get started with. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:22:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 03:22:42 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289272962.44.0.220806698202.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- title: Improve 24.5. turtle doc -> Improve turtle module documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:46:41 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 09 Nov 2010 05:46:41 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289281601.14.0.454632083985.issue10318@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:26:07 2010 From: report at bugs.python.org (Valery Khamenya) Date: Tue, 09 Nov 2010 10:26:07 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289298367.59.0.916130623053.issue10351@psf.upfronthosting.co.za> Valery Khamenya added the comment: Hi ?ric, thanks for guiding. So, attached is the concatenation of two forward unified diffs for rlcompleter.py and test_rlcompleter.py -- both as of py3k trunk. Tested against Python 3.1.2 though. P.S. hm, py3k code appeared to be surprisingly nicer -- no unicode troubles and work-arounds at all... regards Valery ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file19555/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:09:06 2010 From: report at bugs.python.org (Kirk Clendinning) Date: Tue, 09 Nov 2010 13:09:06 +0000 Subject: [docs] [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> New submission from Kirk Clendinning : In 2.7. Installing Additional Files the example shows: setup(..., data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), ('config', ['cfg/data.cfg']), ('/etc/init.d', ['init-script'])] ) However, running easy_install with setuptools results in a error: Setup script exited with error: SandboxViolation: open('/etc/init.d/init-script', 'wb') {} Perhaps the documentation should be changed and more explanation added. ---------- assignee: docs at python components: Documentation messages: 120863 nosy: docs at python, lensart priority: normal severity: normal status: open title: Setup Script example incorrect type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From fdrake at acm.org Tue Nov 9 14:34:41 2010 From: fdrake at acm.org (Fred Drake) Date: Tue, 9 Nov 2010 08:34:41 -0500 Subject: [docs] Typo in ConfigParser documentation In-Reply-To: References: Message-ID: On Fri, Nov 5, 2010 at 2:01 PM, Eriel Thomas wrote: > In the third paragraph of the ConfigParser documentation > (http://docs.python.org/library/configparser.html), there is a typo where > the word "spection" should instead read "section". Fixed in our sources for Python 2.7 and 3.1. The Python 3.2 documentation for configparser is undergoing substantial editing; we'll make sure this is fixed as part of that. Thanks for your report! ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From report at bugs.python.org Tue Nov 9 15:53:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:53:23 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314403.14.0.241318159497.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As a follow-up to Raymond's suggestion, I am attaching a patch that will add a sidebar to the introduction section of the turtle documentation section. While it is not common to include screenshots in python documentation, I think it is very appropriate for a visual module such as turtle. I considered a "Basic example" subsection similar to that in unittest module documentation, but turtle introduction already has a basic example (forward(15); left(25) embedded in the prose, so I think a sidebar like this is more appropriate. Since svn does not include binary files in the patch, I will have to attach the embedded image separately. I will also post a screenshot of the rendered HTML page. ---------- Added file: http://bugs.python.org/file19557/turtle-star-sidebar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:54:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:54:09 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314449.81.0.776597511441.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19558/turtle-star.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:55:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 14:55:05 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289314505.07.0.822652445416.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file19559/turtle-sidebar-screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:26:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 15:26:52 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289316412.39.0.522687617612.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I like it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:51:55 2010 From: report at bugs.python.org (James Hutchison) Date: Tue, 09 Nov 2010 15:51:55 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> New submission from James Hutchison : The Unzip module is always unbuffered (tested v.3.1.2 Windows XP, 32-bit). This means that if one has to do many small reads it is a lot slower than reading a chunk of data to a buffer and then reading from that buffer. It seems logical that the unzip module should default to buffered reading and/or have a buffered argument. Likewise, the documentation should clarify that there is no buffering involved when doing a read, which runs contrary to the default behavior of a normal read. start Zipfile read done 27432 reads done took 0.859 seconds start buffered Zipfile read done 27432 reads done took 0.072 seconds start normal read (default buffer) done 27432 reads done took 0.139 seconds start buffered normal read done 27432 took 0.137 seconds ---------- assignee: docs at python components: Documentation, IO, Library (Lib) messages: 120871 nosy: Jimbofbx, docs at python priority: normal severity: normal status: open title: ZipFile unzip is unbuffered type: performance versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:52:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 15:52:54 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289317974.74.0.0517596923335.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Sat, Oct 30, 2010 at 8:27 PM, Terry J. Reedy wrote: .. > Sections about 2.x changes should not be in 3.x docs. I agree. Neither "Changes since Python 2.6" nor "Changes since Python 2.6" belong in this section. The first belongs to "What's new in Python 2.7" and the second to "What's new in Python 3.1". Do we edit these files retroactively? I don't want to simply remove these sections. Raymond, can you advise? On a similar note, I don't think the introduction section should refer to "the old turtle module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:55:17 2010 From: report at bugs.python.org (James Hutchison) Date: Tue, 09 Nov 2010 15:55:17 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1289318117.85.0.369237202019.issue10376@psf.upfronthosting.co.za> James Hutchison added the comment: I should clarify that this is the zipfile constructor I am using: zipfile.ZipFile(filename, mode='r', allowZip64=True); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:45:36 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2010 16:45:36 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289321136.23.0.232260553624.issue7061@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The mini change log is harmless. I would leave it as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:46:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 16:46:32 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289321192.07.0.380272666306.issue10318@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to add my +1 to Eric's msg120485 above. What I really find puzzling is why some scripts in Tools/ have hashbangs, but don't have execute permission. Tools/scripts/cleanfuture.py Tools/scripts/combinerefs.py Tools/scripts/db2pickle.py Tools/scripts/find_recursionlimit.py Tools/scripts/md5sum.py Tools/scripts/pickle2db.py Tools/scripts/pysource.py Tools/scripts/svneol.py I suggest a simple rule: no execute bit set in permissions - no hashbang line. And I don't think stdlib modules should have execute bit: -rwxr-xr-x Lib/base64.py -rwxr-xr-x Lib/cProfile.py -rwxr-xr-x Lib/cgi.py -rwxr-xr-x Lib/keyword.py -rwxr-xr-x Lib/pdb.py -rwxr-xr-x Lib/platform.py -rwxr-xr-x Lib/profile.py -rwxr-xr-x Lib/pydoc.py -rwxr-xr-x Lib/quopri.py -rwxr-xr-x Lib/smtpd.py -rwxr-xr-x Lib/smtplib.py -rwxr-xr-x Lib/symbol.py -rwxr-xr-x Lib/tabnanny.py -rwxr-xr-x Lib/token.py -rwxr-xr-x Lib/uu.py -rwxr-xr-x Lib/test/pystone.py -rwxr-xr-x Lib/test/re_tests.py -rwxr-xr-x Lib/test/regrtest.py -rwxr-xr-x Lib/test/test_array.py -rwxr-xr-x Lib/test/test_binhex.py -rwxr-xr-x Lib/test/test_dbm_gnu.py -rwxr-xr-x Lib/test/test_dbm_ndbm.py -rwxr-xr-x Lib/test/test_errno.py -rwxr-xr-x Lib/test/test_userstring.py ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:01:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 17:01:13 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1289321136.23.0.232260553624.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Nov 9, 2010 at 11:45 AM, Raymond Hettinger wrote: .. > Raymond Hettinger added the comment: > > The mini change log is harmless. ?I would leave it as is. It is not entirely harmless. First, it occupies valuable easy to scroll to end-of-page real estate which is better used for the "Demo scripts" section. Second, "Changes since 3.0" in 3.2 documentation without "Changes since 3.1" give a feel of unmaintained module. Third, "Changes since 3.0" refers to the Demo directory which no longer exists and I don't want to add "Changes since 3.1" to fix that. However, I don't feel too strongly about removing them. I would leave this for the "What's new" editor to decide and if that's Raymond, I guess the decision has been made. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:12:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Nov 2010 18:12:15 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289326335.49.0.526130164544.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, the mini change logs are both distracting noise and contrary to the general start-fresh policy for 3.x docs, stated somewhere by Georg B, which I really like. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:46:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 09 Nov 2010 18:46:34 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289328393.98.0.900190004869.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed a slightly modified turtle-star-sidebar.diff in revision 86364. Note that I've included both pdf and postscript files in case someone would want to run postscript through a better distiller than the OSX preview that I used. The postscript was produced using postscript() method of the tkinter canvas and bbox was manually adjusted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:00:53 2010 From: report at bugs.python.org (Richard Fuhr) Date: Tue, 09 Nov 2010 21:00:53 +0000 Subject: [docs] [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> New submission from Richard Fuhr : When running Python 2.7 if you invoke help(divmod) the first line of the resulting help displays Help on built-in function divmod in module __builtin__: but I believe that the name of the module is __builtins__ so the line should say Help on built-in function divmod in module __builtinsq__: ---------- assignee: docs at python components: Documentation messages: 120900 nosy: docs at python, rdfuhr priority: normal severity: normal status: open title: Typo in results of help(divmod) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:04:41 2010 From: report at bugs.python.org (Richard Fuhr) Date: Tue, 09 Nov 2010 21:04:41 +0000 Subject: [docs] [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289336681.15.0.303453593026.issue10378@psf.upfronthosting.co.za> Richard Fuhr added the comment: I had a typo in my own bug report that was reporting a typo; what I intended to say was the following ( the q should not have been there at the end ) When running Python 2.7 if you invoke help(divmod) the first line of the resulting help displays Help on built-in function divmod in module __builtin__: but I believe that the name of the module is __builtins__ so the line should say Help on built-in function divmod in module __builtins__: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:54:04 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 09 Nov 2010 23:54:04 +0000 Subject: [docs] [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289346844.12.0.932480546757.issue10378@psf.upfronthosting.co.za> Andreas St?hrk added the comment: __builtin__ is the correct name for the module (see http://docs.python.org/library/__builtin__.html, especially the note at the end which is the cause of the confusion), hence this is not a bug. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:55:00 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 09 Nov 2010 23:55:00 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289346900.37.0.770692906748.issue10351@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:55:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 09 Nov 2010 23:55:58 +0000 Subject: [docs] [issue10378] Typo in results of help(divmod) In-Reply-To: <1289336453.31.0.743925531352.issue10378@psf.upfronthosting.co.za> Message-ID: <1289346958.65.0.773502228658.issue10378@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:08:19 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 10 Nov 2010 00:08:19 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289347699.55.0.953842983987.issue10379@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:35:18 2010 From: report at bugs.python.org (Richard Fuhr) Date: Wed, 10 Nov 2010 06:35:18 +0000 Subject: [docs] [issue10378] Typo in results of help(divmod) In-Reply-To: <1289346844.12.0.932480546757.issue10378@psf.upfronthosting.co.za> Message-ID: <584C9BFA-ED59-4B31-9AC1-FF1D2DC8494F@gmail.com> Richard Fuhr added the comment: OK, thanks for the clarification. I am new to Python. Sent from my iPod On Nov 9, 2010, at 3:54 PM, Andreas St?hrk wrote: > > Andreas St?hrk added the comment: > > __builtin__ is the correct name for the module (see http://docs.python.org/library/__builtin__.html, especially the note at the end which is the cause of the confusion), hence this is not a bug. > > ---------- > nosy: +Trundle > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From jgrant at splunk.com Mon Nov 8 23:36:00 2010 From: jgrant at splunk.com (Justin Grant) Date: Mon, 8 Nov 2010 14:36:00 -0800 Subject: [docs] http://docs.python.org/library/datetime.html has a sample which contradicts advice on the page Message-ID: <79A1E64A36D5D64A86E9A06BC828068001390E73C8@EXVMBX017-1.exch017.msoutlookonline.net> The datetime docs (http://docs.python.org/library/datetime.html) have a code sample which doesn't follow advice from another part of the same page. First, here's the advice: Special requirement for pickling: A tzinfo subclass must have an __init__() method that can be called with no arguments, else it can be pickled but possibly not unpickled again. This is a technical requirement that may be relaxed in the future. Here's the sample: class FixedOffset(tzinfo): """Fixed offset in minutes east from UTC.""" def __init__(self, offset, name): self.__offset = timedelta(minutes = offset) self.__name = name def utcoffset(self, dt): return self.__offset This sample, if It's following the page's own advice, should have an __init__ method to support pickling which has no required parameters (except self, of course). Something like this: def __init__(self, offset_hours=0, offset_minutes=0, name=''): Of course, this may not be the right behavior either (e.g. might want to create a default name for the time zone based on hours & minutes) but at least by specifying default parameter values you avoid hard-to-troubleshoot exceptions at runtime like your existing sample did for me. :-) Thanks! Justin Grant jgrant at splunk.com | +1 415 848 8578 Splunk | Product Management -------------- next part -------------- An HTML attachment was scrubbed... URL: From gthm159 at gmail.com Tue Nov 9 21:19:22 2010 From: gthm159 at gmail.com (Gautam Kotian (Googie)) Date: Tue, 9 Nov 2010 21:19:22 +0100 Subject: [docs] Documentation typo Message-ID: section 5.4 (Sets) The 3rd line in the demonstration section (output of the "print(basket)" command) has an error. 'banana' has been mis-spelled as 'bananna' - Googie -------------- next part -------------- An HTML attachment was scrubbed... URL: From georg at python.org Wed Nov 10 08:56:13 2010 From: georg at python.org (Georg Brandl) Date: Wed, 10 Nov 2010 08:56:13 +0100 Subject: [docs] Documentation typo In-Reply-To: References: Message-ID: <4CDA501D.3030609@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 09.11.2010 21:19, schrieb Gautam Kotian (Googie): > section 5.4 (Sets) > The 3rd line in the demonstration section (output of the "print(basket)" > command) has an error. > 'banana' has been mis-spelled as 'bananna' > > - Googie Thanks for the report, this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzaUB0ACgkQN9GcIYhpnLDHcQCgqOTnRV9bCvNmy4TG9n7JZbi8 KkkAn3Hf/qGReS/JpLrijIv+MOoAzAfM =nSFz -----END PGP SIGNATURE----- From report at bugs.python.org Wed Nov 10 08:58:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 10 Nov 2010 07:58:32 +0000 Subject: [docs] [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289375912.54.0.081138180798.issue10358@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree and will add a print-media stylesheet. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:34:04 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 10 Nov 2010 16:34:04 +0000 Subject: [docs] [issue10358] Doc styles for print should only use dark colors In-Reply-To: <1289224086.88.0.0372722217541.issue10358@psf.upfronthosting.co.za> Message-ID: <1289406844.47.0.304837415359.issue10358@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Wed Nov 10 16:27:16 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 10 Nov 2010 10:27:16 -0500 Subject: [docs] Use of title-case in section titles Message-ID: Apple style guide recommends that section titles be written in title-case (a set of confusing rules where most words are capitalized). However, with few exceptions, per module sections have titles with only the first word in capitals: 6. String Services 6.1. string ? Common string operations 6.2. re ? Regular expression operations .. 6.7. unicodedata ? Unicode Database 6.8. stringprep ? Internet String Preparation Third level subsections are mostly capitalizing the first word as well. I personally prefer to use sentence case in section titles. Note that "string ? Common string operations" is neither sentence nor title case: it title-case it would be "string ? Common String Operations" and in sentence-case, it would be ""string ? common string operations" because the first word of the sentence is "string", not "common". Since most of the existing documentation does not follow Apple style guide in this respect, I think we should document an appropriate recommendation in Python documentation style guide and use it more consistently. From alexander.belopolsky at gmail.com Wed Nov 10 20:28:09 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 10 Nov 2010 14:28:09 -0500 Subject: [docs] Single quotes are rendered as U2019 in PDF Message-ID: In PDF output (see for example 3.1.2 Strings section in tutorial.pdf), single-quote characters in code samples are rendered as unicode U2019, RIGHT SINGLE QUOTATION MARK. This conflicts with copy and paste from PDF to python prompt. From tom at holizz.com Wed Nov 10 20:45:39 2010 From: tom at holizz.com (Tom Adams) Date: Wed, 10 Nov 2010 14:45:39 -0500 Subject: [docs] Compiler package deprecated/removed Message-ID: Sorry, I'm being very rude by sending messages to a mailing list but not subscribing. But in lieu of a bug tracker this will have to do. Usually the docs are pretty good, and point you in the right direction when a package gets deprecated, but this is an exception: http://docs.python.org/library/compiler.html "Deprecated since version 2.6: The compiler package has been removed in Python 3.0." I was expecting the message to continue on to say what package(s) replace the functionality of the compiler package. Thankfully Google/StackOverflow had the answer: http://stackoverflow.com/questions/909092/why-is-the-compiler-package-discontinued-in-python-3 Thanks, Tom From alexander.belopolsky at gmail.com Thu Nov 11 02:57:44 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 10 Nov 2010 20:57:44 -0500 Subject: [docs] 2.x-ism in builtins module doc Message-ID: In " ... most modules have the name __builtins__ (note the 's')", the "(note the 's')" part is clearly a leftover from 2.x where builtins was called __builtin__. I suggest removing it. See http://docs.python.org/dev/library/builtins.html From report at bugs.python.org Wed Nov 10 19:20:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 10 Nov 2010 18:20:23 +0000 Subject: [docs] [issue7061] Improve turtle module documentation In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1289413223.13.0.236219045402.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Sun, Oct 31, 2010 at 8:00 PM, ?ric Araujo wrote: .. > ?Python? is lower-cased only when referring to the executable (as a > file) itself. ?When talking about the language, the implementation or > the VM in an abstract way (not a file), It think it?s always ?Python?. For the record, this is covered in the Python documentation style guide: """ Python The name of our favorite programming language is always capitalized. """ http://docs.python.org/dev/documenting/style.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:26:48 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Nov 2010 15:26:48 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289402808.72.0.397703728938.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, obviously that language can be improved. 'exactly' was meant to imply 'nothing but', but clearly it doesn't. If we want to restore more stringent backward compatibility and allow trailing text, it would be possible to make format an alias for format_string. I'm not sure this is a good idea, but it is the most sensible way to restore backward compatibility while still fixing the original bug that I can think of. Or...perhaps there is little need of both 'format' and 'format_string' as public APIs, and we could deprecate (without removing) one of them. On the other hand, I believe the original bug affects the Ubuntu code that triggered this report...in other words, absent this fix chances are there would eventually have been a bug report against that code that would have necessitated that it change to use format_string anyway in order to get the correct locale-specific number formatting. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:09:41 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Nov 2010 16:09:41 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289405381.44.0.108076468519.issue10379@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Please use the deprecation process when possible. That would mean creating an alias for the function you want to remove somewhat like this (taken from configparser): def readfp(self, fp, filename=None): """Deprecated, use read_file instead.""" warnings.warn( "This method will be removed in future versions. " "Use 'parser.read_file()' instead.", PendingDeprecationWarning, stacklevel=2 ) self.read_file(fp, source=filename) ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From fdrake at acm.org Thu Nov 11 14:14:09 2010 From: fdrake at acm.org (Fred Drake) Date: Thu, 11 Nov 2010 08:14:09 -0500 Subject: [docs] Use of title-case in section titles In-Reply-To: References: Message-ID: On Wed, Nov 10, 2010 at 10:27 AM, Alexander Belopolsky wrote: > Since most of the existing documentation does not follow Apple style > guide in this respect, I think we should document an appropriate > recommendation in Python documentation style guide and use it more > consistently. +1 Apple's style guide aside, I think title case has generally fallen out of favor in general usage. I'd be fine with sentence case or something similar. And sentence case is relatively easy to explain. ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From report at bugs.python.org Thu Nov 11 16:32:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 15:32:10 +0000 Subject: [docs] [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289489530.43.0.686056074351.issue10389@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 about the patch, if you add an example: ?sentence case? may not be obvious for everyone. If it?s ?modulename ? Module description?, I agree. Also, s/white space/whitespace/. ---------- nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:40:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 19:40:44 +0000 Subject: [docs] [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289504444.19.0.770961014835.issue10389@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The new patch, issue10389.diff, addresses ?ric's comments and adds an entry for "reST". ---------- Added file: http://bugs.python.org/file19571/issue10389.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:36:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 21:36:15 +0000 Subject: [docs] [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289511375.82.0.658148166264.issue10389@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. I wouldn?t say reST is WYSIWYG, since it?s transformed, contrary to word processors where you make text bold to get it bold. (If you?re looking for other things to fix in that file, look at the entry for Unicode ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:42:52 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 11 Nov 2010 22:42:52 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289515372.58.0.806307086146.issue10379@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The bug has been fixed upstream by replacing .format() with .format_string(). I'm not sure I understand why there are two different methods - .format() seems kind of pointless to me, but then I don't use the locale module enough to say what's useful. For Python 2.7 I think the only thing we can do is to update the docs so that the distinction and restrictions are clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:44:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Nov 2010 22:44:19 +0000 Subject: [docs] [issue10389] Document rules for use of case in section titles In-Reply-To: <1289487956.63.0.138476981778.issue10389@psf.upfronthosting.co.za> Message-ID: <1289515459.77.0.58810681291.issue10389@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 86417. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:58:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 11 Nov 2010 22:58:37 +0000 Subject: [docs] [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289516317.34.0.280355031956.issue7950@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me, except the last two lines which I would reword or just remove. I wonder how many people use shell=True merely for the convenience of passing a string instead of a list. What do you think about adding a mention of str.split and shlex.split? ---------- nosy: +eric.araujo type: security -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:03:20 2010 From: report at bugs.python.org (Chris Rebert) Date: Thu, 11 Nov 2010 23:03:20 +0000 Subject: [docs] [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289516600.22.0.848265420585.issue7950@psf.upfronthosting.co.za> Chris Rebert added the comment: "the above Note" mentioned in those last two lines demonstrates shlex.split() and correct tokenization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:15:26 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 00:15:26 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1289520926.49.0.88713925474.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the distinction is that, before the bug fix that caused your issue, the 'format_string' method would use a regex to extract the % specifiers from the input string, and call 'format' to replace that % specifier with a properly localized result string. That is, 'format' was designed to handle a single % specifier with no extra text, basically as a helper method for format_string. The fact that it didn't reject extra text was, according to an internal comment, a defect of the implementation. (Passing any extra text would cause the implementation to fail to do the internationalization that was the entire reason for calling it.) When I fixed the bug I extracted the 'replace a single % specifier' code into an internal method, and made the format method live up to what I perceived to be its documented interface by rejecting extra input characters so that it could safely call the new internal substitution routine. Now, from the perspective of a *user* of the locale module, I fail to see the point in having both 'format' and 'format_string' exposed. If you want to format a single % specifier, just pass it to format_string. Thus my suggestion to make them both do the same thing (to cater to other code that may be calling format incorrectly) and then deprecate one of them (presumably format). To bad I didn't think of that when I fixed the original bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:25:37 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 12 Nov 2010 00:25:37 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289520926.49.0.88713925474.issue10379@psf.upfronthosting.co.za> Message-ID: <20101111192526.39c3ff9a@mission> Barry A. Warsaw added the comment: On Nov 12, 2010, at 12:15 AM, R. David Murray wrote: >Now, from the perspective of a *user* of the locale module, I fail to see the >point in having both 'format' and 'format_string' exposed. If you want to >format a single % specifier, just pass it to format_string. Thus my >suggestion to make them both do the same thing (to cater to other code that >may be calling format incorrectly) and then deprecate one of them (presumably >format). +1 >To bad I didn't think of that when I fixed the original bug. Dang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:36:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Nov 2010 00:36:45 +0000 Subject: [docs] [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1289522205.17.0.433931803126.issue7950@psf.upfronthosting.co.za> R. David Murray added the comment: Committed (as a warning) in r86419. Thanks, Chris. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:58:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 00:58:51 +0000 Subject: [docs] [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289523530.96.0.438072553683.issue7186@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is this obsoleted by #9451? ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:42:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:42:09 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289526129.73.0.198422720452.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. There are a few typos (pices, recive) and markup glitches, which you can fix if you?d like to learn more about the markup, or else leave to someone else. Those glitches are: bad indentation, missing blank line to make a new paragraph, text in backquotes without a :role: (or double backquotes for False). From a checkout, run ?make html? to see the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:43:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 01:43:06 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289526186.42.0.493118879703.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Also, s/receive few calls/receive more than one call/ (clearer IMO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:16:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 02:16:12 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289528172.26.0.794153522344.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: I hope the patch is not outdated. Terry, Georg, are you okay with it? ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:28:26 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 02:28:26 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289528906.55.0.445908032336.issue9312@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:05:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 03:05:47 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289531147.77.0.0882669267029.issue9312@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ok with me also to commit and backport for next releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:08:44 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 03:08:44 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1289531324.13.0.136199737647.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Georg, do you have any idea what the source of the index glitch is? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:36:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 04:36:30 +0000 Subject: [docs] [issue10304] error in tutorial triple-string example In-Reply-To: <1288830503.92.0.649702536247.issue10304@psf.upfronthosting.co.za> Message-ID: <1289536590.09.0.446455777731.issue10304@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1. I decided to add '\' since this is what I normally do and also add one sentence explanation. 2. I changed ending from ' ' to ','. Uploaded patch committed in rev86422, rev86423 ---------- keywords: +patch resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.1 Added file: http://bugs.python.org/file19575/Issue 10304.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:03:38 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 12 Nov 2010 06:03:38 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1289531147.77.0.0882669267029.issue9312@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Fri, Nov 12, 2010 at 05:05, Terry J. Reedy wrote: Please let me know if there are problems applying it and with which versions, I will fix it up to bring it up to date. It's a tricky patch (affects many files in many places), so there might be difficulties. ---------- Added file: http://bugs.python.org/file19577/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
On Fri, Nov 12, 2010 at 05:05, Terry J. Reedy <report at bugs.python.org> wrote:

Terry J. Reedy <tjreedy at udel.edu> added the comment:

Ok with me also to commit and backport for next releases.


Please let me know if there are problems applying it and with which versions, I will fix it up to bring it up to date. It's a tricky patch (affects many files in many places), so there might be difficulties.



From report at bugs.python.org Fri Nov 12 07:14:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:14:07 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289542447.74.0.335711596302.issue9312@psf.upfronthosting.co.za> Changes by Georg Brandl : Removed file: http://bugs.python.org/file19577/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:16:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:16:06 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289542565.98.0.578209555831.issue9312@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, please apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:21:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 06:21:02 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1289542862.14.0.272360268507.issue10008@psf.upfronthosting.co.za> Georg Brandl added the comment: It is indeed what Hirokazu suggested: there were two ".. class:: ZipFile" entries in the docs. I've added ":noindex:" now to one of them in r86425. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:22:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 17:22:09 +0000 Subject: [docs] [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289582529.08.0.914212432047.issue10373@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Setuptools is not a part of Python, and distutils docs don?t mention issues specific to third-party tools. I think I will reject this bug. ---------- assignee: docs at python -> eric.araujo nosy: +eric.araujo status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:00:06 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2010 18:00:06 +0000 Subject: [docs] [issue10344] codecs.readline doesn't care buffering=0 In-Reply-To: <1289084418.05.0.231852584468.issue10344@psf.upfronthosting.co.za> Message-ID: <1289584805.92.0.77981929031.issue10344@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please suggest a specific alteration in the codecs.readline doc that we can then discuss. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:36:09 2010 From: report at bugs.python.org (Jani Poikela) Date: Fri, 12 Nov 2010 19:36:09 +0000 Subject: [docs] [issue10398] errors in docs re module initialization vs self arg to functions In-Reply-To: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> Message-ID: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> New submission from Jani Poikela : Copy of issue 6421 Affects 2.7 too... ---------- assignee: docs at python components: Documentation messages: 121064 nosy: Jani.Poikela, aleax, docs at python, georg.brandl priority: normal severity: normal status: open title: errors in docs re module initialization vs self arg to functions type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:46:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 12 Nov 2010 19:46:06 +0000 Subject: [docs] [issue10398] errors in docs re module initialization vs self arg to functions In-Reply-To: <1289590568.94.0.655390055242.issue10398@psf.upfronthosting.co.za> Message-ID: <1289591166.72.0.0722964115999.issue10398@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, done in r86432. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From poppis.poikela at gmail.com Fri Nov 12 20:27:55 2010 From: poppis.poikela at gmail.com (Jani Poikela) Date: Fri, 12 Nov 2010 21:27:55 +0200 Subject: [docs] Python 2.7: inconsistency in "Extending Python with C or C++" example code Message-ID: Hi! I wonder the meaningfulness of the inconsistency in the example code in: http://docs.python.org/extending/extending.html#intermezzo-errors-and-exceptions in chapters 1.1 and 1.3 the example code has: return Py_BuildValue("i", sts); whereas chapter 1.2 example code has: return PyLong_FromLong(sts); Best Regards, Jani 'P?ppis' Poikela From belopolsky at users.sourceforge.net Fri Nov 12 20:02:46 2010 From: belopolsky at users.sourceforge.net (Alexander Belopolsky) Date: Fri, 12 Nov 2010 14:02:46 -0500 Subject: [docs] Suggested improvement to turtle module doc In-Reply-To: <4CDC7E34.5010605@netwok.org> References: <4CDC7E34.5010605@netwok.org> Message-ID: Hi Richard, Thank you for your report. Please take a look at the discussion of various improvements to turtle documentation at . Please see more answers below. .. > It took me far longer than it should have to figure out how to do the > most basic thing: from an interactive prompt (or elsewhere!) get the > turtle window up and have a controllable turtle. In the end I just > guessed and created a Turtle and it worked - though I still struggle to > see where this is mentioned in the docs. > We have recently added a sidebar to the introduction in the turtle manual that should help newcomers. See . > I believe the docs would benefit greatly from a simple example right at > the top like: > > """ > The easiest method of getting started is to open an interactive prompt > and type: > >>>> from turtle import * >>>> turtle = Turtle() > .. The turtle module provides both procedural and object-oriented interfaces. In my opinion, beginners should start with the procedural interface and this is what is now used in the sidebar. It is unfortunate that the manual uses "turtle" for both the name of the module and the name of the turtle instance used in OO examples. Any suggestions on how to improve this are welcome. From report at bugs.python.org Fri Nov 12 22:04:11 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 12 Nov 2010 21:04:11 +0000 Subject: [docs] [issue1665333] Documentation missing for OptionGroup class in optparse Message-ID: <1289595851.24.0.815589976439.issue1665333@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:53:44 2010 From: report at bugs.python.org (Kirk Clendinning) Date: Fri, 12 Nov 2010 21:53:44 +0000 Subject: [docs] [issue10373] Setup Script example incorrect In-Reply-To: <1289582529.08.0.914212432047.issue10373@psf.upfronthosting.co.za> Message-ID: <35DAEBAE-3158-48FF-9AAD-E0A04876634E@heliospectra.se> Kirk Clendinning added the comment: Interesting... the link at the bottom of the page for reporting bugs went to the python bug tracker.. perhaps the web page should be checked for an incorrect link. -k- On Nov 12, 2010, at 18:22 , ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Thanks for the report. Setuptools is not a part of Python, and distutils docs don?t mention issues specific to third-party tools. I think I will reject this bug. > > ---------- > assignee: docs at python -> eric.araujo > nosy: +eric.araujo > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:00:50 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 12 Nov 2010 22:00:50 +0000 Subject: [docs] [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289599250.09.0.723910410775.issue10373@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: > perhaps the web page should be checked for an incorrect link. The link from the Python documentation to the Python bug tracker is fine. If you were using distutils directly, it would be an issue for the Python tracker. You're not. setuptools is a separate project; you should refer to it's documentation and it's tracker. ---------- nosy: +fdrake resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:04:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 12 Nov 2010 22:04:25 +0000 Subject: [docs] [issue10373] Setup Script example incorrect In-Reply-To: <1289308146.55.0.869173171863.issue10373@psf.upfronthosting.co.za> Message-ID: <1289599465.13.0.058847565294.issue10373@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: rejected -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:44:10 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 12 Nov 2010 23:44:10 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1289605450.5.0.83462351356.issue10351@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:37:22 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 13 Nov 2010 04:37:22 +0000 Subject: [docs] [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> New submission from Fred L. Drake, Jr. : Some portions of the documentation are using the term "member" to mean "data attribute". This appears to be an aberration at this time, but occurrences should be identified and corrected, and "Documenting Python" updated to note correct usage. Example use: http://docs.python.org/dev/py3k/library/xmlrpc.client.html#fault-objects http://docs.python.org/dev/py3k/library/urllib.request.html#basehandler-objects (paragraph starting "The following members and methods should") "Members and methods" should just be "attributes". ---------- assignee: docs at python components: Documentation messages: 121110 nosy: docs at python, fdrake priority: normal severity: normal status: open title: Use "member" consistently _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 05:37:52 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 13 Nov 2010 04:37:52 +0000 Subject: [docs] [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289623072.1.0.364788032727.issue10403@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:51:15 2010 From: report at bugs.python.org (Xuanji Li) Date: Sat, 13 Nov 2010 05:51:15 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1289627475.66.0.857852085705.issue10366@psf.upfronthosting.co.za> Xuanji Li added the comment: Attached a patch to implement the suggested changes on 3.2. If the patch is ok I can do the same for 3.1. ---------- keywords: +patch nosy: +xuanji Added file: http://bugs.python.org/file19591/issue10366_remove_unneeded_object_py3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:54:34 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2010 08:54:34 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> New submission from Ned Deily : In neither the IDLE section of the Library Reference nor in IDLE's own help file is there any documentation on how to use its breakpoint capability. Since the menu options only appear if the user knows to Right-click (or Control-click on OS X - see issue10404), it would be easy for a user to never realize that the breakpoint capability exists. ---------- assignee: docs at python components: Documentation, IDLE messages: 121121 nosy: docs at python, kbk, ned.deily, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE breakpoint facility undocumented versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:18:29 2010 From: report at bugs.python.org (INADA Naoki) Date: Sat, 13 Nov 2010 19:18:29 +0000 Subject: [docs] [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> New submission from INADA Naoki : In http://docs.python.org/release/2.6.6/glossary.html, "iterable" is described as "A container object capable of returning its members one at a time." Is it correct? Is stream object like file a container type? Container ABC requires only "__contains__" abstract method. I think file is iterable but is not container. Likewise, "and objects of any classes you define with an __iter__() or __getitem__() method." is wrong because __getitem__ method is not relate to iterable. ---------- assignee: docs at python components: Documentation messages: 121152 nosy: docs at python, naoki priority: normal severity: normal status: open title: Is iterable a container type? versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:26:41 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:26:41 +0000 Subject: [docs] [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289690801.57.0.235163194714.issue10403@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > "Members and methods" should just be "attributes". +1 That substitution should be made almost everywhere. Individual slot variable are still called members though and their type is a member_descriptor. And the C API still has a tp_members entry. Otherwise, it looks like the term member is out-of-date. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:31:31 2010 From: report at bugs.python.org (Maciek J) Date: Sat, 13 Nov 2010 23:31:31 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1289691091.33.0.848598163662.issue10149@psf.upfronthosting.co.za> Maciek J added the comment: Couldn't compile to html at the moment, but it should be fine anyway. Note that I didn't wanted to start a new paragraph (I'm guessing you meant the sentence at line 13 of the patch) as there was no new paragraph in a previous version. ---------- Added file: http://bugs.python.org/file19599/pyexpat.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:41:30 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:41:30 +0000 Subject: [docs] [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289691690.16.0.463685806611.issue10410@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:51:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Nov 2010 23:51:25 +0000 Subject: [docs] [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289692285.61.0.112137812002.issue10410@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > "iterable" is described as "A container object > capable of returning its members one at a time." That wording is confusing. I'll fix it. > Likewise, "and objects of any classes you define > with an __iter__() or __getitem__() method." is > wrong because __getitem__ method is not relate to > iterable That wording is correct. Sequences are automatically iterable even if they don't define __iter__. For example: >>> class A: ... def __getitem__(self, i): ... if i > 10: ... raise IndexError(i) ... return i * 100 >>> list(A()) [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000] If you're curious, the details are in the PyObject_GetIter() function in http://svn.python.org/view/python/branches/release27-maint/Objects/abstract.c?view=markup . ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 06:27:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2010 05:27:58 +0000 Subject: [docs] [issue10410] Is iterable a container type? In-Reply-To: <1289675908.98.0.73683654885.issue10410@psf.upfronthosting.co.za> Message-ID: <1289712478.81.0.126349059671.issue10410@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Removed the incorrect "container" reference. See r86463. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:12:15 2010 From: report at bugs.python.org (Justin Lebar) Date: Sun, 14 Nov 2010 07:12:15 +0000 Subject: [docs] [issue10415] readline.insert_text documentation incomplete In-Reply-To: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> Message-ID: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> New submission from Justin Lebar : The readline documentation currently says: > readline.insert_text(string) > Insert text into the command line. But as far as I can tell, readline.insert_text() does something only when called from startup_hook or pre_input_hook. Here's an example of someone using the module in a way that works: http://swapoff.org/svn/cly/tags/0.7/cly/interactive.py ---------- assignee: docs at python components: Documentation messages: 121178 nosy: Justin.Lebar, docs at python priority: normal severity: normal status: open title: readline.insert_text documentation incomplete versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:14:46 2010 From: report at bugs.python.org (Justin Lebar) Date: Sun, 14 Nov 2010 07:14:46 +0000 Subject: [docs] [issue10415] readline.insert_text documentation incomplete In-Reply-To: <1289718734.94.0.0887962692453.issue10415@psf.upfronthosting.co.za> Message-ID: <1289718886.1.0.671776354961.issue10415@psf.upfronthosting.co.za> Justin Lebar added the comment: Actually, maybe startup_hook doesn't do what it sounds like it does and insert_text() only works from startup_hook. If this is the case, then the documentation for startup_hook could also be improved: > The startup_hook function is called with no arguments just before > readline prints the first prompt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 11:25:24 2010 From: report at bugs.python.org (INADA Naoki) Date: Sun, 14 Nov 2010 10:25:24 +0000 Subject: [docs] [issue10410] Is iterable a container type? In-Reply-To: <1289692285.61.0.112137812002.issue10410@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: >> Likewise, "and objects of any classes you define >> with an __iter__() or __getitem__() method." is >> wrong because __getitem__ method is not relate to >> iterable > > That wording is correct. ?Sequences are automatically > iterable even if they don't define __iter__. ?For example: Wow, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:01:14 2010 From: report at bugs.python.org (INADA Naoki) Date: Sun, 14 Nov 2010 23:01:14 +0000 Subject: [docs] [issue10420] Document of Bdb.effective is wrong. In-Reply-To: <1289775674.64.0.742644713798.issue10420@psf.upfronthosting.co.za> Message-ID: <1289775674.64.0.742644713798.issue10420@psf.upfronthosting.co.za> New submission from INADA Naoki : http://docs.python.org/library/bdb.html#bdb.effective >Determine if there is an effective (active) breakpoint at this line of code. >Return breakpoint number or 0 if none. bdb.effective doesn't return 0. If no breakpoint is found, it returns (None, None). ---------- assignee: docs at python components: Documentation messages: 121211 nosy: docs at python, naoki priority: normal severity: normal status: open title: Document of Bdb.effective is wrong. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From poissonnier at gmail.com Sun Nov 14 20:25:17 2010 From: poissonnier at gmail.com (Julien Poissonnier) Date: Sun, 14 Nov 2010 20:25:17 +0100 Subject: [docs] 9.5.1. Multiple Inheritance Message-ID: <1EB2DBAF-B498-4617-A5F2-9609F302F264@gmail.com> Minor error in http://docs.python.org/tutorial/classes.html#multiple-inheritance, 9.5.1. Multiple Inheritance: Last paragraph, first sentence has an extra "one" "(where one at least one of the parent classes can be accessed through multiple paths from the bottommost class)" should be "(where at least one of the parent classes can be accessed through multiple paths from the bottommost class)" From johnfranzini at comcast.net Sun Nov 14 23:52:27 2010 From: johnfranzini at comcast.net (John.Franzini@bigrock.us) Date: Sun, 14 Nov 2010 22:52:27 +0000 (UTC) Subject: [docs] Doc bug: v3.1.2 Library Reference 15.1.5 Files and Directories: os.walk() In-Reply-To: <700177505.1528832.1289774759669.JavaMail.root@sz0074a.westchester.pa.mail.comcast.net> Message-ID: <1934861111.1529114.1289775147060.JavaMail.root@sz0074a.westchester.pa.mail.comcast.net> The documentation of os.walk() is missing "Availability:". v3.1.2 Library Reference Section 15.1.5 Files and Directories: os.walk() Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Nov 15 11:30:35 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 15 Nov 2010 10:30:35 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> New submission from Steven Bethard : >From a personal email: ---------------------------------------------------------------------- I'm not signed up for all the Python issue tracking stuff, but thought I'd let you know about a problem with the argparse doc page: http://docs.python.org/library/argparse.html It says at the end: Replace options, args = parser.parse_args() with args = parser.parse_args() and add additional ArgumentParser.add_argument() calls for the positional arguments. But I think it should be options = parser.parse_args(), not args. ---------------------------------------------------------------------- They're not options, so I don't like encouraging people to continue to call them options, but the docs should at least make clear that the namespace object that used to be called "options" is now called "args". ---------- assignee: docs at python components: Documentation messages: 121219 nosy: bethard, docs at python priority: normal severity: normal stage: needs patch status: open title: s/args/options in arpgarse "Upgrading optparse code" versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:23:47 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Nov 2010 14:23:47 +0000 Subject: [docs] [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289831026.96.0.451424652126.issue7186@psf.upfronthosting.co.za> R. David Murray added the comment: No, because that patch doesn't document the special inheritance rules for __doc__ (which are uniquely special even among special methods). Now, exactly where one would want to document those rules, I'm not sure. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:53:17 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 15 Nov 2010 14:53:17 +0000 Subject: [docs] [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1289832797.89.0.188118329834.issue7186@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Mon Nov 15 17:22:01 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Mon, 15 Nov 2010 11:22:01 -0500 Subject: [docs] Extra list comprehension example Message-ID: > Ruud Althuizen wrote: > I just read this line from section 5.1.5: "To avoid apprehension when > nesting list comprehensions, read from right to left." I must've read > over that bit the first thousand times. Adding the example > probably makes it more obvious. I agree, this maxim, while appropriate for the tutorial, can be better presented. In the current version, the following paragraph is stuck between a nested list comprehension example and an equivalent nested for loop: """ Special care has to be taken for the nested list comprehension: To avoid apprehension when nesting list comprehensions, read from right to left. """ Other than rather subtle indentation, there is nothing to suggest that "To avoid apprehension ..." is an aphorism and that "apprehension" is not a Python term unknown to user. (The word "apprehension" rhymes well with "comprehension," but may lead to confusion if understood to mean "understanding; grasp." If "apprehension" is taken to mean "arrest," the dictum may or may not be helpful depending on the reader's sense of humor.) I think it would be best to move the maxim either to the paragraph before the "mat" example or to a paragraph after the equivalent for-loop. The text should explain the mnemonic nature of the rule and what "read from right to left" means in the "mat" example. Nested list comprehensions should also be contrasted to list comprehensions with multiple for clauses. From report at bugs.python.org Tue Nov 16 04:07:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 16 Nov 2010 03:07:16 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1289876836.49.0.0922055529635.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can I commit doc patches like this one despite the branch freeze? ---------- assignee: docs at python -> eric.araujo resolution: -> accepted status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:06:50 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 09:06:50 +0000 Subject: [docs] [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289898410.48.0.148437208222.issue10403@psf.upfronthosting.co.za> Senthil Kumaran added the comment: It is 'attributes' instead of term 'members'. The term 'method' when it denotes methods can be left as such. ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:07:45 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 16 Nov 2010 09:07:45 +0000 Subject: [docs] [issue10403] Use "member" consistently In-Reply-To: <1289623042.93.0.830099606418.issue10403@psf.upfronthosting.co.za> Message-ID: <1289898465.45.0.136303405792.issue10403@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From al3xgr at gmail.com Mon Nov 15 14:03:16 2010 From: al3xgr at gmail.com (Alexandros Marinos) Date: Mon, 15 Nov 2010 13:03:16 +0000 Subject: [docs] regular expression documentation bug Message-ID: In the page?http://docs.python.org/library/re.html, section 7.2.1, it says: '$' Matches the end of the string [...]?foo?matches both ?foo? and ?foobar?, while the regular expression?foo$ matches only ?foo?. this last sentence looked odd, so I tried it: print re.match('foo$', 'foobar') output: "None" I think a better example would be something like 'foobarfoo'. Regards, Alexandros From manikumar.dosapati at patni.com Tue Nov 16 04:47:03 2010 From: manikumar.dosapati at patni.com (Dosapati, Manikumar) Date: Tue, 16 Nov 2010 09:17:03 +0530 Subject: [docs] The result varies from the desired result as per document Message-ID: <359160E01614864BBBA665EFB23AC70205327DD752@EXCHINDMAIL.patni.com> Hi Team, On running the program given in section 4.4, the actual result is varying from expected and displayed result as shown in the tutorial. Please provide inputs regarding this behavior and suggest where I am going wrong. The program is for n in range(2, 10): ... for x in range(2, n): ... if n % x == 0: ... print(n, 'equals', x, '*', n//x) ... break ... else: ... # loop fell through without finding a factor ... print(n, 'is a prime number') The displayed or expected result as per tutorial is 2 is a prime number 3 is a prime number 4 equals 2 * 2 5 is a prime number 6 equals 2 * 3 7 is a prime number 8 equals 2 * 4 9 equals 3 * 3 On running the same program getting the result as shown below >>> for n in range(2,10): for x in range(2,n): if n%x ==0: print(n,'equals',x,'*',n//x) break else: print(n,'is aprime number') 3 is aprime number 4 equals 2 * 2 5 is aprime number 5 is aprime number 5 is aprime number 6 equals 2 * 3 7 is aprime number 7 is aprime number 7 is aprime number 7 is aprime number 7 is aprime number 8 equals 2 * 4 9 is aprime number 9 equals 3 * 3 >>> ________________________________ Information contained and transmitted by this e-mail is confidential and proprietary to Patni Computer Systems Ltd and its affiliates (hitherto referred as Patni Computers) and is intended for use only by the recipient. If you are not the intended recipient , you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or netadmin at patni.com. Patni Computers does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of Patni Computers. Patni Computers is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While Patni Computers has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checks before opening an attachment. To know more about Patni Computers please visit www.patni.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From georg at python.org Tue Nov 16 13:44:34 2010 From: georg at python.org (Georg Brandl) Date: Tue, 16 Nov 2010 13:44:34 +0100 Subject: [docs] regular expression documentation bug In-Reply-To: References: Message-ID: <4CE27CB2.8070607@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.11.2010 14:03, schrieb Alexandros Marinos: > In the page http://docs.python.org/library/re.html, section 7.2.1, it says: > > '$' > Matches the end of the string [...] foo matches both ?foo? and > ?foobar?, while the regular expression foo$ matches only ?foo?. > > this last sentence looked odd, so I tried it: > > print re.match('foo$', 'foobar') > > output: "None" > > I think a better example would be something like 'foobarfoo'. Hi Alexandros, I'm not sure what you think the bug is here. Your example shows that "foo$" does not match "foobar", as expected. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzifLIACgkQN9GcIYhpnLAAPACdEUQVGQh2VQ15+X4PP+BXeRtD 8rwAn0+YvyW/z1a+w1zHUTg+2T+LbtAC =hJaT -----END PGP SIGNATURE----- From francois at akising.com Tue Nov 16 15:20:36 2010 From: francois at akising.com (=?ISO-8859-1?Q?=22Fran=E7ois_Burtin=2C_Akis=22?=) Date: Tue, 16 Nov 2010 15:20:36 +0100 Subject: [docs] link is broken in http://docs.python.org/py3k/library/xml.etree.elementtree.html Message-ID: <4CE29334.7030700@akising.com> http://effbot.org/zone/element-index.htm is no more hosted by WebFaction ? : Site not configured (this link is in v2.7 doc too) From report at bugs.python.org Tue Nov 16 15:55:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 14:55:39 +0000 Subject: [docs] [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : As discussed in "Breaking undocumented API" thread [1] on python-dev, a definition of "public names" is buried deep in the language reference manual: """ The public names defined by a module are determined by checking the module?s namespace for a variable named __all__; if defined, it must be a sequence of strings which are names defined or imported by that module. The names given in __all__ are all considered public and are required to exist. If __all__ is not defined, the set of public names includes all names found in the module?s namespace which do not begin with an underscore character ('_'). __all__ should contain the entire public API. It is intended to avoid accidentally exporting items that are not part of the API (such as library modules which were imported and used within the module). """ [2] It has been argued that this is not the authoritative definition and alternatives have been suggested such as "any name that does not begin with an underscore except imported modules." mportant for the users and developers of cpython and other python implementations to know what names they can rely upon to stay defined between releases, the rules for "public names" should be documented. I agree that the library manual is a more appropriate place for such documentation. The definition should include the naming conventions and the set of promises that Python makes about public name availability in the future releases. [1] http://mail.python.org/pipermail/python-dev/2010-November/105490.html [2] http://docs.python.org/reference/simple_stmts.html ---------- assignee: docs at python components: Documentation messages: 121297 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: Document the rules for "public names" versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From georg at python.org Tue Nov 16 15:41:33 2010 From: georg at python.org (Georg Brandl) Date: Tue, 16 Nov 2010 15:41:33 +0100 Subject: [docs] link is broken in http://docs.python.org/py3k/library/xml.etree.elementtree.html In-Reply-To: <4CE29334.7030700@akising.com> References: <4CE29334.7030700@akising.com> Message-ID: <4CE2981D.3000107@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.11.2010 15:20, schrieb "Fran?ois Burtin, Akis": > http://effbot.org/zone/element-index.htm > is no more hosted by WebFaction ? : Site not configured > (this link is in v2.7 doc too) Hmm, that must be new. For now, I'm going to assume that it is a temporary downtime until Fredrik gets to fix his site. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzimB0ACgkQN9GcIYhpnLBFzACcCCy8D8GpRavuZ2pG/f81Y4Pb L3IAn2b1VOedk9jV3A0Ow/dqVvM7JBLO =y4a2 -----END PGP SIGNATURE----- From report at bugs.python.org Tue Nov 16 16:19:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 15:19:11 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289920751.51.0.102709837122.issue10433@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Documentation, Macintosh nosy: +docs at python versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:48:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 15:48:42 +0000 Subject: [docs] [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289922522.48.0.834984663548.issue10434@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Michael Foord suggested adding the following to developer documentation such as PEP 8. [1] I am not sure PEP 8 is the right place for it. In my opinion, PEP 8 is mostly about stylistic choices that don't have a major impact on the users. In other words, unless you are developing python itself, you are unlikely to consult PEP 8. The API stability rules, however affect every user who programmed in python long enough to see a major release. I don't have objections to Michael's definitions below, but if included in the library manual, they should be reworded to address the user rather than the developer of the API. """ How about making this explicit (either pep 8 or our developer docs): If a module or package defines __all__ that authoritatively defines the public interface. Modules with __all__ SHOULD still respect the naming conventions (leading underscore for private members) to avoid confusing users. Modules SHOULD NOT export private members in __all__. Names imported into a module a never considered part of its public API unless documented to be so or included in __all__. Methods / functions / classes and module attributes whose names begin with a leading underscore are private. If a class name begins with a leading underscore none of its members are public, whether or not they begin with a leading underscore. If a module name in a package begins with a leading underscore none of its members are public, whether or not they begin with a leading underscore. If a module or package doesn't define __all__ then all names that don't start with a leading underscore are public. All public members MUST be documented. Public functions, methods and classes SHOULD have docstrings. Private members may have docstrings. """ [1] [1] http://mail.python.org/pipermail/python-dev/2010-November/105476.html ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:18:41 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 16:18:41 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289924321.8.0.646729310435.issue10433@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:23:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 16 Nov 2010 16:23:21 +0000 Subject: [docs] [issue8649] Py_UNICODE_* functions are undocumented In-Reply-To: <1273250921.26.0.330435554177.issue8649@psf.upfronthosting.co.za> Message-ID: <1289924601.7.0.763490990035.issue8649@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There are more undocumented functions in unicode.h. It makes sense to fix all of them in one patch. Closing this as superseded by #10435. ---------- nosy: +belopolsky resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:29:44 2010 From: report at bugs.python.org (Ron Adam) Date: Tue, 16 Nov 2010 16:29:44 +0000 Subject: [docs] [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1289924984.42.0.499259802885.issue10434@psf.upfronthosting.co.za> Ron Adam added the comment: You may also want to update help topics. help("PRIVATENAMES"). Identifiers (Names) ******************* An identifier occurring as an atom is a name. See section *Identifiers and keywords* for lexical definition and section *Naming and binding* for documentation of naming and binding. When the name is bound to an object, evaluation of the atom yields that object. When a name is not bound, an attempt to evaluate it raises a ``NameError`` exception. **Private name mangling:** When an identifier that textually occurs in a class definition begins with two or more underscore characters and does not end in two or more underscores, it is considered a *private name* of that class. Private names are transformed to a longer form before code is generated for them. The transformation inserts the class name in front of the name, with leading underscores removed, and a single underscore inserted in front of the class name. For example, the identifier ``__spam`` occurring in a class named ``Ham`` will be transformed to ``_Ham__spam``. This transformation is independent of the syntactical context in which the identifier is used. If the transformed name is extremely long (longer than 255 characters), implementation defined truncation may happen. If the class name consists only of underscores, no transformation is done. Other topics that may be of interest. IDENTIFIERS NAMESPACES PACKAGES PRIVATENAMES SPECIALATTRIBUTES SPECIALIDENTIFIERS SPECIALMETHODS ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:31:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 16 Nov 2010 16:31:43 +0000 Subject: [docs] [issue9076] Add C-API documentation for PyUnicode_AsDecodedObject/Unicode and PyUnicode_AsEncodedObject/Unicode In-Reply-To: <1277422131.02.0.354002642954.issue9076@psf.upfronthosting.co.za> Message-ID: <1289925103.58.0.349233842849.issue9076@psf.upfronthosting.co.za> Georg Brandl added the comment: Documenting Unicode C APIs is now tracked in #10435. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:32:47 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 17:32:47 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1289928767.39.0.745639770036.issue10433@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 18:49:36 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 16 Nov 2010 17:49:36 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1289929776.19.0.656625135513.issue10318@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 21:23:32 2010 From: report at bugs.python.org (Ian) Date: Tue, 16 Nov 2010 20:23:32 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> New submission from Ian : Concerning this section of the docs: http://docs.python.org/library/functions.html#staticmethod There is no example for calling a static method from another static method within the same class. As I discovered later, it's simple: C.f() -- from inside the class or outside it. A total newbie will accept this and move on... but in other programming languages, it's frowned upon to the class name from within the class. For example, in PHP you use the "self::" prefix and Java you don't need a prefix at all. So, even though I had it right the first time, it didn't SEEM right... so I went on a wild goose chase, for nothing. Googling "java call static method" will get you java documentation that lists both cases, as does "c++ call static method" and "php call static method". I feel that by adding "Note: you must also use the C.f() syntax when calling from within the class", the documentation will be more complete. ---------- assignee: docs at python components: Documentation messages: 121314 nosy: docs at python, ifreecarve priority: normal severity: normal status: open title: list an example for calling static methods from WITHIN classes type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:02:36 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 21:02:36 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289941356.8.0.949981355561.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: IMO this follows logically from Python's self-consistent rules. I'm not convinced that the amount of extra verbiage required to detail this particular case would make the docs clearer, but you are welcome to suggest a wording for us to consider. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:04:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 21:04:02 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289941442.59.0.973669100063.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: Woops, I see you did suggest a wording. However, what you wrote is imprecise and confused me when I first read it (I thought you meant that self.f() didn't work!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:04:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 16 Nov 2010 21:04:59 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289941499.2.0.299370522329.issue10438@psf.upfronthosting.co.za> Georg Brandl added the comment: I tend to agree with David. Especially since calling base class methods also uses the explicit class name. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:06:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 16 Nov 2010 21:06:20 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289941580.81.0.214232295335.issue10438@psf.upfronthosting.co.za> Georg Brandl added the comment: > However, what you wrote is imprecise and confused me when I first read > it (I thought you meant that self.f() didn't work!). Well, it doesn't work in the specific case he mentioned of calling from another static method :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:08:09 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Nov 2010 21:08:09 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289941689.55.0.821097511999.issue10438@psf.upfronthosting.co.za> R. David Murray added the comment: Only because you don't *have* self. Which is why I said "imprecise" and not "incorrect" :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:44:25 2010 From: report at bugs.python.org (Ian) Date: Tue, 16 Nov 2010 22:44:25 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289947465.09.0.0488812610041.issue10438@psf.upfronthosting.co.za> Ian added the comment: Am I to understand that self.f() is a valid way to call a static method? Can you see how that would run counter to intuition for someone who is familiar with other languages? Given that, I would make the following (more precise) change: < It can be called either on the class (such as C.f()) or on an instance (such as C().f()). --- > It can be called either on the class (such as C.f()) or on an instance (such as C().f() or self.f()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:49:58 2010 From: report at bugs.python.org (Ian) Date: Tue, 16 Nov 2010 22:49:58 +0000 Subject: [docs] [issue10438] list an example for calling static methods from WITHIN classes In-Reply-To: <1289939012.34.0.0666500494472.issue10438@psf.upfronthosting.co.za> Message-ID: <1289947797.97.0.216405282845.issue10438@psf.upfronthosting.co.za> Ian added the comment: Disregard my previous comment; calling self.f() does not work from a static method. I stand by my previous suggestion, but I'll clarify it like this: "Note: you must also use the C.f() syntax when calling from a static method within the C class" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 01:08:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 00:08:56 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Python Codec Registry and support functions are well documented in codecs.h header file. It should be easy to convert that to reST. ---------- assignee: docs at python components: Documentation keywords: easy messages: 121329 nosy: belopolsky, docs at python, haypo, lemburg, loewis priority: normal severity: normal stage: needs patch status: open title: PyCodec C API is not documented in reST versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 02:04:27 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 17 Nov 2010 01:04:27 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1289955867.92.0.944469549012.issue10439@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Wed Nov 17 04:17:59 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Tue, 16 Nov 2010 22:17:59 -0500 Subject: [docs] sys.maxunicode documentation is imprecise Message-ID: """ sys.maxunicode An integer giving the largest supported code point for a Unicode character. The value of this depends on the configuration option that specifies whether Unicode characters are stored as UCS-2 or UCS-4. """ http://docs.python.org/dev/library/sys.html#sys.maxunicode The term "Unicode character" is imprecise. A better term is "Unicode code unit" as used in Data model/Sequences/Strings section. Also "sys.maxunicode" is not hyperlinked in Data model page. http://docs.python.org/dev/reference/datamodel.html#objects-values-and-types From alexander.belopolsky at gmail.com Wed Nov 17 04:24:04 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Tue, 16 Nov 2010 22:24:04 -0500 Subject: [docs] "Data" used as singular Message-ID: """ All data in a Python program is represented by objects or by relations between objects. """ http://docs.python.org/dev/reference/datamodel.html#objects-values-and-types s/is/are/ From georg at python.org Wed Nov 17 07:42:53 2010 From: georg at python.org (Georg Brandl) Date: Wed, 17 Nov 2010 07:42:53 +0100 Subject: [docs] "Data" used as singular In-Reply-To: References: Message-ID: <4CE3796D.4030301@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 17.11.2010 04:24, schrieb Alexander Belopolsky: > """ > All data in a Python program is represented by objects or by relations > between objects. > """ http://docs.python.org/dev/reference/datamodel.html#objects-values-and-types > > s/is/are/ - From http://oxforddictionaries.com/view/entry/m_en_gb0205520: "In modern non-scientific use, however, it is generally not treated as a plural." I don't think this the language reference falls under "scientific use". Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzjeW0ACgkQN9GcIYhpnLDTLgCeKXwl3Z4fag0YFwvgampRI9g4 4zkAn1G+eg8DjaR+S1hlgmGBOjmYoO2S =bw9n -----END PGP SIGNATURE----- From alexander.belopolsky at gmail.com Wed Nov 17 16:35:03 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 17 Nov 2010 10:35:03 -0500 Subject: [docs] FAQs collection is duplicated Message-ID: As far as I can tell, http://www.python.org/doc/faq/ (linked to from FAQs part on the main docs index) and http://www.python.org/doc/faq/ (linked to from the FAQs navigation sidebar entry) contain more or less the same material. Do we need both? From alexander.belopolsky at gmail.com Wed Nov 17 16:39:32 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 17 Nov 2010 10:39:32 -0500 Subject: [docs] "Python 3.x may be less useful than 2.x" Message-ID: Is this still the party line? http://docs.python.org/dev/faq/general.html#how-stable-is-python From fdrake at acm.org Wed Nov 17 16:56:33 2010 From: fdrake at acm.org (Fred Drake) Date: Wed, 17 Nov 2010 10:56:33 -0500 Subject: [docs] FAQs collection is duplicated In-Reply-To: References: Message-ID: On Wed, Nov 17, 2010 at 10:35 AM, Alexander Belopolsky wrote: > As far as I can tell, http://www.python.org/doc/faq/ (linked to from > FAQs part on the main docs index) and http://www.python.org/doc/faq/ > (linked to from the FAQs navigation sidebar entry) contain more or > less the same material. ?Do we need both? You're describing two links to the same resource; are you asking if we need both links, or did you have a question about the FAQ collection? ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From fdrake at acm.org Wed Nov 17 16:57:55 2010 From: fdrake at acm.org (Fred Drake) Date: Wed, 17 Nov 2010 10:57:55 -0500 Subject: [docs] "Python 3.x may be less useful than 2.x" In-Reply-To: References: Message-ID: On Wed, Nov 17, 2010 at 10:39 AM, Alexander Belopolsky wrote: > Is this still the party line? > > http://docs.python.org/dev/faq/general.html#how-stable-is-python I don't know, but it's still true AFAICT. ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From georg at python.org Wed Nov 17 17:07:08 2010 From: georg at python.org (Georg Brandl) Date: Wed, 17 Nov 2010 17:07:08 +0100 Subject: [docs] FAQs collection is duplicated In-Reply-To: References: Message-ID: <4CE3FDAC.4010005@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 17.11.2010 16:56, schrieb Fred Drake: > On Wed, Nov 17, 2010 at 10:35 AM, Alexander Belopolsky > wrote: >> As far as I can tell, http://www.python.org/doc/faq/ (linked to from >> FAQs part on the main docs index) and http://www.python.org/doc/faq/ >> (linked to from the FAQs navigation sidebar entry) contain more or >> less the same material. Do we need both? > > You're describing two links to the same resource; are you asking if we > need both links, or did you have a question about the FAQ collection? The other one he means is http://docs.python.org/faq where the FAQ lists were moved. I didn't remove the old location before, but I've done so now (with redirects). Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzj/awACgkQN9GcIYhpnLAHiwCfauzIoZuRG21RONMRmbvRNHRy 5WMAnjQTBtEMJyarI3UPk/DiLt0NFFPR =gYt2 -----END PGP SIGNATURE----- From fdrake at acm.org Wed Nov 17 17:11:51 2010 From: fdrake at acm.org (Fred Drake) Date: Wed, 17 Nov 2010 11:11:51 -0500 Subject: [docs] FAQs collection is duplicated In-Reply-To: <4CE3FDAC.4010005@python.org> References: <4CE3FDAC.4010005@python.org> Message-ID: On Wed, Nov 17, 2010 at 11:07 AM, Georg Brandl wrote: > The other one he means is http://docs.python.org/faq where the FAQ lists > were moved. ?I didn't remove the old location before, but I've done so > now (with redirects). Ah, ok. That makes sense. Thanks Georg! ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From alexander.belopolsky at gmail.com Wed Nov 17 17:19:17 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 17 Nov 2010 11:19:17 -0500 Subject: [docs] "Python 3.x may be less useful than 2.x" In-Reply-To: References: Message-ID: On Wed, Nov 17, 2010 at 10:57 AM, Fred Drake wrote: > On Wed, Nov 17, 2010 at 10:39 AM, Alexander Belopolsky > wrote: >> Is this still the party line? >> >> http://docs.python.org/dev/faq/general.html#how-stable-is-python > > I don't know, but it's still true AFAICT. I didn't mean to start another 2 vs 3 flame war, but I think this answer should mention that 2.x is now ultimately stable with no major releases planned for the future and an extended maintenance period. From fdrake at acm.org Wed Nov 17 17:52:48 2010 From: fdrake at acm.org (Fred Drake) Date: Wed, 17 Nov 2010 11:52:48 -0500 Subject: [docs] "Python 3.x may be less useful than 2.x" In-Reply-To: References: Message-ID: On Wed, Nov 17, 2010 at 11:19 AM, Alexander Belopolsky wrote: > I didn't ?mean to start another 2 vs 3 flame war, Not flaming! I just think it's still a fact. Eventually it won't be, and that page will need to change. > but I think this > answer should mention that 2.x is now ultimately stable with no major > releases planned for the future and an extended maintenance period. That would be a good addition, yes. ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From report at bugs.python.org Wed Nov 17 18:34:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 17:34:30 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290015270.54.0.449635128585.issue10446@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:31:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 17 Nov 2010 18:31:47 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290018707.09.0.233165494924.issue10446@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 to all. What about the best of both worlds: "MODULE REFERENCE"? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 22:03:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 17 Nov 2010 21:03:44 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290027824.23.0.191630959975.issue10446@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 to Georg. Note that there are people that feel uncomfortable with calling packages modules, but not me. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 00:00:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:00:14 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290034814.55.0.0407984399823.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The attached patch, issue10446.diff, makes help(sys) look as follows: NAME sys MODULE REFERENCE http://docs.python.org/release/3.2/library/sys The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter. .. Georg, I noticed that there is no http://docs.python.org/release/3.2 link yet, but I don't want to complicate the URL generation logic unnecessarily to accommodate pre-release versions. If you can suggest some simple test for pointing to 'dev' instead of 'release/X.Y', I'll add it, but I don't see it as a priority. If you test the patch from the source tree, please note that pydoc has some strange logic that excludes uninstalled modules except ones in a hardcoded list. This should be changed at some point. ---------- keywords: +patch Added file: http://bugs.python.org/file19629/issue10446.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 00:00:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:00:30 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290034830.56.0.734256899004.issue10446@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 00:53:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:53:38 +0000 Subject: [docs] [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1290038018.61.0.77239534194.issue7828@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: docs at python -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 00:54:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:54:56 +0000 Subject: [docs] [issue9738] Document the encoding of functions bytes arguments of the C API In-Reply-To: <1283380895.91.0.777071955411.issue9738@psf.upfronthosting.co.za> Message-ID: <1290038096.4.0.205944366044.issue9738@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Thu Nov 18 01:00:10 2010 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Thu, 18 Nov 2010 01:00:10 +0100 Subject: [docs] "Python 3.x may be less useful than 2.x" In-Reply-To: References: Message-ID: <4CE46C8A.8010403@netwok.org> [Fred] > [Alexander] >> Is this still the party line? >> >> http://docs.python.org/dev/faq/general.html#how-stable-is-python > > I don't know, but it's still true AFAICT. *Learning* Python 3.x is certainly a more pleasant experience than 2.x. Could this FAQ entry say something about that? It seems to me this would reflect the (sort of) common opinion stated elsewhere (a.k.a. ?3.x if you can, 2.x if you must? (== depend on third-party libraries)). really-non-flamewar-inducing-ly yours, ? From report at bugs.python.org Thu Nov 18 01:28:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 00:28:03 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290040083.28.0.103275818691.issue10446@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. Some remarks: 1) I assume you have checked that this code does not produce two newlines (one in the string, one from the print function or write method): +[snip], consult the module reference at the location listed above. +""") 2) ?If you can suggest some simple test for pointing to 'dev' instead of 'release/X.Y'? ? sys.version_info[3] != 'final' 3) People seem to go the the most recent version of the docs, not the release-specific version (I haven?t found the python-dev thread about that, maybe you remember it). The version{add,chang}ed directives help adjust the doc for older versions. So, are you sure it?s useful to make the links release-specific? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 02:01:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 01:01:11 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290040083.28.0.103275818691.issue10446@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Nov 17, 2010 at 7:28 PM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Looks good. ?Some remarks: > > 1) I assume you have checked that this code does not produce two newlines (one in the string, > one from the print function or write method): Yes, it should be clear from the output that I presented above. I think TextDoc.indent() takes care of the trailing '\n'. That won't work for maintenance branches. (I am not even sure docs are built for maintenance branches.) > 3) People seem to go the the most recent version of the docs, not the release-specific version > (I haven?t found the python-dev thread about that, maybe you remember it). > ?The version{add,chang}ed directives help adjust the doc for older versions. > ?So, are you sure it?s useful to make the links release-specific? Certainly. If we are talking about the most authoritative source. I don't think versionadded/changed tags are reliable enough and you don't want to send users to wrong docs when APIs change between releases. I am not so sure about micro-version, but there is no easy way to construct the latest micro-version link without changes on python.org. If there was say latest/X.Y, I would use that. Wait - there is: docs.python.org/X.Y. Would you prefer that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 02:59:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 01:59:14 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290045554.69.0.604166898808.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r86504 (3.2) and r86504 (3.1). ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:08:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 02:08:03 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290046083.63.0.441066550024.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: s/r86504 (3.1)/r86505 (3.1)/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:09:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 02:09:06 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290046146.6.0.142815261927.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r86504 (3.2) and r86505 (3.1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:09:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 02:09:13 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290046153.25.0.539670144798.issue10446@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- Removed message: http://bugs.python.org/msg121414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:09:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 02:09:14 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290046154.29.0.97247583039.issue10446@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- Removed message: http://bugs.python.org/msg121412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:24:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 02:24:38 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290047078.19.0.96743866471.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reopening to consider changing just the link (not other changes) in 2.7. At some point http://docs.python.org/library will point to 3.x and we get a bug in 2.7. ---------- status: closed -> open versions: +Python 2.7 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:05:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 04:05:26 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290053126.03.0.130498369593.issue9312@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: pending -> open Removed message: http://bugs.python.org/msg121259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:05:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 04:05:37 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290053137.41.0.174244950053.issue9312@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:21:20 2010 From: report at bugs.python.org (Ron Adam) Date: Thu, 18 Nov 2010 04:21:20 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290054080.09.0.453976305121.issue10446@psf.upfronthosting.co.za> Ron Adam added the comment: I noticed in your patch, the disclaimer only prints when pydoc can find a doc location (docloc is not None). So it may not get displayed at all depending on how python is installed. I also think having it on every page may be a bit overly cautious. (IMHO) I'm also not sure it is correct to have that when viewing third party modules as the doc location in those cases will be broken anyway. The obvious places to put it are: * top of the pydoc html module index. (first page displayed) * in the welcome message for interactive help() * help(help) * help(pydoc) It can still be defined in one location and then use "+ pydoc_disclaimer" in the desired locations. ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:26:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 04:26:45 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290054405.25.0.390821249675.issue10446@psf.upfronthosting.co.za> ?ric Araujo added the comment: >> 1) I assume you have checked that this code does not produce two newlines (one in the string, >> one from the print function or write method): > Yes, it should be clear from the output that I presented above. Okay, I had missed that. > I think TextDoc.indent() takes care of the trailing '\n'. What is take care? Removing it? > That won't work for maintenance branches. (I am not even sure docs are > built for maintenance branches.) 3.1 and 2.7 docs are rebuilt. > I am not so sure about micro-version There is only one version* directive which uses a micro number. It?s a bit unfortunate. > If there was say latest/X.Y, I would use that. Wait - > there is: docs.python.org/X.Y. Would you prefer that? My point was that people used 2.7 docs even when developing for 2.6. ---------- _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Thu Nov 18 05:34:45 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:34:45 -0500 Subject: [docs] unicodedata documentation refers to the wrong version of unicode Message-ID: """ This module provides access to the Unicode Character Database which defines character properties for all Unicode characters. The data in this database is based on the UnicodeData.txt file version 5.2.0 which is publicly available from ftp://ftp.unicode.org/. """ http://docs.python.org/library/unicodedata.html >>> import unicodedata >>> unicodedata.unidata_version '6.0.0' I suggest that the text be re-worded to avoid direct version reference and refer to unidata_version instead. Same problem in unicodedata docstring. From alexander.belopolsky at gmail.com Thu Nov 18 05:43:25 2010 From: alexander.belopolsky at gmail.com (Alexander Belopolsky) Date: Wed, 17 Nov 2010 23:43:25 -0500 Subject: [docs] unicodedata documentation refers to the wrong version of unicode In-Reply-To: References: Message-ID: Similarly, the Data Model page refers to the Unicode Standard 3.0. I would just drop the version. """ The built-in functions chr() and ord() convert between code units and nonnegative integers representing the Unicode ordinals as defined in the Unicode Standard 3.0. Conversion from and to other encodings are possible through the string method encode(). """ http://docs.python.org/dev/reference/datamodel.html#objects-values-and-types On Wed, Nov 17, 2010 at 11:34 PM, Alexander Belopolsky wrote: > """ > This module provides access to the Unicode Character Database which > defines character properties for all Unicode characters. The data in > this database is based on the UnicodeData.txt file version 5.2.0 which > is publicly available from ftp://ftp.unicode.org/. > """ http://docs.python.org/library/unicodedata.html > >>>> import unicodedata >>>> unicodedata.unidata_version > '6.0.0' > > I suggest that the text be re-worded to avoid direct version reference > and refer to unidata_version instead. ?Same problem in unicodedata > docstring. > From report at bugs.python.org Thu Nov 18 06:03:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 05:03:20 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290054405.25.0.390821249675.issue10446@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Nov 17, 2010 at 11:26 PM, ?ric Araujo wrote: .. >> If there was say latest/X.Y, I would use that. ?Wait - >> there is: docs.python.org/X.Y. ?Would you prefer that? > My point was that people used 2.7 docs even when developing for 2.6. The point of this bug report was that 3.x pydoc was sending users to 2.7, which is clearly unacceptable. As long as documentation bug fixes are backported to maintenance branches, I don't see an advantage in consulting 3.2 when developing for 3.1. Now, I keep this issue open to decide if we should backport this to 2.7 where this is not a bug (yet), but will be when default docs switch to 3.x. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:06:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 05:06:42 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290056802.56.0.308564936698.issue10446@psf.upfronthosting.co.za> ?ric Araujo added the comment: > The point of this bug report was that 3.x pydoc was sending users to > 2.7, which is clearly unacceptable. Agreed. My reply about x.y vs. x.y+1 was a reaction to your patch, not a misunderstanding of the point of this bug. > As long as documentation bug fixes are backported to maintenance > branches, I don't see an advantage in consulting 3.2 when developing for 3.1. I prefer version-specific docs too, but the thread on python-dev seemed to show I was not in the majority. > Now, I keep this issue open to decide if we should backport this to > 2.7 where this is not a bug (yet), but will be when default docs > switch to 3.x. What do you think? +1 for backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:19:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 05:19:58 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290054080.09.0.453976305121.issue10446@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Nov 17, 2010 at 11:21 PM, Ron Adam wrote: .. > I noticed in your patch, the disclaimer only prints when pydoc can find a doc location (docloc is not None). This is not a disclaimer, but an explanation of the relationship between pydoc pages and the reference manual. >?So it may not get displayed at all depending on how python is installed. docloc should not be None for standard library modules. This is a separate issue. > ?I also think having it on every page may be a bit overly cautious. (IMHO) In text viewer you only see one page at a time. In HTML you may put it on the index or start page. docloc is None for 3rd party modules (pydocs checks for site-packages component in path). The logic is not very robust, but that is a separate issue. That's fine. No, these places are almost never seen. Also, one should not think of this as a disclaimer, but as an explanation of why she is shown a link to a reference page when full documentation is already displayed. > It can still be defined in one location and then use "+ pydoc_disclaimer" in the desired locations. Sure. Just don't call it "disclaimer". Maybe Doc.REFTEXT constant next to Doc.PYTHONDOCS? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:25:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 05:25:06 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290057906.13.0.370730628049.issue10446@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Wed, Nov 17, 2010 at 11:21 PM, Ron Adam wrote: .. > I noticed in your patch, the disclaimer only prints when pydoc can find a doc location (docloc is not None). This is not a disclaimer, but an explanation of the relationship between pydoc pages and the reference manual. > So it may not get displayed at all depending on how python is installed. docloc should not be None for standard library modules. This is a separate issue. > I also think having it on every page may be a bit overly cautious. (IMHO) In text viewer you only see one page at a time. In HTML you may put it on the index or start page. > I'm also not sure it is correct to have that when viewing third party modules as the doc location > in those cases will be broken anyway. > docloc is None for 3rd party modules (pydocs checks for site-packages component in path). The logic is not very robust, but that is a separate issue. > The obvious places to put it are: > * top of the pydoc html module index. (first page displayed) That's fine. > * in the welcome message for interactive help() > * help(help) > * help(pydoc) > No, these places are almost never seen. Also, one should not think of this as a disclaimer, but as an explanation of why she is shown a link to a reference page when full documentation is already displayed. > It can still be defined in one location and then use "+ pydoc_disclaimer" in the desired locations. Sure. Just don't call it "disclaimer". Maybe Doc.REFTEXT constant next to Doc.PYTHONDOCS? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:25:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 05:25:14 +0000 Subject: [docs] [issue10446] pydoc3 links to 2.x library reference In-Reply-To: <1290015143.43.0.140543543356.issue10446@psf.upfronthosting.co.za> Message-ID: <1290057914.69.0.952880697232.issue10446@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- Removed message: http://bugs.python.org/msg121440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:21:53 2010 From: report at bugs.python.org (Valery Khamenya) Date: Thu, 18 Nov 2010 10:21:53 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1290075713.86.0.72983466193.issue10351@psf.upfronthosting.co.za> Valery Khamenya added the comment: Guys, do you expect anythig else from me in respect to this issue? Let me know it before my non-stopable garbage collector wipes all the details from my brain away :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:40:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Nov 2010 10:40:18 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1290076818.87.0.650611268546.issue10351@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +facundobatista, georg.brandl _______________________________________ Python tracker _______________________________________ From wkerzendorf at googlemail.com Wed Nov 17 13:32:43 2010 From: wkerzendorf at googlemail.com (Wolfgang Kerzendorf) Date: Wed, 17 Nov 2010 23:32:43 +1100 Subject: [docs] sqlite3 Binary description is missing Message-ID: <4CE3CB6B.70909@gmail.com> Dear Doc-Team, First of all for providing such a thorough and incredibly useful documentation. I have one minor suggestion: It would be useful to insert a section about inserting binary data into the sqlite database with sqlite3.Binary(). Cheers Wolfgang From ptankov at vmware.com Wed Nov 17 16:16:00 2010 From: ptankov at vmware.com (Pavel Tankov) Date: Wed, 17 Nov 2010 17:16:00 +0200 Subject: [docs] Beeping is not the a good way to check command line editing support Message-ID: <201011171716.00759.ptankov@vmware.com> On page: http://docs.python.org/tutorial/interpreter.html there is this paragraph: The interpreter?s line-editing features usually aren?t very sophisticated. On Unix, whoever installed the interpreter may have enabled support for the GNU readline library, which adds more elaborate interactive editing and history features. Perhaps the quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you have command line editing; see Appendix Interactive Input Editing and History Substitution for an introduction to the keys. If nothing appears to happen, or if ^P is echoed, command line editing isn?t available; you?ll only be able to use backspace to remove characters from the current line. The beeping is not very adequate way to judge whether one has command line editing supported, because most people disable the beep whatsoever on their Lunux installations (or turn the beep voume to zero). Since I am a beginner, I can't propose a replacement text for the documentation. HTH -- Pavel Tankov From report at bugs.python.org Thu Nov 18 17:11:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 16:11:32 +0000 Subject: [docs] [issue10454] Clarify compileall options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> New submission from ?ric Araujo : This is the help text of compileall: usage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [-i list] [directory|file ...] -l: don't recurse down -f: force rebuild even if timestamps are up-to-date -q: quiet operation -d destdir: purported directory name for error messages if no directory arguments, -l sys.path is assumed -x regexp: skip files matching the regular expression regexp the regexp is searched for in the full path of the file -i list: expand list with its content (file and directory names) -b: Produce legacy byte-compile file paths 1) I do not understand the help of -d and -i. Experimenting with the script, reading the code and eventually looking at the file history would certainly clear that. 2) The short usage line at the top also lacks mention of ?-b?. 3) (minor) I want to rephrase -x, -d and -b. Bug week-end candidate! ---------- assignee: docs at python components: Documentation keywords: easy messages: 121469 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Clarify compileall options type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 17:11:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 16:11:54 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: <1290096714.48.0.368249109183.issue10454@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: Clarify compileall options -> Clarify compileall command-line options _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 17:18:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 16:18:00 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: <1290097080.59.0.835515749391.issue10454@psf.upfronthosting.co.za> ?ric Araujo added the comment: In addition, the line ?if no directory arguments, -l sys.path is assumed? seems misplaced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 17:46:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 18 Nov 2010 16:46:53 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290098812.81.0.263401865969.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch tweaked and committed in r86521. Gory details follow. The patch applied with only two fuzzy hunks and one rejected hunk. I did a careful review of "" ? ``""`` changes and edited a number of them. I?m confident in my choices but am of course open to comments on the checkin. My remark about not using :program:`name --option` was wrong. It is actually supported, see for instance in shutil.rst ?Unix command :program:`cp -p`?. I apologize for causing you unnecessary work. I changed that back before committing. I ran ?make clean html? in the docs (no warnings) and looked at the HTML output for each change. Modules that wrongly used :option: are fixed; conversely, timeit and unittest now have a good-looking, indexed list of options, the program/cmdoption combo you used is terrific! Actually, I found that so cool that I added an option list for ?unittest discover? (was a table) and ?compileall? (was a plain paragraph, missing two options). Consider that an experiment; I?m willing to revert them if people prefer the old form. I?ll rewrap too long or too short lines in a following commit. I?ll also backport relevant parts to 3.1 and 2.7 with the approval of the release manager. Thank you Eli for this contribution. Thanks Terry and Georg for the help. ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 18:51:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 17:51:40 +0000 Subject: [docs] [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1290102700.35.0.652903296084.issue7828@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19633/issue7828.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 19:10:20 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 18 Nov 2010 18:10:20 +0000 Subject: [docs] [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1290103820.13.0.715783523388.issue7828@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Looks good to me, except for a 'stings' near the end of the patch. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 19:55:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 18 Nov 2010 18:55:40 +0000 Subject: [docs] [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1290106539.89.0.511681476491.issue7828@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r86526 (3.2) and r86527 (3.1). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 20:41:38 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Thu, 18 Nov 2010 19:41:38 +0000 Subject: [docs] [issue10455] typo in urllib.request documentation In-Reply-To: <1290109297.93.0.111882063571.issue10455@psf.upfronthosting.co.za> Message-ID: <1290109297.93.0.111882063571.issue10455@psf.upfronthosting.co.za> New submission from Jeffrey Finkelstein : Typo in Doc/library/urllib.request.rst, under the "urllib.response" module description: "and" -> "an" ---------- assignee: docs at python components: Documentation files: urllib.request_typo.diff keywords: patch messages: 121487 nosy: docs at python, jfinkels priority: normal severity: normal status: open title: typo in urllib.request documentation versions: Python 3.2 Added file: http://bugs.python.org/file19634/urllib.request_typo.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 20:51:43 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 18 Nov 2010 19:51:43 +0000 Subject: [docs] [issue10455] typo in urllib.request documentation In-Reply-To: <1290109297.93.0.111882063571.issue10455@psf.upfronthosting.co.za> Message-ID: <1290109903.83.0.50296791699.issue10455@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed in r86528 (py3k) and r86529 (release31-maint), thanks! ---------- nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 07:30:23 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 19 Nov 2010 06:30:23 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290148223.25.0.486912968889.issue9312@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, I went over both the diffs and the HTML output from "make clean html" on the latest 3.2 trunk. Looks good to me! Just a tiny nit re unittest.rst, where it says "supports three command-line options". This is the kind of comment that gets left behind when new options are added. I see no added value explicitly saying there are 3 options as opposed to "supports the following command-line options", and there's less chance for future mistakes. It's also more consistent with the list of options for "discover" a bit later in the same document. This is totally a stylistic issue, of course, so IMVHO :-) Oh, and another thing about unittest.rst: in 24.3.9 where it says "The -c command-line option to unittest", for some reason the -c didn't get linked to the option, although I think you intended it to, since you marked it as :option: P.S: the program/cmdoption combo idea was Georg's. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:39:56 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 19 Nov 2010 08:39:56 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1290155996.63.0.683219536399.issue10122@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: If you visit http://docs.python.org/library/functions.html?highlight=getattr#getattr there is still the word 'attributed' present in online docs. Please fix the docs completely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:53:37 2010 From: report at bugs.python.org (Cherniavsky Beni) Date: Fri, 19 Nov 2010 13:53:37 +0000 Subject: [docs] [issue10457] "Related help topics" shown outside pager In-Reply-To: <1290174817.07.0.690141680958.issue10457@psf.upfronthosting.co.za> Message-ID: <1290174817.07.0.690141680958.issue10457@psf.upfronthosting.co.za> New submission from Cherniavsky Beni : help('NAMESPACES') or any other long help is shows in a pager. That's great. It's a bit surprising however that the text shown in the pager doesn't include the "Related help topics: ..." line, which is shown when you leave the pager. There is practical benefit to see the related topics after you exited the pager - that's when you have the chance to follow these other topics. But I think it should be duplicated inside the pager as well. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 121514 nosy: cben, docs at python priority: normal severity: normal status: open title: "Related help topics" shown outside pager type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 15:18:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 14:18:17 +0000 Subject: [docs] [issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers() In-Reply-To: <1289931464.79.0.618120236196.issue10436@psf.upfronthosting.co.za> Message-ID: <1290176297.27.0.137591188538.issue10436@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 15:32:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 14:32:20 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290177140.57.0.0976773113556.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sergey: Do you want to make a patch for that, and/or for the documentation? Guidelines are on http://www.python.org/dev/patches/ ---------- nosy: +bethard resolution: accepted -> versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 15:33:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 14:33:45 +0000 Subject: [docs] [issue8158] documentation of 'optparse' module incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1290177225.16.0.403038467977.issue8158@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +docs at python -georg.brandl versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 15:54:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 14:54:51 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290178491.19.0.638038461691.issue8890@psf.upfronthosting.co.za> ?ric Araujo added the comment: Who wants to make a patch to update the documentation? For command-line examples (like ?python setup.py install --install-base /tmp?), someone has to research what standard variable to use (TMPDIR, TMP, something else?). ---------- keywords: +easy stage: -> needs patch title: Modules have dangerous examples in documentation -> Use tempfile instead of /tmp in examples versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:04:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:04:21 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290179061.72.0.9456136855.issue8890@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch submission guidelines are found at http://www.python.org/dev/patches/ Since patches are made for the py3k branch, some matches in Henri?s grep won?t get patched: bsddb, compiler, posixfile and rexec have been removed. The person that will commit the patch will have to edit those too when merging into 2.7, unless a kind soul provides one patch per branch (not a requirement). Last remark: tempfile is a false positive; editing old whatsnew is not worth it IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:18:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:18:17 +0000 Subject: [docs] [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1290179897.48.0.258309278687.issue9938@psf.upfronthosting.co.za> ?ric Araujo added the comment: Do you want to work on a patch? (Aside: you may want to learn about the cmd and shlex modules for read-eval-print-loop programs :) ---------- keywords: +easy nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:20:44 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 19 Nov 2010 15:20:44 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290180043.96.0.988220399459.issue9182@psf.upfronthosting.co.za> Steven Bethard added the comment: The original point is basically a duplicate of issue 9338. It is undesirable behavior, I just don't know how to fix it. Patches to fix it are welcome (on issue 9338). ;-) As to documenting '--', I agree it's hidden too far down in the documentation currently. I'd be happy to approve any documentation patch that makes the '--' workaround more visible. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:23:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:23:14 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290180194.06.0.196097452769.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: You?re right, sorry I was unclear: ?a patch for that? referred to the addition of ?--? in the generated usage text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:30:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:30:46 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1290180646.19.0.321157900497.issue8158@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: documentation of 'optparse' module incomplete -> Docstring of optparse.OptionParser incomplete _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:37:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:37:15 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1290181035.17.0.391919070218.issue9921@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg118372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:39:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:39:26 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1290181166.73.0.448097106496.issue9921@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think the comment is fine as is. +1 to adding your wording to the docs. ---------- keywords: +patch nosy: +eric.araujo stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:44:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 15:44:38 +0000 Subject: [docs] [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1290181478.63.0.100619239833.issue10396@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on clarifying the docs. Michael, where in the file do you think it should go? (You can also directly make a diff if you want.) ---------- assignee: -> docs at python components: +Documentation -Library (Lib) keywords: +patch nosy: +docs at python, eric.araujo resolution: duplicate -> stage: committed/rejected -> patch review status: closed -> open superseder: cmd.py always uses raw_input, even when another stdin is specified -> versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:05:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 16:05:04 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> New submission from ?ric Araujo : The docs contain numerous examples that would trigger resource warnings under 3.2 (for example ?open(...).read()?). They should be changed to use (and thus promote) the with statement. Not adding the ?easy? keyword, since grepping for those things is not easy. Not sure we?ll backport that to 3.1 and 2.7. ---------- assignee: docs at python components: Documentation messages: 121545 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Use with statement throughout the docs versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:43:15 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Nov 2010 16:43:15 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1290184995.02.0.834555765001.issue9921@psf.upfronthosting.co.za> R. David Murray added the comment: "first part" by itself sounds like there can only be two parts. How about 'inserts a separator between each pair of...' Also, what does 'absolute' mean on Windows? Does it include the drive? If so, the second sentence should probably say 'if a part starts with a separator...' (Assuming, of course, that that's how ntpath.join actually works). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:45:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 16:45:32 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1290185132.75.0.352963091564.issue9921@psf.upfronthosting.co.za> ?ric Araujo added the comment: Comment in ntpath.isabs: For Windows it is absolute if it starts with a slash or backslash (current volume), or if a pathname after the volume-letter-and-colon or UNC-resource starts with a slash or backslash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:52:32 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Nov 2010 16:52:32 +0000 Subject: [docs] [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1290185552.55.0.727094149379.issue10396@psf.upfronthosting.co.za> R. David Murray added the comment: The argument against adding this to the pdb docs is that if you pull in that statement from cmd, you really ought to pull in the full description of the __init__ arguments. And whether you do that or just pull in that single statement, you are duplicating the documentation from cmd. This *may* be best, but it does increase the maintenance burden, since any change to cmd will require changes to both the cmd and pdb docs, whereas now someone changing cmd doesn't need to know that they also have to update pdb. If the situation being documented here improves in some way, I'll bet we will forget to update the pdb docs accordingly.... So, I'm -1 on adding this to the pdb docs, but will bow to the wisdom of the doc folks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:02:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2010 17:02:47 +0000 Subject: [docs] [issue10396] stdin argument to pdb.Pdb doesn't work unless you also set Pdb.use_rawinput = False In-Reply-To: <1289584221.71.0.586527779083.issue10396@psf.upfronthosting.co.za> Message-ID: <1290186167.46.0.702498712937.issue10396@psf.upfronthosting.co.za> ?ric Araujo added the comment: This is a sound argument. I had also missed your comment ?Note that the pdb docs direct you the cmd docs, which clearly document the need to set use_rawinput, so this is not even a doc bug?, which I was about to write with other words :) There was actually no need to reopen this bug. ---------- assignee: docs at python -> components: +Library (Lib) -Documentation resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> cmd.py always uses raw_input, even when another stdin is specified _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:10:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 19 Nov 2010 19:10:33 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290193833.12.0.385717075111.issue10461@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +1 BTW, I've updated examples in Unicode HOWTO to use with. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 21:12:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Nov 2010 20:12:36 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290197556.07.0.481784230432.issue10461@psf.upfronthosting.co.za> Terry J. Reedy added the comment: +1 I have not yet had occasion to use 'with' yet, but in reading the Unicode HOWTO diff, I noticed that I liked replacing 'open,read,close' with 'with open, read' just for reading purposes since it turns 3 steps into 1 compound transaction. Perhaps something should also be added to the doc style guide (along with using 'attributes' instead of 'members'). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 21:13:11 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Nov 2010 20:13:11 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290197591.01.0.292011140419.issue10461@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 21:57:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 19 Nov 2010 20:57:48 +0000 Subject: [docs] [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1290200268.84.0.653287962103.issue10434@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:03:12 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 19 Nov 2010 21:03:12 +0000 Subject: [docs] [issue10434] Document the rules for "public names" In-Reply-To: <1289919338.9.0.394057770971.issue10434@psf.upfronthosting.co.za> Message-ID: <1290200592.39.0.846819351614.issue10434@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:31:56 2010 From: report at bugs.python.org (Daniel Seither) Date: Fri, 19 Nov 2010 21:31:56 +0000 Subject: [docs] [issue10463] Wrong return value for xml.etree.ElementTree.parse() In-Reply-To: <1290202316.91.0.542826237315.issue10463@psf.upfronthosting.co.za> Message-ID: <1290202316.91.0.542826237315.issue10463@psf.upfronthosting.co.za> New submission from Daniel Seither : Cite from http://docs.python.org/library/xml.etree.elementtree.html > xml.etree.ElementTree.parse(source, parser=None) > > Parses an XML section into an element tree. source is a filename or > file object containing XML data. parser is an optional parser > instance. If not given, the standard XMLParser parser is used. > Returns an ElementTree instance. The last sentence should be "Returns an Element instance." I verified this error for the Python versions as listed in this issue. In 2.5, the information was imprecise but correct. ---------- assignee: docs at python components: Documentation messages: 121571 nosy: docs at python, tiwoc priority: normal severity: normal status: open title: Wrong return value for xml.etree.ElementTree.parse() versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:32:41 2010 From: report at bugs.python.org (Daniel Seither) Date: Fri, 19 Nov 2010 21:32:41 +0000 Subject: [docs] [issue10463] Wrong return type for xml.etree.ElementTree.parse() In-Reply-To: <1290202316.91.0.542826237315.issue10463@psf.upfronthosting.co.za> Message-ID: <1290202361.78.0.701448228328.issue10463@psf.upfronthosting.co.za> Changes by Daniel Seither : ---------- title: Wrong return value for xml.etree.ElementTree.parse() -> Wrong return type for xml.etree.ElementTree.parse() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:41:23 2010 From: report at bugs.python.org (Daniel Seither) Date: Fri, 19 Nov 2010 21:41:23 +0000 Subject: [docs] [issue10463] Wrong return type for xml.etree.ElementTree.parse() In-Reply-To: <1290202316.91.0.542826237315.issue10463@psf.upfronthosting.co.za> Message-ID: <1290202883.65.0.402221585979.issue10463@psf.upfronthosting.co.za> Daniel Seither added the comment: I need to read more accurately what is printed on my console... Forget about it. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 01:16:07 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 20 Nov 2010 00:16:07 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290212166.53.0.439019518354.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a new patch with a 5 column tables. I had to use some rst trickery to make a decent header that works both in the HTML and Latex outputs. I put the title in the middle cell (the 3rd) of the header and left the others empty. The column cells are a little wider but they are still OK at 800x600. ?ric how do you like this version? I could also drop the header altogether, but I don't like the headless table too much. ---------- Added file: http://bugs.python.org/file19648/issue10299-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:42:58 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 10:42:58 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290249778.5.0.146734180043.issue10439@psf.upfronthosting.co.za> Eli Bendersky added the comment: I will write a codecs.rst for this. Any suggestion of where in c-api/index.html it should be linked? ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:51:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 10:51:11 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290250271.57.0.768903460278.issue10439@psf.upfronthosting.co.za> Georg Brandl added the comment: Please call it codec.rst. It is probably best placed under "utilities". ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:27:10 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 11:27:10 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290252430.44.0.112073828306.issue10439@psf.upfronthosting.co.za> Eli Bendersky added the comment: While preparing a .rst document for this, I ran into a possible inaccuracy in a comment in codecs.h: /* Lookup the error handling callback function registered under the name error. As a special case NULL can be passed, in which case the error handling callback for "strict" will be returned. */ PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name); ---- The problem may be with the phrase "under the name error". Shouldn't it be just "under *name*"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:31:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 11:31:12 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290252672.04.0.668701479911.issue10439@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, apparently the parameter was (intended to be) called "error" at some point. Can you put the correction in your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:26:57 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 12:26:57 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290256017.32.0.418638320464.issue10439@psf.upfronthosting.co.za> Eli Bendersky added the comment: Submitting a patch. What was touched: 1. Include/codecs.h - minor inaccuracy and inconsistency in a comment 2. Doc/c-api/codec.rst - new reST documentation file for the codecs.h C API 3. Doc/c-api/utilities.rst - for linking to codec.rst, per Georg's suggestion ---------- keywords: +patch Added file: http://bugs.python.org/file19657/issue10439.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:36:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 12:36:43 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290256603.32.0.324043679299.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: with also replaces open-try-do stuff-finally-close, the correct idiom for ensuring file handles are always closes in all VMs. I don?t think the doc style guide is the right place, since this is a code issue. with is advertised in http://docs.python.org/dev/tutorial/inputoutput#methods-of-file-objects and http://docs.python.org/dev/howto/doanddont#exceptions ; http://docs.python.org/dev/library/functions#open says nothing about closing, and http://docs.python.org/dev/library/io tells about the with statement without recommending it strongly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:38:42 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 12:38:42 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290256722.76.0.106042501884.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, although grepping for all such references may be tricky, could you specify the places where you did see them? I guess a few fixed places is better than none at all. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:56:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 12:56:06 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290257766.55.0.277419500688.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: Certainly. Here is my secret grep: $ cd py3k/Doc $ grep -n --color=auto -d skip -I --exclude-dir .svn --exclude-dir .hg -R open\(.*\).read *.rst c-api distutils documenting extending faq howto library reference tutorial using List without false positives: faq/library.rst library/pkgutil.rst library/atexit.rst library/pipes.rst library/cmd.rst library/logging.rst library/difflib.rst library/collections.rst tutorial/interpreter.rst tutorial/stdlib2.rst List for open(.*).write: faq/library.rst library/ftplib.rst library/atexit.rst There is probably a better regex that would catch ?open(.*).[valid method name]?, but I hate regexes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:02:05 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 20 Nov 2010 13:02:05 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290258124.97.0.40455943923.issue10439@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Thanks for the patch, it looks good, I have 2 remarks though: - "under the name name" could be replaced by "under the given name". - "The *search_function*'s refcount is incremented by this function." This information is not useful to the caller - she just wants to know whether she still owns the reference she had before. Most probably here, the refcount is incremented because the object is stored in a list; the caller still owns the reference to the parameter, like most functions of the API, and there is nothing to say about refcounts here. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:08:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 13:08:03 +0000 Subject: [docs] [issue10463] Wrong return type for xml.etree.ElementTree.parse() In-Reply-To: <1290202316.91.0.542826237315.issue10463@psf.upfronthosting.co.za> Message-ID: <1290258483.44.0.789665163307.issue10463@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: works for me -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:10:19 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:10:19 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290258619.35.0.591943359292.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: Eric, I'm attaching a provisional fix for library/atexit.rst just to be sure this is what you mean. ---------- Added file: http://bugs.python.org/file19659/atexit.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:11:15 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:11:15 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290258675.14.0.348283676398.issue10461@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- keywords: +patch Added file: http://bugs.python.org/file19660/issue10461.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:11:19 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:11:19 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290258679.63.0.179319808481.issue10461@psf.upfronthosting.co.za> Changes by Eli Bendersky : Removed file: http://bugs.python.org/file19659/atexit.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:12:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 13:12:08 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1290258728.4.0.555194374753.issue10351@psf.upfronthosting.co.za> ?ric Araujo added the comment: I will review your patch later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:18:07 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:18:07 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290259087.42.0.228055346179.issue10439@psf.upfronthosting.co.za> Eli Bendersky added the comment: Amaury, Thanks for the review & comments. I'm attaching a fixed patch. ---------- Added file: http://bugs.python.org/file19661/issue10439.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:18:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 13:18:54 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290259134.66.0.62617541634.issue10439@psf.upfronthosting.co.za> Georg Brandl added the comment: Please also keep to 3-space indentation in directives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:19:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 13:19:25 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290259164.87.0.906713215743.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, that?s it. Please don?t change whitespace in your patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:21:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 13:21:24 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290259284.31.0.24234031572.issue10461@psf.upfronthosting.co.za> Georg Brandl added the comment: FWIW, this doesn't belong in the style guide; it is obvious that the docs should exhibit "best practice" Python code, and using the with statement when opening resources is certainly such a best practice now. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:22:56 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:22:56 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290259376.08.0.960379047972.issue10439@psf.upfronthosting.co.za> Eli Bendersky added the comment: Georg, Thanks. Submitting fixed patch with 3-space indentation in directives. ---------- Added file: http://bugs.python.org/file19662/issue10439.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:25:31 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:25:31 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290259531.06.0.607366879875.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: Eric, which whitespace change do you refer to. I changed to 4-spaces indentation in the code sample to conform to PEP-8. Shouldn't I have? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:27:37 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 13:27:37 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290259657.17.0.718316139109.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch for Docs/library/cmd.rst ---------- nosy: +SilentGhost Added file: http://bugs.python.org/file19663/cmd.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:42:42 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 13:42:42 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290260562.24.0.904095780778.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch for Doc/library/difflib.rst ---------- Added file: http://bugs.python.org/file19664/difflib.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:45:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 13:45:30 +0000 Subject: [docs] [issue10439] PyCodec C API is not documented in reST In-Reply-To: <1289952536.84.0.590599988157.issue10439@psf.upfronthosting.co.za> Message-ID: <1290260730.85.0.60155698845.issue10439@psf.upfronthosting.co.za> Georg Brandl added the comment: Reviewed and applied in r86562. Thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:47:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 13:47:42 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> New submission from Georg Brandl : There are a couple of functions for accessing UnicodeError subclass properties that are needed e.g. in codec error handlers. They should be documented in exceptions.rst. ---------- assignee: docs at python components: Documentation messages: 121641 nosy: docs at python, georg.brandl priority: normal severity: normal status: open title: Document UnicodeError access functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:48:11 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:48:11 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290260891.07.0.88535793995.issue10468@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:49:17 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:49:17 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290260957.62.0.726378531959.issue10468@psf.upfronthosting.co.za> Eli Bendersky added the comment: >From IRC: the PyUnicode*Error_Foo access functions are not documented they are in exceptions.c / pyerrors.h ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:54:16 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 13:54:16 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290261255.98.0.478384277061.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm trying to port the example in tutorial/stdlib2.rst, but the sample in "working with binary data record layouts" fails (before my porting to 'with'...) struct.error: unpack requires a bytes argument of length 16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:59:22 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 13:59:22 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290261562.6.0.742598122908.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: Patch for Doc/library/collections.rst ---------- Added file: http://bugs.python.org/file19665/collections.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:05:03 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 14:05:03 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290261903.52.0.400885339301.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching patches for library/atexit.rst and for tutorial/stdlib2.rst ---------- Added file: http://bugs.python.org/file19667/issue10461.atexit.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:05:13 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 14:05:13 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290261913.23.0.2193512958.issue10461@psf.upfronthosting.co.za> Changes by Eli Bendersky : Added file: http://bugs.python.org/file19668/issue10461.stdlib2.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:05:17 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 14:05:17 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290261917.69.0.54994475236.issue10461@psf.upfronthosting.co.za> Changes by Eli Bendersky : Removed file: http://bugs.python.org/file19660/issue10461.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:08:17 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 14:08:17 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290262097.86.0.545062570828.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: SilentGhost, Your patches look fine. I have a doubt re collections.rst, however - about the Python prompt. The same issue is in faq/library.rst and I didn't want to touch it because I thought that on the prompt personally I probably wouldn't use 'with' - why write 2 lines when you can write 1? After all, it's just playing on the prompt - I don't care about safe closing of the file, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:31:57 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 14:31:57 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290263517.64.0.281097116307.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: patch for Doc/library/logging.rst Also, note the the change of the mode from `'r'` to `'rb'`. `data_to_send` is further send through socket and therefore requires to be bytes. I expressed my opinion in irc, but I can repeat here that I think only the most trivial code such as in Doc/library/pipes.rst isn't worth converting. ---------- Added file: http://bugs.python.org/file19671/logging.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:32:03 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 14:32:03 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290263523.61.0.986580390433.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: patch for Doc/library/logging.rst Also, note the the change of the mode from `'r'` to `'rb'`. `data_to_send` is further send through socket and therefore requires to be bytes. I expressed my opinion in irc, but I can repeat here that I think only the most trivial code such as in Doc/library/pipes.rst isn't worth converting. ---------- Added file: http://bugs.python.org/file19672/logging.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:32:18 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 14:32:18 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290263538.02.0.880588286589.issue10461@psf.upfronthosting.co.za> Changes by SilentGhost : Removed file: http://bugs.python.org/file19672/logging.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 16:48:01 2010 From: report at bugs.python.org (Neil Muller) Date: Sat, 20 Nov 2010 15:48:01 +0000 Subject: [docs] [issue9637] docs do not say that urllib uses HTTP_PROXY In-Reply-To: <1282196669.74.0.629180904202.issue9637@psf.upfronthosting.co.za> Message-ID: <1290268081.08.0.995520448658.issue9637@psf.upfronthosting.co.za> Changes by Neil Muller : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:14:19 2010 From: report at bugs.python.org (Neil Muller) Date: Sat, 20 Nov 2010 16:14:19 +0000 Subject: [docs] [issue9637] docs do not say that urllib uses HTTP_PROXY In-Reply-To: <1282196669.74.0.629180904202.issue9637@psf.upfronthosting.co.za> Message-ID: <1290269659.4.0.253188321346.issue9637@psf.upfronthosting.co.za> Neil Muller added the comment: The problem is that the getproxies_environment function converts all environment variables to lower case before deciding whether to use the name. This means that whichever ends up last in os.environment will be used. The attached patch does two things. It changes the behaviour to prefer the all lower case version if it exists, and adds a note to the ProxyHandler description noting that the environment variable used is not case sensitive, although the all lower case version will be preferred. The behaviour change is debatable, but preferring the lower case name is likely to be less surprising in general. ---------- keywords: +patch nosy: +Neil Muller Added file: http://bugs.python.org/file19678/urllib_PROXY.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:23:00 2010 From: report at bugs.python.org (Simon Cross) Date: Sat, 20 Nov 2010 16:23:00 +0000 Subject: [docs] [issue8647] PyUnicode_GetMax is undocumented In-Reply-To: <1273248439.66.0.594970239714.issue8647@psf.upfronthosting.co.za> Message-ID: <1290270180.65.0.0738249705773.issue8647@psf.upfronthosting.co.za> Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. ---------- nosy: +hodgestar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:23:30 2010 From: report at bugs.python.org (Simon Cross) Date: Sat, 20 Nov 2010 16:23:30 +0000 Subject: [docs] [issue8646] PyUnicode_EncodeDecimal is undocumented In-Reply-To: <1273247945.7.0.702043835904.issue8646@psf.upfronthosting.co.za> Message-ID: <1290270210.22.0.887554117914.issue8646@psf.upfronthosting.co.za> Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. ---------- nosy: +hodgestar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:23:46 2010 From: report at bugs.python.org (Simon Cross) Date: Sat, 20 Nov 2010 16:23:46 +0000 Subject: [docs] [issue8645] PyUnicode_AsEncodedObject is undocumented In-Reply-To: <1273247735.73.0.712345896243.issue8645@psf.upfronthosting.co.za> Message-ID: <1290270226.79.0.107506334467.issue8645@psf.upfronthosting.co.za> Simon Cross added the comment: This issue is subsumed by #10435 and can probably be closed as a duplicated. ---------- nosy: +hodgestar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 18:35:37 2010 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 20 Nov 2010 17:35:37 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290274537.87.0.800179459463.issue9305@psf.upfronthosting.co.za> Changes by Rodrigo Bernardo Pimentel : ---------- nosy: +rbp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:21:35 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2010 18:21:35 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290277294.88.0.00322272883677.issue10461@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Do not change the examples in collections.rst. That would interfere with the clarify of what is being demonstrated. For example, the hamlet.txt example is not about file reading, it about counting words. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:24:48 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 18:24:48 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290277488.59.0.12879881738.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: None of the changes are about file reading, they only about using with statement throughout. May be nofix then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:28:56 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2010 18:28:56 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290277735.94.0.0725758204787.issue10461@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the other (non collections patches) are fine. The change doesn't break up the flow of the text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:31:24 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2010 18:31:24 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290277884.12.0.467767907473.issue10461@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Separate note for ?ric: the try/finally examples do not need to change. Those are valid python. Users need to learn both try/finally and the with-statement. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:32:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 18:32:03 +0000 Subject: [docs] [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1290277923.96.0.394412173431.issue5066@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:32:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 18:32:27 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290277735.94.0.0725758204787.issue10461@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: FWIW, I find the "with" variant much easier to read than >>> words = re.findall('\w+', open('hamlet.txt').read().lower()) Too many operations in one line. It would be even better with >>> words = re.findall('\w+', hamlet_text.lower()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:43:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 18:43:14 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290278594.67.0.778678647867.issue10461@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- Removed message: http://bugs.python.org/msg121711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:44:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 18:44:36 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290278676.84.0.830272243474.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: Eli, SilentGhost: Please open other bug reports for doc errors like the struct one in stdlib2 or the r/rb one. SilentGhost: with statement used with open *is* about file reading :) Raymond: I agree about try/finally. I agree with Alexander about collections.rst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:08:59 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sat, 20 Nov 2010 19:08:59 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290280139.44.0.425167974574.issue9182@psf.upfronthosting.co.za> Daniel Albeseder added the comment: I did the patch for adding the "--" in the generated usage text inside issue 9338. ---------- nosy: +Kotan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:10:59 2010 From: report at bugs.python.org (Henrique Bastos) Date: Sat, 20 Nov 2010 19:10:59 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290280259.56.0.842421658655.issue9305@psf.upfronthosting.co.za> Henrique Bastos added the comment: Here goes a patch to replace east/west references on datetime documentation. As spoken with fdrake we think the datetime documentation could be improved extracting the timezone subclassing details to specific section. We'll be filling a new issue for that patch. ---------- nosy: +Rodolpho.Eckhardt, henriquebastos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:11:19 2010 From: report at bugs.python.org (Henrique Bastos) Date: Sat, 20 Nov 2010 19:11:19 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290280279.86.0.338565170683.issue9305@psf.upfronthosting.co.za> Henrique Bastos added the comment: Here goes a patch to replace east/west references on datetime documentation. As spoken with fdrake we think the datetime documentation could be improved extracting the timezone subclassing details to specific section. We'll be filling a new issue for that patch. ---------- keywords: +patch Added file: http://bugs.python.org/file19694/datetime_doc_remove_east_west.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:18:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 19:18:27 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1290280259.56.0.842421658655.issue9305@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:20:46 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 20 Nov 2010 19:20:46 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290278676.84.0.830272243474.issue10461@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: On Sat, Nov 20, 2010 at 20:44, ??ric Araujo wrote: > > ??ric Araujo added the comment: > > Eli, SilentGhost: Please open other bug reports for doc errors like the > struct one in stdlib2 or the r/rb one. > > SilentGhost: with statement used with open *is* about file reading :) > > Raymond: I agree about try/finally. I agree with Alexander about > collections.rst. > ??ric, It turned out to be a non-issue, never mind. ---------- Added file: http://bugs.python.org/file19696/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Sat, Nov 20, 2010 at 20:44, ??ric Araujo <report at bugs.python.org> wrote:

??ric Araujo <merwok at netwok.org> added the comment:

Eli, SilentGhost: Please open other bug reports for doc errors like the struct one in stdlib2 or the r/rb one.

SilentGhost: with statement used with open *is* about file reading :)

Raymond: I agree about try/finally. ??I agree with Alexander about collections.rst.

??ric,

It turned out to be a non-issue, never mind.

From report at bugs.python.org Sat Nov 20 20:26:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 19:26:02 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290281162.37.0.236782422829.issue9305@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: docs at python -> belopolsky stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:31:23 2010 From: report at bugs.python.org (Mauro Navarro Baraldi) Date: Sat, 20 Nov 2010 19:31:23 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290281483.03.0.228569529547.issue8890@psf.upfronthosting.co.za> Mauro Navarro Baraldi added the comment: Replace to most use of /tmp/tempfile for just tempfile, as sugested before. ---------- keywords: +patch nosy: +maurobaraldi Added file: http://bugs.python.org/file19698/py3k-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:37:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Nov 2010 19:37:29 +0000 Subject: [docs] [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1290281849.38.0.850268042606.issue8340@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Done in r86602. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:40:50 2010 From: report at bugs.python.org (Cherniavsky Beni) Date: Sat, 20 Nov 2010 19:40:50 +0000 Subject: [docs] [issue9724] help('nonlocal') missing In-Reply-To: <1283264506.65.0.891353538251.issue9724@psf.upfronthosting.co.za> Message-ID: <1290282050.75.0.828883098721.issue9724@psf.upfronthosting.co.za> Cherniavsky Beni added the comment: Reopening because help('nonlocal') still doesn't work; attached patch fixes that. It also cross-links all of global/nonlocal/NAMESPACES. ---------- keywords: +patch resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file19700/nonlocal.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:53:08 2010 From: report at bugs.python.org (Ramiro Batista da Luz) Date: Sat, 20 Nov 2010 19:53:08 +0000 Subject: [docs] [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1290282788.56.0.754365449138.issue5066@psf.upfronthosting.co.za> Ramiro Batista da Luz added the comment: I reviewed the texts, applied the patches, ran idle, edited Demo/classes/Dates.py run module inside Idle. Generated the docs inside Doc, with make html and reviewed the IDLE doc in ~/python/py3k/Doc/build/html/library/idle.html?highlight=idle Only in the 3.2 tree. ---------- nosy: +ramiroluz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:54:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 19:54:48 +0000 Subject: [docs] [issue9724] help('nonlocal') missing In-Reply-To: <1283264506.65.0.891353538251.issue9724@psf.upfronthosting.co.za> Message-ID: <1290282888.66.0.0878779529735.issue9724@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r86608. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:56:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 19:56:11 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290282971.88.0.0229491054357.issue9305@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second reading, I have a few issues with the patch. 1. Please run makepatcheck. There are whitespace issues in datetime.rst. 2. In docstrings, you remove the information about the sign. I would not mind leaving docstrings the way they are. Otherwise, please add a short sentence explaining the sign of utcoffset and dst. 3. "This represents the offset in minutes that must be added to the local time zone to follow DST rules." This unclear. DST offset is added to the "standard time", not "local time zone". (I am not sure if "standard time" is defined in the manual, though.) Also, "in minutes" is not necessary - timedelta carries the units. You can add that only offsets that are multiples of a minute are supported. ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:56:46 2010 From: report at bugs.python.org (Dan L) Date: Sat, 20 Nov 2010 19:56:46 +0000 Subject: [docs] [issue10471] include documentation in python docs and under python -h for other commandline options In-Reply-To: <1290283006.28.0.157512175607.issue10471@psf.upfronthosting.co.za> Message-ID: <1290283006.28.0.157512175607.issue10471@psf.upfronthosting.co.za> New submission from Dan L : there are options such as 'python -tt -bb' that are undocumented at http://docs.python.org/using/cmdline and that don't show up when you type python -h. ( Doubling t and b turns tabs or bytes warnings into errors. ) I don't know if they show up or not when you type 'man python', but for windows devs, it'd be best if it were included in the '-h' text excerpt in addition to being in the online docs. It could also be nice to have an example for the W arg option, e.g. for Wd. ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 121746 nosy: docs at python, jdan priority: normal severity: normal status: open title: include documentation in python docs and under python -h for other commandline options type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:12:32 2010 From: report at bugs.python.org (Henrique Bastos) Date: Sat, 20 Nov 2010 20:12:32 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290283952.35.0.911335039846.issue9305@psf.upfronthosting.co.za> Henrique Bastos added the comment: To clarify: 1) "we" means henriquebastos, rbp, Rodolpho.Eckhardt. 2) Mentioning fdrake I was trying to say that we followed his suggestion to only submit the specific changes on this patch, leaving further documentation changes to another issue. Sorry about any inconvenience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:14:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2010 20:14:24 +0000 Subject: [docs] [issue10471] include documentation in python docs and under python -h for other commandline options In-Reply-To: <1290283006.28.0.157512175607.issue10471@psf.upfronthosting.co.za> Message-ID: <1290284064.39.0.272785878224.issue10471@psf.upfronthosting.co.za> Georg Brandl added the comment: -tt is documented on the page you link to. -b and -bb are only available in Python 3, and are documented there: . -b and -bb also show up in python -h. In the contrary, -t and -tt have been removed in Python 3 (-tt behavior is default now); you can still give them but they have no effect. Giving examples for -W option in python -h would be too much verbosity. All in all, I can't see an issue here. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:46:27 2010 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 20 Nov 2010 20:46:27 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1290285987.11.0.774107757231.issue9305@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: 1. Done (it's on the patch I'm uploading). Sorry. 3. Ok, we've rewritten that sentence. As Henrique mentioned, we're working on a larger patch to make datetime documentation clearer, and we can include a definition of "standard time" there. 2. I assume you're talking about sentences like "(negative for west of UTC)". We removed that wording because it inevitably leads to associating UTC with a geographical reference. Even if we disregard that, it's not true that "utcoffset is negative west of UTC", since it will we zero for for UTC-1 (and even +1 for places physically "west of UTC" but at timezone UTC+0) when DST is effective. It seems that any sentence we add to that effect will be simply restating the definitions of UTC, timezones and DST (and their mathematical relationships). That is, "utcoffset will be negative when dt.tzinfo + dst() is negative". Perhaps we could include a more detailed discusion about the sign of utcoffset() on the larger doc patch I've mentioned? Or do you have any suggestions? ---------- Added file: http://bugs.python.org/file19709/datetime_doc_remove_east_west_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 22:29:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 21:29:30 +0000 Subject: [docs] [issue4246] execution model - clear and complete example in documentation In-Reply-To: <1225551571.75.0.81232740458.issue4246@psf.upfronthosting.co.za> Message-ID: <1290288570.45.0.057460154924.issue4246@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 22:45:41 2010 From: report at bugs.python.org (Iuri Diniz) Date: Sat, 20 Nov 2010 21:45:41 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290289541.19.0.393690118497.issue9746@psf.upfronthosting.co.za> Iuri Diniz added the comment: Is this bug valid? I have checked that only bytearray, bytes, list, range, str and tuple are valid sequence types [using issubclass(type, collections.Sequence)] and all of them has index and count methods... I'm working on a script to discovery what types that are not collections.Sequence ABC yet, but must be. Merwork said the docs are the authoritative reference to define what classes are sequences and one way to discovery it is by comparing the set of methods of each concrete class with the methods of collections.Sequence ---------- nosy: +iuridiniz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 23:15:19 2010 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Nov 2010 22:15:19 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290291319.08.0.201821052093.issue9746@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch for the table in Doc/library/stdtypes.rst .count on range by some reason returns a boolean. Should it not be an int? ---------- keywords: +patch nosy: +SilentGhost Added file: http://bugs.python.org/file19715/stdtypes.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 23:16:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 22:16:33 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290291392.97.0.744979077372.issue9746@psf.upfronthosting.co.za> ?ric Araujo added the comment: Doc patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 23:31:41 2010 From: report at bugs.python.org (Iuri Diniz) Date: Sat, 20 Nov 2010 22:31:41 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290292301.04.0.1914070778.issue9746@psf.upfronthosting.co.za> Iuri Diniz added the comment: Well, I think that script not more necessary count problem: Issue10474 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 23:41:17 2010 From: report at bugs.python.org (Cherniavsky Beni) Date: Sat, 20 Nov 2010 22:41:17 +0000 Subject: [docs] [issue10043] UnboundLocalError with local variable set by setattr, caused by code run later In-Reply-To: <1286446430.16.0.85312530766.issue10043@psf.upfronthosting.co.za> Message-ID: <1290292877.85.0.105858080428.issue10043@psf.upfronthosting.co.za> Cherniavsky Beni added the comment: Hi Steven. Please confirm if we can mark the bug closed; if you need farther advice, posting your full code (not just the error case) on comp.lang.python or StackOverflow would be more effective. The documentation is indeed correct but hard to find (you're not the first to be surprised by UnboundLocalError); I'm working on making things more discoverable in issue 4246. See also http://docs.python.org/py3k/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value First of all, it's important to understand that a Python function has a *fixed* set of local variables, frozen when the function is parsed. If you assign to it (e.g. ``name = None``), *all* appearances of the name in the function refer to a local variable; if not, they refer to the outer scope. Therefore, you can't achieve what you want with local variables. Generally, dynamically creating variables is a bad programming practice. A dictionary is the cleanest way to hold a set of names/values that is not fixed. Yes, you'll have to write ``cols['foo']`` instead of ``foo``; OTOH, setting them will not require any ugly magic... Note also that string formatting can use values from a dictionary with very conveniently: ``"... {foo} ...".format(**cols)``. The next best thing if ``cols['foo']`` is too verbose for you is ``cols.foo``: create an object which will contain the values as instance variables (that's a good use for setattr()). This is the most Pythonic solution if a dictionary doesn't suffice - it's what most object-relational mappers do. The third idea is to (ab)use a class statement. A class statement in Python creates a temporary namespace *during the class definition* (we'll not be defining any methods or using it object-oriented stuff). And the nice part is that you can put a class statement anywhere, even inside a function: def f(): cols = {'foo': 42} # however you fetch them... class temp_namespace: locals().update(cols) print(foo / 6) # prints 7.0 assert 'foo' not in locals() # no effect outside the class! This works both in CPython 2 and 3. I'm not 100% sure that being able to change locals() in a class is guaranteed in all other implementations. (Note again that locals() of a *function* are not a real dictionary and you *can't* change them - as I said these are fixed when the function is defined.) The fourth idea if you must have code that says just ``foo`` to access columns is to use the exec statement - you can pass it a dictionary that will serve as globals and/or locals. An upside is that the code will be a string and can be dynamic as well. (BTW, if the code is not dynamic, how come you don't know the names you're accessing? If you do, you could just set ``foo = cols['foo']`` etc. for every variable you need - tedious but no magic needed.) Lastly, as you discovered you can dynamically create global variables. (As Terry said, just use the dictionary returned by ``globals()``; no need for setattr). But this is a very last resort (changing globals for a single function is ugly), and somewhat dangerous - e.g. consider what happens if a column names changes and overwrites a function name you had... ---------- nosy: +cben _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:19:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 23:19:42 +0000 Subject: [docs] [issue8645] PyUnicode_AsEncodedObject is undocumented In-Reply-To: <1273247735.73.0.712345896243.issue8645@psf.upfronthosting.co.za> Message-ID: <1290295182.11.0.799469221861.issue8645@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:20:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 23:20:12 +0000 Subject: [docs] [issue8646] PyUnicode_EncodeDecimal is undocumented In-Reply-To: <1273247945.7.0.702043835904.issue8646@psf.upfronthosting.co.za> Message-ID: <1290295212.75.0.00894251141682.issue8646@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> duplicate status: open -> closed superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:20:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 20 Nov 2010 23:20:47 +0000 Subject: [docs] [issue8647] PyUnicode_GetMax is undocumented In-Reply-To: <1273248439.66.0.594970239714.issue8647@psf.upfronthosting.co.za> Message-ID: <1290295247.23.0.152047875827.issue8647@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> duplicate superseder: -> Document unicode C-API in reST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:30:39 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 20 Nov 2010 23:30:39 +0000 Subject: [docs] [issue10043] UnboundLocalError with local variable set by setattr, caused by code run later In-Reply-To: <1286446430.16.0.85312530766.issue10043@psf.upfronthosting.co.za> Message-ID: <1290295839.42.0.473856239958.issue10043@psf.upfronthosting.co.za> Eric Smith added the comment: Closing, as I don't think there's any action item here. ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:31:34 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2010 23:31:34 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290295894.29.0.425506724806.issue9746@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Patch is fine. Go ahead and apply. ---------- nosy: +rhettinger resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 00:35:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 20 Nov 2010 23:35:02 +0000 Subject: [docs] [issue8647] PyUnicode_GetMax is undocumented In-Reply-To: <1273248439.66.0.594970239714.issue8647@psf.upfronthosting.co.za> Message-ID: <1290296102.0.0.362594076967.issue8647@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 01:46:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2010 00:46:11 +0000 Subject: [docs] [issue9746] All sequence types support .index and .count In-Reply-To: <1283455166.89.0.79459833906.issue9746@psf.upfronthosting.co.za> Message-ID: <1290300371.69.0.607966739451.issue9746@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch committed in r86625 (py3k), r86627 (3.1) and r86627 (2.7). Regarding API conformance, I ran this simple test, courtesy of Daniel in msg109784: >>> for cls in str, bytes, bytearray, list, tuple, range: ... print(cls, [method for method in set(dir(collections.Sequence)) - set(dir(cls)) if not method.startswith('_')]) ... [] [] [] [] [] [] Which means we can close this. Thanks everyone! ---------- resolution: accepted -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 04:10:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2010 03:10:52 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290309052.25.0.612104533179.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the review. I agree and committed changes in r86632. The problem with :option:`-c` is probably that Sphinx wants to find a ?.. cmdoption:: -c? joined with the latest program directive it has seen, and thus can?t find the -c defined with a previous program directive. I fought hard with that, trying :option:`-c ` and :ref:, but no luck. I finally just used ```` markup. When #10470 is implemented the two option lists will be merged and I?ll be able to use :option:`-c`. Georg, it would be nice if you could confirm or infirm my analysis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 04:17:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2010 03:17:32 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1290309452.72.0.244927755721.issue10405@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can you propose a patch, as a diff or even plain English in a reply? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 04:17:51 2010 From: report at bugs.python.org (Steven Bethard) Date: Sun, 21 Nov 2010 03:17:51 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290309471.65.0.00982197210509.issue9182@psf.upfronthosting.co.za> Steven Bethard added the comment: Sorry, I think I confused you, please post that patch here. This issue is for documenting the workarounds, issue 9338 is for actually solving the problem. I glanced at your patch on that issue, and it looks basically okay, though I'd like to see a few more tests for the help messages to cover things like: -x X A # no -- -x [X [X ...]] -y Y [Y ...] # no -- -x [X] -- A B # needs -- -x X [X ...] # needs -- -x [X [X ...]] # needs -- It's possible the first two are already covered by the other tests, but at least the last three should all be tested for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 04:32:37 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Nov 2010 03:32:37 +0000 Subject: [docs] [issue10405] IDLE breakpoint facility undocumented In-Reply-To: <1289638474.62.0.690259510388.issue10405@psf.upfronthosting.co.za> Message-ID: <1290310357.67.0.0685829935272.issue10405@psf.upfronthosting.co.za> Ned Deily added the comment: I'd rather see the wording come from more experienced users of IDLE and on other platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 06:57:04 2010 From: report at bugs.python.org (Glenn Linderman) Date: Sun, 21 Nov 2010 05:57:04 +0000 Subject: [docs] [issue10481] subprocess PIPEs are byte streams In-Reply-To: <1290319024.08.0.519309863324.issue10481@psf.upfronthosting.co.za> Message-ID: <1290319024.08.0.519309863324.issue10481@psf.upfronthosting.co.za> New submission from Glenn Linderman : While http://bugs.python.org/issue2683 did clarify the fact that the .communicate API takes a byte stream as input, it is easy to miss the implication. Because Python programs start up with stdin as a text stream, it might be good to point out that some action may need to be taken to be sure that the receiving program expects a byte stream, or that the byte stream supplied should be in an encoding that the receiving program is expecting and can decode appropriately. No mention is presently made in the documentation for .communicate that its output is also a byte stream, and if text will correspond to whatever encoding is used by the sending program. ---------- assignee: docs at python components: Documentation messages: 121869 nosy: docs at python, v+python priority: normal severity: normal status: open title: subprocess PIPEs are byte streams versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 07:00:20 2010 From: report at bugs.python.org (Glenn Linderman) Date: Sun, 21 Nov 2010 06:00:20 +0000 Subject: [docs] [issue10481] subprocess PIPEs are byte streams In-Reply-To: <1290319024.08.0.519309863324.issue10481@psf.upfronthosting.co.za> Message-ID: <1290319220.3.0.959686329454.issue10481@psf.upfronthosting.co.za> Glenn Linderman added the comment: Maybe it should also be mentioned that p.stdout and p.stderr and p.stdin, when set to be PIPEs, are also byte streams. Of course that is the reason that communicate accepts and produces byte streams. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 08:55:03 2010 From: report at bugs.python.org (Glenn Linderman) Date: Sun, 21 Nov 2010 07:55:03 +0000 Subject: [docs] [issue10480] cgi.py should document the need for binary stdin/stdout In-Reply-To: <1290318189.86.0.129478140251.issue10480@psf.upfronthosting.co.za> Message-ID: <1290326103.74.0.824237221249.issue10480@psf.upfronthosting.co.za> Changes by Glenn Linderman : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:44:09 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sun, 21 Nov 2010 09:44:09 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290332649.05.0.306123080407.issue9182@psf.upfronthosting.co.za> Daniel Albeseder added the comment: Steven: From msg121850 I think the last two examples do not need the "--". Since there are no positional arguments, the "--" is not needed. However the following additional cases exist: -x X [X ...] -y Y -- A B # since optionals might come in other order Basically every of the three variable length classes need to be tested: ZeroOrOne, ZeroOrMore and OneOrMore. This might always come in a conflict with positional arguments needed afterward (even with optional positional arguments!). BTW - I recognized the following seem to be supported: for [-x [X ...]] -- [y ...] the following input: a -x -- b I would expect to be 'a' and 'b' positional arguments and the optional '-x' has no argument. However this seem not to work. Another issue or desired behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:46:59 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sun, 21 Nov 2010 09:46:59 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290332819.66.0.924313374829.issue9182@psf.upfronthosting.co.za> Daniel Albeseder added the comment: Added more unit tests for testing the help text as well as the functionality of the "--" separator. ---------- keywords: +patch Added file: http://bugs.python.org/file19731/issue9182.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:48:59 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sun, 21 Nov 2010 09:48:59 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290332939.32.0.130247514081.issue9182@psf.upfronthosting.co.za> Changes by Daniel Albeseder : Removed file: http://bugs.python.org/file19731/issue9182.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:49:05 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sun, 21 Nov 2010 09:49:05 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290332945.63.0.639329044263.issue9182@psf.upfronthosting.co.za> Changes by Daniel Albeseder : Added file: http://bugs.python.org/file19732/issue9182.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:25:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 12:25:48 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> New submission from Mark Dickinson : The docs for 'float' are outdated, and also not entirely written in English. :-) Here's a patch. ---------- assignee: docs at python components: Documentation files: float_builtin_doc.patch keywords: patch messages: 121910 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Improve documentation for 'float' built-in. versions: Python 3.2 Added file: http://bugs.python.org/file19739/float_builtin_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:29:46 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 12:29:46 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290342586.64.0.658027152427.issue10488@psf.upfronthosting.co.za> Mark Dickinson added the comment: Grr. Some unintended cut-and-paste duplication there. ---------- Added file: http://bugs.python.org/file19740/float_builtin_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:29:52 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 12:29:52 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290342592.2.0.432680347397.issue10488@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file19739/float_builtin_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:44:30 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 21 Nov 2010 12:44:30 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290343470.77.0.313464961469.issue10488@psf.upfronthosting.co.za> Eric Smith added the comment: This is clearly an improvement. Do we want mention __float__? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:47:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 12:47:58 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290343678.31.0.759991287213.issue10488@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah yes; good point about __float__. I'll revise. Ezio Melotti also suggested (on #python-dev) that it would be useful to have some examples here. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:48:24 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 21 Nov 2010 12:48:24 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290343704.11.0.80030048194.issue10488@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would prefer to keep the doc for float() simple, including what it accepts (numbers and strings) and a few examples like ``'1.2'``, ``'.5'``, ``' +3 '``, ``'inf'``, ``'NaN'``. Even if the other information is still valuable, I'm not sure this is the best place where to include it, and I think it might be confusing for unexperienced users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:50:23 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 12:50:23 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290343823.06.0.960912179762.issue10488@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ezio: can you suggest a better place for a specification of what float accepts? I think it's necessary (especially for people working on alternative implementations) to have the information *somewhere*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 14:25:30 2010 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sun, 21 Nov 2010 13:25:30 +0000 Subject: [docs] [issue10351] Add autocompletion for keys in dictionaries In-Reply-To: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za> Message-ID: <1290345930.56.0.733794088948.issue10351@psf.upfronthosting.co.za> Changes by Rodrigo Bernardo Pimentel : ---------- nosy: +rbp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 14:29:36 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 13:29:36 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290346176.64.0.910528920413.issue10488@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch: - add some examples - mention __float__ - mention that large numeric arguments can result in an OverflowError ---------- Added file: http://bugs.python.org/file19744/float_builtin_doc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 15:51:56 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 21 Nov 2010 14:51:56 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290351116.34.0.0135713235784.issue10468@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a patch for Doc/c-api/exceptions.rst Added a new section named "Unicode exceptions", and documented the relevant functions from Include/pyerrors.h ---------- keywords: +patch Added file: http://bugs.python.org/file19747/issue10468.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 16:11:23 2010 From: report at bugs.python.org (Steven Bethard) Date: Sun, 21 Nov 2010 15:11:23 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290352283.26.0.806642982792.issue9182@psf.upfronthosting.co.za> Steven Bethard added the comment: Yeah, sorry, those last two should have had arguments after them. I think we have to stick with the current behavior - otherwise there's no way to do something like -x -A -B, where you want -A and -B to be arguments to -x. (You can get that now with -x -- -A -B.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 16:11:46 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 21 Nov 2010 15:11:46 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290352306.66.0.149802005808.issue10468@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 17:05:25 2010 From: report at bugs.python.org (Daniel Albeseder) Date: Sun, 21 Nov 2010 16:05:25 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlOTE4Ml0gZG9jdW1lbnQg4oCcLS3igJ0gYXMgYSB3?= =?utf-8?q?ay_to_distinguish_option_w/_narg=3D=27+=27_from_positional_argu?= =?utf-8?q?ment_in_argparse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1290355525.62.0.3138418504.issue9182@psf.upfronthosting.co.za> Daniel Albeseder added the comment: Steven: The last part I guess would belong better in issue 9334. Using a "--" to end all optionals is just a convention but "--" could also be the argument to some option as well. We need to limit this in any way, and the way it is done right now seem very reasonable for me. Adding some additional unit tests testing this limits might be beneficial but I guess would be best done during issue 9334. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 19:23:28 2010 From: report at bugs.python.org (Mauro Navarro Baraldi) Date: Sun, 21 Nov 2010 18:23:28 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290363807.98.0.783240095493.issue8890@psf.upfronthosting.co.za> Mauro Navarro Baraldi added the comment: Reviewing this thread and talking with another friends, I thought that the pythonic way to solve it should be use the tempfile module. And here is a suggestion using the logging module with tempfile. > import logging > import tempfile > fp, LOG_FILENAME = tempfile.mkstemp(suffix=".log") > logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG) > logging.debug('This message should go to the log file') > LOG_FILENAME '/tmp/tmprBhZz1.log' ---------- components: +Demos and Tools -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 19:41:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2010 18:41:43 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290364903.21.0.948488526651.issue8890@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python components: +Documentation -Demos and Tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 21:34:46 2010 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sun, 21 Nov 2010 20:34:46 +0000 Subject: [docs] [issue9063] TZ examples in datetime.rst are incorrect In-Reply-To: <1277313287.04.0.19115846548.issue9063@psf.upfronthosting.co.za> Message-ID: <1290371686.49.0.305055366963.issue9063@psf.upfronthosting.co.za> Changes by Rodrigo Bernardo Pimentel : ---------- nosy: +rbp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 22:00:14 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2010 21:00:14 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290373214.59.0.640924129582.issue10488@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> mark.dickinson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 22:11:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 21 Nov 2010 21:11:00 +0000 Subject: [docs] [issue10488] Improve documentation for 'float' built-in. In-Reply-To: <1290342348.22.0.717400687136.issue10488@psf.upfronthosting.co.za> Message-ID: <1290373860.23.0.708703521871.issue10488@psf.upfronthosting.co.za> Mark Dickinson added the comment: r86648. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 23:44:54 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2010 22:44:54 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290379494.62.0.621146237723.issue10461@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ?ric, please apply most of these. In the atexit patch, the first change is wrong. Change it to a try/except/finally or skip it altogether. In the collections patch, only include the change for the tail example; the other two should remain unchanged. Skip the difflib patch entirely. It unnecessarily makes the example confusing and hard to follow. Change the cmd patch to: + with open(arg) as f: + self.cmdqueue.extend(f.read().splitlines()) ---------- assignee: rhettinger -> eric.araujo resolution: -> accepted stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 23:48:28 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2010 22:48:28 +0000 Subject: [docs] [issue9802] Document 'stability' of builtin min() and max() In-Reply-To: <1283974231.16.0.73129931792.issue9802@psf.upfronthosting.co.za> Message-ID: <1290379708.13.0.936857310164.issue9802@psf.upfronthosting.co.za> Raymond Hettinger added the comment: As discussed with Mark, am closing this one after having applied documentation changes. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 23:49:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2010 22:49:40 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290379780.56.0.177798403416.issue10461@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19696/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 00:24:11 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2010 23:24:11 +0000 Subject: [docs] [issue6722] collections.namedtuple: confusing example In-Reply-To: <1250591925.23.0.269848636465.issue6722@psf.upfronthosting.co.za> Message-ID: <1290381851.91.0.195342107558.issue6722@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See r86650 ---------- resolution: -> fixed status: open -> closed versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 01:12:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 00:12:02 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1290384722.77.0.164775024233.issue10366@psf.upfronthosting.co.za> ?ric Araujo added the comment: I will commit the patch this week unless someone opposes to it. We still need a doc change as described in Terry?s original message. ---------- assignee: docs at python -> eric.araujo resolution: -> accepted stage: needs patch -> patch review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 01:26:15 2010 From: report at bugs.python.org (Xuanji Li) Date: Mon, 22 Nov 2010 00:26:15 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1290385575.38.0.970348104299.issue10366@psf.upfronthosting.co.za> Xuanji Li added the comment: Hi eric, what doc change are you referring to? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 01:27:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 00:27:06 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1290385626.52.0.715635844739.issue10366@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?I also think the doc for 'class' should say that the default inheritance is from the base class *object*? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 01:33:11 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2010 00:33:11 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1290385991.04.0.641698014643.issue10366@psf.upfronthosting.co.za> Raymond Hettinger added the comment: These mostly look good. Do leave the howto documents as-is. They have some value across multiple versions of Python. Also, the descriptor how-to in particular gets some benefit from keeping (object) explicit because it helps remind users which version of __getattribute__ is being run. Other than the how-tos, please go ahead and apply. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:21:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 02:21:42 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290392502.51.0.898255418006.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: Raymond: I made a single diff for easier review. I?m not 100% sure I should change 'r' to 'rb' in logging: It?s unrelated to with, and the rest of the file has not been checked for similar errors. I prefer to do commits that don?t mix things. Eli: > which whitespace change do you refer to. I changed to 4-spaces > indentation in the code sample to conform to PEP-8. Shouldn't I have? PEP 8 only applies to Python code. http://docs.python.org/dev/documenting/style applies to the docs. ---------- Added file: http://bugs.python.org/file19765/with-in-docs-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:26:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 02:26:52 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1290392812.56.0.9956799399.issue5088@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: docs at python -> eric.araujo status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:33:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 02:33:33 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1290393213.59.0.391313302416.issue10200@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19375/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 04:20:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 03:20:37 +0000 Subject: [docs] [issue10366] Remove unneeded '(object)' from 3.x class examples In-Reply-To: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> Message-ID: <1290396037.86.0.481164176215.issue10366@psf.upfronthosting.co.za> ?ric Araujo added the comment: The patch actually already contained a doc change addressing Terry?s second request, thank you Xuanji Li. I reverted the changes to howto as per Raymond?s comment, made some other slight editions (like removing trailing whitespace) and committed as r86670 and r86672. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:21:07 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 22 Nov 2010 04:21:07 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290399667.23.0.775399642435.issue10461@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, Yes, in a consequent patch I fixed this - kept the formatted code indented at 3 spaces, while adhering to PEP-8 internally. If there's anything else, let me know. ---------- _______________________________________ Python tracker _______________________________________ From fdrake at acm.org Mon Nov 22 05:24:14 2010 From: fdrake at acm.org (Fred Drake) Date: Sun, 21 Nov 2010 23:24:14 -0500 Subject: [docs] Python 2.7: inconsistency in "Extending Python with C or C++" example code In-Reply-To: References: Message-ID: On Fri, Nov 12, 2010 at 2:27 PM, Jani Poikela wrote: > in chapters 1.1 and 1.3 the example code has: > ? ?return Py_BuildValue("i", sts); > whereas chapter 1.2 example code has: > ? ?return PyLong_FromLong(sts); I suspect this is simply style changing over time. My own preference is to use PyLong_FromLong(...), since that executes slightly less code than the Py_BuildValue(...) approach, and I find it more readable as well. ? -Fred -- Fred L. Drake, Jr.? ? "A storm broke loose in my mind."? --Albert Einstein From report at bugs.python.org Mon Nov 22 05:28:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 04:28:25 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290400105.68.0.231115134771.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: I like this version. HTML and LaTex build without warning; all-pdf takes forever and spits out a metric ton of messages, so I haven?t checked its result. The markup trickery is unfortunate, though, I?d like a pronouncement from Georg about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:27:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 06:27:46 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290407266.44.0.331694538393.issue9264@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:41:47 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2010 06:41:47 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1290408107.17.0.420330605804.issue10461@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I?m not 100% sure I should change 'r' to 'rb' in logging: > It?s unrelated to with, and the rest of the file > has not been checked for similar errors. Good catch. This should only be a with-statement transformation. I caught other accidental semantic changes, so be continue to exercise care. ---------- _______________________________________ Python tracker _______________________________________ From fabrizio.marana at gmail.com Sat Nov 20 18:05:37 2010 From: fabrizio.marana at gmail.com (Fabrizio Marana) Date: Sat, 20 Nov 2010 18:05:37 +0100 Subject: [docs] Documentation error: 2.2.2. Executable Python Scripts Message-ID: Dear Sir/Madam, *Bug: *In section 2.2.2. on page http://docs.python.org/py3k/tutorial/interpreter.html you mention "On Windows systems, there is no notion of an ?executable mode? ".** This is wrong. Since Windows NT4 and onwards, there is a notion of a "path extension", which is similar to the Unix executable mode, but invoked differently. *Solution:* 1. Using the GUI: a. Right-click on "My computer" b. go to "properties" c. go to "environment variables" (dependent on the OS: NT 4.0, W2K, XP, Vista, W7) d. add the string ";PY" to the end of the existing string OR 2. Using the Command line (temporary for that command interpreter only until it is exited) At the CLI (cmd.exe; commnd.com) ">" type: SET PATHEXT=%PATHEXT%;.PY Python executables can now be executed on a command line without specifically invoking the Python interpreter as the Python installer automatically associates .py files with python.exe. (Which is a prerequisite) *Example:* C:\Program Files\Python\Tools\Scripts>SET PATHEXT=%PATHEXT%;.PY C:\Program Files\Python\Tools\Scripts>2to3.py At least one file or directory argument required. Use --help to show usage. HTH, Fabrizio Marana -------------- next part -------------- An HTML attachment was scrubbed... URL: From jstackpo at alum.mit.edu Mon Nov 22 02:30:23 2010 From: jstackpo at alum.mit.edu (Stackpole John D) Date: Sun, 21 Nov 2010 20:30:23 -0500 Subject: [docs] Python 2.7 & IDLE on Mac Message-ID: Running Mac OS x 10.6.5 Brand new dual core iMac: Model Name: iMac Model Identifier: iMac11,2 Processor Name: Intel Core i3 Processor Speed: 3.06 GHz Number Of Processors: 1 Total Number Of Cores: 2 Just D/Led Python ver. 2.7: Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin (system came with 2.6 PYTHON which ran fine: IDLE started, opened a window but locked up when used) Python 2.7 runs fine; when I try to start IDLE I get this message: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** What do I do to "configure Python" to go get Tk? If this is an Apple/Mac problem, just let me know and I'll ask them. John John D Stackpole, CPP, PRP OEO, Parliamentary Services 11 Battersea Lane Fort Washington, MD 20744-7203 jstackpo at alum.mit.edu Land Line: 301.292.9479 Cell: 301.221.9462 -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at digvil.net Wed Nov 10 17:06:32 2010 From: info at digvil.net (Vernon Cole) Date: Wed, 10 Nov 2010 09:06:32 -0700 Subject: [docs] pywin32 is now on sourceforge -- not python.net Message-ID: <1289405192.4873.7.camel@dlc-ubuntu> The link for the pywin32 project in http://docs.python.org/py3k/using/windows.html#pywin32 points to http://python.net/crew/mhammond/win32/ which has been obsolete for some five years now. The correct link should be http://sourceforge.net/projects/pywin32/ -- Vernon Cole -- also known as kf7xm on sourceforge (and one of the developers for pywin32) From report at bugs.python.org Mon Nov 22 13:18:36 2010 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 22 Nov 2010 12:18:36 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290428316.6.0.760945211106.issue8890@psf.upfronthosting.co.za> Vinay Sajip added the comment: Actually, I don't think it's a great idea in general to use temporary files for logging, though of course there are specific cases where one might do this. So for the logging examples in the docs (which used '/tmp/XXX') I just removed the '/tmp/' part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 14:01:11 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Nov 2010 13:01:11 +0000 Subject: [docs] [issue10503] os.getuid() documentation should be clear on what kind of uid it is referring In-Reply-To: <1290430871.92.0.135823537975.issue10503@psf.upfronthosting.co.za> Message-ID: <1290430871.92.0.135823537975.issue10503@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : http://docs.python.org/library/os.html#os.getuid os.getuid() documentation just states: > Return the current process?s user id. It is not clear, however, whether "user id" refers to real, effective or saved user id. As per: http://linux.about.com/library/cmd/blcmdl2_getuid.htm ...it should refer to _real_ user id. ---------- assignee: docs at python components: Documentation messages: 122117 nosy: docs at python, giampaolo.rodola priority: normal severity: normal status: open title: os.getuid() documentation should be clear on what kind of uid it is referring versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 14:42:44 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Nov 2010 13:42:44 +0000 Subject: [docs] [issue10503] os.getuid() documentation should be clear on what kind of uid it is referring In-Reply-To: <1290430871.92.0.135823537975.issue10503@psf.upfronthosting.co.za> Message-ID: <1290433364.17.0.655498376057.issue10503@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Update: I think also os.getlogin() doc is wrong. This is what it states (2.7 doc): > Return the name of the user logged in on the controlling terminal of > the process. For most purposes, it is more useful to use the > environment variable LOGNAME to find out who the user is, or > pwd.getpwuid(os.getuid())[0] to get the login name of the currently > effective user id. Since os.getuid() refers to _real_ uid the last sentence should be changed as such: - ... to get the login name of the currently effective user id. + ... to get the login name of the currently real user id. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 14:59:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Nov 2010 13:59:46 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1290434386.24.0.472146992667.issue8890@psf.upfronthosting.co.za> ?ric Araujo added the comment: Whatsnew documents are not edited after the corresponding release is done. Using either /home/user or tempfile depending on the example seems good to me. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:35:10 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 22 Nov 2010 14:35:10 +0000 Subject: [docs] [issue8890] Use tempfile instead of /tmp in examples In-Reply-To: <1290434386.24.0.472146992667.issue8890@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Mon, Nov 22, 2010 at 3:59 PM, ?ric Araujo wrote: > > Using either /home/user or tempfile depending on the example seems good to me. There is no /home/user on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 21:17:18 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 22 Nov 2010 20:17:18 +0000 Subject: [docs] [issue10503] os.getuid() documentation should be clear on what kind of uid it is referring In-Reply-To: <1290430871.92.0.135823537975.issue10503@psf.upfronthosting.co.za> Message-ID: <1290457037.86.0.123665779257.issue10503@psf.upfronthosting.co.za> R. David Murray added the comment: These are wrappers around the posix functions. As such the unix man pages are a better authority than the Python docs :) Still, we could certainly improve the docs. The getlogin error is probably a miscopy from the man page: the man page on my system shows the example as getpwuid(geteuid()), but it is actually showing a replacement for 'cuserid', not 'getlogin'. ---------- nosy: +r.david.murray stage: -> needs patch type: -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 21:37:42 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 22 Nov 2010 20:37:42 +0000 Subject: [docs] [issue10503] os.getuid() documentation should be clear on what kind of uid it is referring In-Reply-To: <1290430871.92.0.135823537975.issue10503@psf.upfronthosting.co.za> Message-ID: <1290458262.62.0.300975952487.issue10503@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Indeed, now that I google for "getlogin", it's not easy to figure out what kind of user it is supposed to return exactly. For getuid() it seems pretty clear that we're talking about _real_ uid, though. http://www.manpagez.com/man/2/getuid/ http://linux.die.net/man/2/getuid ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:54:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 23 Nov 2010 07:54:36 +0000 Subject: [docs] [issue10468] Document UnicodeError access functions In-Reply-To: <1290260862.46.0.923226351306.issue10468@psf.upfronthosting.co.za> Message-ID: <1290498876.21.0.974421677887.issue10468@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, reviewed and applied in r86705. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From johshoff at gmail.com Mon Nov 22 11:02:45 2010 From: johshoff at gmail.com (Johannes Hoff) Date: Mon, 22 Nov 2010 11:02:45 +0100 Subject: [docs] Heapq documentation bug Message-ID: Hi, There is, in my opinion, a bug in the documentation for heapq, for all versions of this module [1]. The documentation states the following: > Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k In this context, I would say that "heaps" clearly refers to the general concept, not this particular implementation. In that case, it is not correct to say that heaps are arrays - they are trees. They are often implemented as arrays, but they need not be. Sources: http://en.wikipedia.org/wiki/Heap_(data_structure) http://c2.com/cgi/wiki?HeapDataStructure Suggested wording: > Heaps are trees for which every parent node has a value less than or equal to any of its children. This implementation uses an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of heaps is that the smallest element is always the root, in this case heap[0]. Or, dropping the general case: > This implementation stores the heap in an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The smallest element of the heap will always be at the root, heap[0]. Johannes [1] See latest python 2: http://docs.python.org/library/heapq and python 3: http://docs.python.org/py3k/library/heapq.html From georg at python.org Tue Nov 23 09:37:56 2010 From: georg at python.org (Georg Brandl) Date: Tue, 23 Nov 2010 09:37:56 +0100 Subject: [docs] Heapq documentation bug In-Reply-To: References: Message-ID: <4CEB7D64.4060700@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 22.11.2010 11:02, schrieb Johannes Hoff: > Hi, > > There is, in my opinion, a bug in the documentation for heapq, for all > versions of this module [1]. > > The documentation states the following: > >> Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k > > In this context, I would say that "heaps" clearly refers to the > general concept, not this particular implementation. In that case, it > is not correct to say that heaps are arrays - they are trees. They are > often implemented as arrays, but they need not be. > > Sources: > http://en.wikipedia.org/wiki/Heap_(data_structure) > http://c2.com/cgi/wiki?HeapDataStructure > > Suggested wording: > >> Heaps are trees for which every parent node has a value less than or equal to any of its children. This implementation uses an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of heaps is that the smallest element is always the root, in this case heap[0]. > > Or, dropping the general case: > >> This implementation stores the heap in an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The smallest element of the heap will always be at the root, heap[0]. Hi Johannes, thanks for your suggestion; it has now been applied to the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzrfWQACgkQN9GcIYhpnLClXACaAie2h9tfhB2zLq0lBpgzTWMW LHwAoIzdd3XTUnh5MvbVD9h/C5xSG12i =UufP -----END PGP SIGNATURE----- From report at bugs.python.org Wed Nov 24 21:22:11 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Nov 2010 20:22:11 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290630131.15.0.864910524613.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: Committed in r86732 on py3k, will backport on 3.1/2.7 if Benjamin is OK with that. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 21:25:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 24 Nov 2010 20:25:48 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1290630131.15.0.864910524613.issue10299@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: Okay. 2010/11/24 Ezio Melotti : > > Ezio Melotti added the comment: > > Committed in r86732 on py3k, will backport on 3.1/2.7 if Benjamin is OK with that. > > ---------- > nosy: +benjamin.peterson > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 23:06:23 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 24 Nov 2010 22:06:23 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290636383.15.0.934548497911.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: Backported in r86735 (3.1) and r86736 (2.7). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 05:13:50 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 25 Nov 2010 04:13:50 +0000 Subject: [docs] [issue8481] doc: ctypes no need to explicitly allocate writable memory with Structure In-Reply-To: <1271834227.47.0.0148350492358.issue8481@psf.upfronthosting.co.za> Message-ID: <1290658430.57.0.178415379666.issue8481@psf.upfronthosting.co.za> Ray.Allen added the comment: I think not only Structures but also other ctypes can be passed with byref() to functions expecting pointer to mutable memory. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:07:39 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 25 Nov 2010 06:07:39 +0000 Subject: [docs] [issue9014] Incorrect documentation of the PyObject_HEAD macro In-Reply-To: <1276718330.85.0.16685449654.issue9014@psf.upfronthosting.co.za> Message-ID: <1290665259.1.0.309052164137.issue9014@psf.upfronthosting.co.za> Ray.Allen added the comment: Additionally, I prefer move the discussion of Py_TRACE_REFS under the documentation of PyObject: http://docs.python.org/dev/py3k/c-api/structures.html?highlight=pyobject_head#PyObject, since they'are connected directly. The doc of PyObject_HEAD should only saying like "expands to a PyObject variable". ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From thomas.ryan at hp.com Wed Nov 24 02:24:56 2010 From: thomas.ryan at hp.com (Ryan, Thomas) Date: Wed, 24 Nov 2010 01:24:56 +0000 Subject: [docs] Python 3.1.2 xml.sax doc error, or bug, or error by the operator... Message-ID: <111272823F246042A70CE14768B23B1360ED52D7DA@GVW0436EXB.americas.hpqcorp.net> Thanks for your help. http://docs.python.org/py3k/library/xml.sax.html The description xml.sax.parse(filename_or_stream, handler, error_handler=handler.ErrorHandler()) Similar to parse, but parses from a buffer string received as a parameter. seems incorrect, or misleading. Is the term "buffer" significant? Only "string" is italicized. I am not a Python expert, but here is my snippet that fails. I did Google around but the examples I found were all python 2.x. import xml.sax class myHandler(xml.sax.ContentHandler) : pass m = myHandler() ## both of the next two cals throw the same expression (consistency is not surprising, but was worth checking, I guess) ## I assume the handler parameter is OK xml.sax.parseString("hello", m) ##xml.sax.parseString(b"<\abc>".decode("utf8"), m) Traceback (most recent call last): File " xmlsad.py", line 10, in xml.sax.parseString("hello", m) File "C:\Python31\lib\xml\sax\__init__.py", line 45, in parseString inpsrc.setByteStream(BytesIO(string)) TypeError: 'str' does not support the buffer interface From thomas.ryan at hp.com Wed Nov 24 08:28:39 2010 From: thomas.ryan at hp.com (Ryan, Thomas) Date: Wed, 24 Nov 2010 07:28:39 +0000 Subject: [docs] Recall: Python 3.1.2 xml.sax doc error, or bug, or error by the operator... Message-ID: <111272823F246042A70CE14768B23B1360ED52D85F@GVW0436EXB.americas.hpqcorp.net> Ryan, Thomas would like to recall the message, "Python 3.1.2 xml.sax doc error, or bug, or error by the operator...". From thomas.ryan at hp.com Wed Nov 24 08:47:06 2010 From: thomas.ryan at hp.com (Ryan, Thomas) Date: Wed, 24 Nov 2010 07:47:06 +0000 Subject: [docs] (take 2) Python 3.1.2 xml.sax doc error, or bug, or error by the operator... Message-ID: <111272823F246042A70CE14768B23B1360ED52D860@GVW0436EXB.americas.hpqcorp.net> Fixed typos...(sorry -, accidentally sent a draft, back now) ---- Thanks in advance for your help. http://docs.python.org/py3k/library/xml.sax.html The description xml.sax.parseString(string, handler[, error_handler]) Similar to parse(), but parses from a buffer string received as a parameter. seems incorrect, or misleading. Is the term "buffer" significant? Only "string" is italicized. Do I need a PyBuff from C/C++ (of some sort)? I am not a Python expert, but here is my snippet that fails. I did Google around for help but the examples I found were all python 2.x. Those refer to set "self" content handlers, but I could not get those to work with a string/bytes either. It seems that in Python 3 someone moved the internal variable access to a parameterized input. Ok with me, to further hide internal values, but something seems broken. BTW - Sees to work fine with files & streams. Code - import xml.sax class myHandler(xml.sax.ContentHandler) : pass m = myHandler() ## both of the next two cals throw the same exception (consistency is not surprising, but was worth checking, I guess) ## I assume the handler parameter is OK xml.sax.parseString("hello", m) ##xml.sax.parseString(b"<\abc>".decode("utf8"), m) Traceback (most recent call last): File " xmlsad.py", line 10, in xml.sax.parseString("hello", m) File "C:\Python31\lib\xml\sax\__init__.py", line 45, in parseString inpsrc.setByteStream(BytesIO(string)) TypeError: 'str' does not support the buffer interface Any ideas regarding to expand the documentation re the buffer interface (Pybuff?), or to adjust the xml.sax.parseString() code? Thanks, Tom Ryan From report at bugs.python.org Thu Nov 25 11:27:53 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 25 Nov 2010 10:27:53 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1290155996.63.0.683219536399.issue10122@psf.upfronthosting.co.za> Message-ID: <20101125102735.GA1048@rubuntu> Senthil Kumaran added the comment: Bo?tjan, it is fixed. The change will reflect when the docs get served from the updated version. Also, Georg will take care of merging it to other branches. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 11:45:42 2010 From: report at bugs.python.org (Petter Remen) Date: Thu, 25 Nov 2010 10:45:42 +0000 Subject: [docs] [issue10526] Minor typo in What's New in Python 2.7 In-Reply-To: <1290681942.88.0.460201126168.issue10526@psf.upfronthosting.co.za> Message-ID: <1290681942.88.0.460201126168.issue10526@psf.upfronthosting.co.za> New submission from Petter Remen : There's a word missing in section "PEP 372: Adding an Ordered Dictionary to collections" The ConfigParser module uses them by default, meaning that configuration files can now read, modified, and then written [...] ~~~~~~~~ should be "now be read". ---------- assignee: docs at python components: Documentation messages: 122347 nosy: Petter.Remen, docs at python priority: normal severity: normal status: open title: Minor typo in What's New in Python 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Thu Nov 25 12:33:52 2010 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Thu, 25 Nov 2010 12:33:52 +0100 Subject: [docs] (take 2) Python 3.1.2 xml.sax doc error, or bug, or error by the operator... In-Reply-To: <111272823F246042A70CE14768B23B1360ED52D860@GVW0436EXB.americas.hpqcorp.net> References: <111272823F246042A70CE14768B23B1360ED52D860@GVW0436EXB.americas.hpqcorp.net> Message-ID: <4CEE49A0.4030802@netwok.org> Hi, > Traceback (most recent call last): > File " xmlsad.py", line 10, in > xml.sax.parseString("hello", m) > File "C:\Python31\lib\xml\sax\__init__.py", line 45, in parseString > inpsrc.setByteStream(BytesIO(string)) > TypeError: 'str' does not support the buffer interface The TypeError may come from setByteStream or BytesIO. Look at the docs for the latter: http://docs.python.org/dev/library/io#io.BytesIO Bingo, it accepts only bytes, not characters, so you have to pass a bytes object, not a str. Regards From report at bugs.python.org Thu Nov 25 13:28:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Nov 2010 12:28:09 +0000 Subject: [docs] [issue10529] Write argparse i18n howto In-Reply-To: <1290688089.28.0.749623528369.issue10529@psf.upfronthosting.co.za> Message-ID: <1290688089.28.0.749623528369.issue10529@psf.upfronthosting.co.za> New submission from ?ric Araujo : argparse helpfully makes its messages with gettext.gettext. The docs should explain how to benefit from that in one?s program. ---------- assignee: docs at python components: Documentation messages: 122358 nosy: bethard, docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Write argparse i18n howto type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:30:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Nov 2010 12:30:51 +0000 Subject: [docs] [issue10529] Write argparse i18n howto In-Reply-To: <1290688089.28.0.749623528369.issue10529@psf.upfronthosting.co.za> Message-ID: <1290688251.66.0.336880414485.issue10529@psf.upfronthosting.co.za> ?ric Araujo added the comment: s/makes/marks/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 21:32:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Nov 2010 20:32:46 +0000 Subject: [docs] [issue10533] Need example of using __missing__ In-Reply-To: <1290704449.7.0.95801510837.issue10533@psf.upfronthosting.co.za> Message-ID: <1290717166.63.0.558809682567.issue10533@psf.upfronthosting.co.za> ?ric Araujo added the comment: > 4. I cannot come up with another typical integer value that would be > useful, then again I've used "", [] and set() numerous times. You can get '' with str as default factory and [] with list. I think we agree on reclassifying this as a doc problem. Proposal: 1) Add a small example in stdtypes.rst:dict section. 2) Add examples of giving dict or int to collections.defaultdict to get {} or 0 as default value. 3) Find a way to link to that example from the index. It is not currently indexed because there is no dict.__missing__ method, hence no method markup that would trigger indexing. 4) Cross-link collections.rst:defaultdict, collections.rst:Counter and stdtypes.rst:__missing__ example. ---------- components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch title: defaultdict constructor with a concrete value -> Need example of using __missing__ versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 21:34:50 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 25 Nov 2010 20:34:50 +0000 Subject: [docs] [issue10533] Need example of using __missing__ In-Reply-To: <1290704449.7.0.95801510837.issue10533@psf.upfronthosting.co.za> Message-ID: <1290717290.12.0.772900280627.issue10533@psf.upfronthosting.co.za> Michael Foord added the comment: Well, I was perfectly aware of __missing__ - it's just a three liner to do it when using a lambda isn't *that* bad... I'm sure the documentation could be improved to highlight __missing__ though. It's almost always the case that documentation can be improved. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 22:46:11 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Nov 2010 21:46:11 +0000 Subject: [docs] [issue10533] Need example of using __missing__ In-Reply-To: <1290704449.7.0.95801510837.issue10533@psf.upfronthosting.co.za> Message-ID: <1290721570.97.0.379925883636.issue10533@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [?ukasz Langa] > __missing__ didn't appear to be the one obvious way to anyone. Two thoughts: * There is part of the Zen that says that way may not be obvious unless your Dutch. In this case, __missing__ was the API designed by Guido to handle the problem. If it isn't obvious, it is up to us to popularize the idiom in talks, in tutorials, in newsgroup discussions, etc. And FWIW, it is not unprecedented -- Lua's dicts have a similar hook and most of the interesting programming in Lua relies on it. * The __missing__ method should not be considered a dark corner of Python. Unlike the copy module, pickling, of weakrefs, it is not tucked away in the library. The missing method is part of the basic API for one of Python's most fundamental objects. If someone is going to be a Python programmer, they must at least learn about dicts, lists, strings, and tuples. > then again I've used "", [] and set() numerous times. > Adding zerodict, stringdict, listdict, setdict is > obviously absurd. Looking at those examples, you're probably already aware that the list and set versions are already served by defaultdict(), and that it would be basic (and probably common) mistake to accidentally use [] in your proposed constant dict. A constant version of the defaultdict only makes sense with immutables such as numbers, strings, and tuples. The common case would be the number zero and we have Counter() for that. So, you're left with very few use cases and with a hazard for users who may write: f = fallback_dict([]). > 4. I cannot come up with another typical integer value > that would be useful FWIW, the Counter class *is* a ZeroDict. It has a few extra methods but is basically a dict with __missing__ set to return zero. > ... then I'm +1 on correcting the docs in terms of > __missing__ and leaving the implementation as is. Thank you. Will reclassify this as a doc issue. [?ric Araujo] > 2) Add examples of giving dict or int to > collections.defaultdict to get {} or 0 as default value. Those examples have been there since day one. [Michael Foord] > I'm sure the documentation could be improved to highlight > __missing__ though. I'll add another example and perhaps include on in the tutorial. > It's almost always the case that documentation can be improved. :-) Getting people to read it is another story ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 00:44:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 25 Nov 2010 23:44:32 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290728672.07.0.0822441099106.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: In 2.7, the functions are not sorted alphabetically. I think they should, and I offer to do the boring work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 00:48:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 25 Nov 2010 23:48:16 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290728896.85.0.0315922878983.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: The last 4 functions are "Non-essential Built-in Functions"[0] so I kept them at the end of the list to match the order they have in the page. [0]: http://docs.python.org/library/functions.html#non-essential-built-in-functions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 01:22:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Nov 2010 00:22:06 +0000 Subject: [docs] [issue10536] Enhancements to gettext docs In-Reply-To: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> Message-ID: <1290730924.88.0.289473332428.issue10536@psf.upfronthosting.co.za> New submission from ?ric Araujo : A patch made for #2504 revealed a bug in gettext.rst, and I?ve found a number of other things to change in the file. This is the first patch of a series of two or three. Barry, as the original author of the module and doc, I?d like your opinion on points 3, a, and b particularly. Patch is also uploaded to Rietveld for greater convenience: http://codereview.appspot.com/3333042/ (upload.py rocks) Summary: 1) Markup: Use modern class/method directives combo (yay DRY). Mark up variable parts in :file: constructs (e.g. :file:`{domain}.mo` will cause the HTML output to use var to indicate replaceable text). Also change some ``gettext`` to :program:`gettext` for consistency. 2) Fix a typo in lngettext doc (originally included in patch by Franz Glasner for #2504). 3) I had started to remove information about private attributes (_info, _charset), advertising public getter methods instead. Then I read the description of NullTranslations and realized the information was needed for subclasses. I?ve reverted my removals, but I still think the private attributes should be listed in a specific section for people writing subclasses and not in the rest of the text. If you?re okay, I?ll make a second patch. 4) Assorted wording changes, missing periods and hyphens, and other very small touch-ups: Turned a broken bare link into a working link with nice text; used the with statement in an example (we all love the with statement!); used two spaces after periods throughout (hello Fred Drake). Final note: lines have not been rewrapped, for diff clarity. When I commit part or all of this patch, I?ll make another commit to rewrap. Not addressed: a) The current docs is currently POSIX-specific. b) The docs take great care to explain that Unicode strings will be returned in different places, but this should not be so accented in 3.x docs IMO. I would just put a note somewhere near the top that all strings are str and remove the redundant sentences. Following that line of thought, I could group all l*gettext variants at the end of the list of methods, explaining that regular usage should just be happy with str objects and that l*gettext are available if people really want bytes. c) The file uses ?built-in namespace? and ?builtins namespace?, sometimes in neighbor paragraphs. :mod:`builtins` is not used, even in explanations of the install function/method. I don?t know if I should change that. d) Some capitalization patterns look strange to me: I have seen ?I18N? and ?L10N? in upper case nowhere else. Similarly, lower-case ?id? looks stranger than ?ID?. The latter is used for example in official GNU gettext docs. Am I going into foolish consistency territory or not? Thanks in advance for reviews and opinions. ---------- assignee: eric.araujo components: Documentation files: gettext-docs-1.diff keywords: needs review, patch messages: 122420 nosy: barry, docs at python, eric.araujo priority: normal severity: normal stage: patch review status: open title: Enhancements to gettext docs versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19819/gettext-docs-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 01:50:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Nov 2010 00:50:05 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290732605.18.0.235872339598.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: It?s fine to have them at the end of the page, but I think people want things to be sorted in an index. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:56:00 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 26 Nov 2010 03:56:00 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290743760.33.0.0558412929165.issue10299@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think it's worth changing it. The table still provides a good overview, and having them at the end won't prevent people to find their doc. Both the table and the page could be divided in sections though, if we find a way to group all the functions that makes enough sense (e.g. put together int/dict/list/set/etc, getattr/setattr/delattr, but then it's difficult to add more groups without maxing them too small). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 06:55:19 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 26 Nov 2010 05:55:19 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <20101125102735.GA1048@rubuntu> Message-ID: Bo?tjan Mejak added the comment: The change is still not reflected. Why not? It's been more than a month now. What is going on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:37:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 11:37:21 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1290771441.59.0.872501835324.issue10122@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't waste my time by merging every little typo fix to the maintenance branches immediately; I rather merge them all at once every now and then. You will certainly understand that nobody is harmed by a stray "d", even if it has a pointy tip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:41:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 11:41:17 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290771676.92.0.88986279389.issue10299@psf.upfronthosting.co.za> Georg Brandl added the comment: Dividing the table in sections makes sense to me; it provides the kind of grouping that is helpful sometimes, but cannot be kept when sorting alphabetically. So when the table is grouped, the actual docs can remain alphabetized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:50:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 11:50:53 +0000 Subject: [docs] [issue10526] Minor typo in What's New in Python 2.7 In-Reply-To: <1290681942.88.0.460201126168.issue10526@psf.upfronthosting.co.za> Message-ID: <1290772253.71.0.985843459359.issue10526@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r86794. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Fri Nov 26 12:56:17 2010 From: georg at python.org (Georg Brandl) Date: Fri, 26 Nov 2010 12:56:17 +0100 Subject: [docs] Python 2.7: inconsistency in "Extending Python with C or C++" example code In-Reply-To: References: Message-ID: <4CEFA061.40009@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 22.11.2010 05:24, schrieb Fred Drake: > On Fri, Nov 12, 2010 at 2:27 PM, Jani Poikela wrote: >> in chapters 1.1 and 1.3 the example code has: >> return Py_BuildValue("i", sts); >> whereas chapter 1.2 example code has: >> return PyLong_FromLong(sts); > > I suspect this is simply style changing over time. My own preference > is to use PyLong_FromLong(...), since that executes slightly less code > than the Py_BuildValue(...) approach, and I find it more readable as > well. I've now put in PyLong_FromLong everywhere. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzvoGEACgkQN9GcIYhpnLDVegCfSmYR0up2irnX2ojt6Ct5m2SR /2QAoJN53j2NTapTNbtTEGu7DFdpRUiE =+3C7 -----END PGP SIGNATURE----- From report at bugs.python.org Fri Nov 26 12:58:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 11:58:57 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290772737.01.0.501042888065.issue9312@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, you're right; you could have linked to the correct -c option by using this form: :option:`unittest -c` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:06:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 12:06:12 +0000 Subject: [docs] [issue10420] Document of Bdb.effective is wrong. In-Reply-To: <1289775674.64.0.742644713798.issue10420@psf.upfronthosting.co.za> Message-ID: <1290773172.34.0.144212048557.issue10420@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r86798. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Fri Nov 26 13:08:33 2010 From: georg at python.org (Georg Brandl) Date: Fri, 26 Nov 2010 13:08:33 +0100 Subject: [docs] 2.x-ism in builtins module doc In-Reply-To: References: Message-ID: <4CEFA341.5020007@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 11.11.2010 02:57, schrieb Alexander Belopolsky: > In " ... most modules have the name __builtins__ (note the 's')", the > "(note the 's')" part is clearly a leftover from 2.x where builtins > was called __builtin__. I suggest removing it. > > See http://docs.python.org/dev/library/builtins.html You're right; I've removed the remark now. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzvo0EACgkQN9GcIYhpnLAfxwCgid4+i9zIHLU4LNdd0zgIkFFj tvMAnjYIIKCSFgD7R9Xh4UBRhZk5TShV =4Sul -----END PGP SIGNATURE----- From georg at python.org Fri Nov 26 13:12:44 2010 From: georg at python.org (Georg Brandl) Date: Fri, 26 Nov 2010 13:12:44 +0100 Subject: [docs] Standard Library, Brief Tour, os.system() example, small nit In-Reply-To: <4CC590D0.9020308@r-t.org> References: <4CC590D0.9020308@r-t.org> Message-ID: <4CEFA43C.4040400@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.10.2010 16:14, schrieb Robert Terzi: > http://docs.python.org/tutorial/stdlib.html > > In section 10.1, Operating System Interface, I have a small > nit with the first example for os.system. First it doesn't > mention what os.system does, Second the example command is > DOS/Windows specific, Third, if run it will change the > current time on your DOS/Windows machine. > > I think that example could easily by improved. My suggestions > for a command that I think will work under Windows, *nix, > and OS X, are either 'mkdir' or 'set' to get a list of > environment variables. Hi Robert, thanks for your suggestion; this is now changed to your alternate version in the developer docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzvpDwACgkQN9GcIYhpnLA53gCffvwwmyevjIYd6fGc4HWPpdOh +wAAmwVFQeex91EaXKxKzGYRbgH23cXw =kwVx -----END PGP SIGNATURE----- From report at bugs.python.org Fri Nov 26 13:13:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 26 Nov 2010 12:13:47 +0000 Subject: [docs] [issue10172] code block has no syntax coloring In-Reply-To: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> Message-ID: <1290773627.8.0.351577989978.issue10172@psf.upfronthosting.co.za> Georg Brandl added the comment: This is because the Python used to render doesn't recognize the new-style exception catching; this will be fine once the system is upgraded to 2.6. ---------- nosy: +georg.brandl resolution: -> later status: open -> closed _______________________________________ Python tracker _______________________________________ From johshoff at gmail.com Fri Nov 26 19:25:32 2010 From: johshoff at gmail.com (Johannes Hoff) Date: Fri, 26 Nov 2010 19:25:32 +0100 Subject: [docs] Heapq documentation bug In-Reply-To: <4CEB7D64.4060700@python.org> References: <4CEB7D64.4060700@python.org> Message-ID: On Tue, Nov 23, 2010 at 9:37 AM, Georg Brandl wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Am 22.11.2010 11:02, schrieb Johannes Hoff: >> Hi, >> >> There is, in my opinion, a bug in the documentation for heapq, for all >> versions of this module [1]. >> >> The documentation states the following: >> >>> Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k >> >> In this context, I would say that "heaps" clearly refers to the >> general concept, not this particular implementation. In that case, it >> is not correct to say that heaps are arrays - they are trees. They are >> often implemented as arrays, but they need not be. >> >> Sources: >> http://en.wikipedia.org/wiki/Heap_(data_structure) >> http://c2.com/cgi/wiki?HeapDataStructure >> >> Suggested wording: >> >>> Heaps are trees for which every parent node has a value less than or equal to any of its children. This implementation uses an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of heaps is that the smallest element is always the root, in this case heap[0]. >> >> Or, dropping the general case: >> >>> This implementation stores the heap in an array for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero. For the sake of comparison, non-existing elements are considered to be infinite. The smallest element of the heap will always be at the root, heap[0]. > > Hi Johannes, > > thanks for your suggestion; it has now been applied to the development docs. Thanks! Just one little thing. It now says: > Heaps are binary trees for which... You can drop the "binary" -- the algorithm works on trees in general (with a bound number of children). Johannes From report at bugs.python.org Fri Nov 26 21:50:32 2010 From: report at bugs.python.org (rurpy the second) Date: Fri, 26 Nov 2010 20:50:32 +0000 Subject: [docs] [issue10545] remove or rewrite "Using Backslash to Continue Statements" anti-idiom In-Reply-To: <1290804632.88.0.494003444216.issue10545@psf.upfronthosting.co.za> Message-ID: <1290804632.88.0.494003444216.issue10545@psf.upfronthosting.co.za> New submission from rurpy the second : The Python HOWTOs->Idioms and Anti-Idioms has a section "Using Backslash to Continue Statements". It says that line continuation is "dangerous" and gives two reasons. 1. Hard to see a space after the backslash. This is not "dangerous" as it cause an impossible-to-miss syntax error (as pointed out in the following sentence.) 2. It can cause other "subtle" errors. It gives a code example purporting to demonstrate this but without saying what the input data to the code is or what the resulting problem is. I spent a while trying to figure it out unsuccessfully. In http://www.mail-archive.com/python-list at python.org/msg249344.html a number of c.l.p regulars did not figure it out either. I also note related bug http://bugs.python.org/issue7391 that points out that avoinding backslashed continuations with parens is not always possible. So I suggest... 1. If the the given example actually illustrates a real problem, document clearly what it is. This is a reference manual, not a quiz book. 2. If not, then remove that argument. Now the only reason for not using backslashes is that a hard-to-see space after the backslash will cause a syntax error. That is neither dangerous or a strong reason not to do it. An unstated reason is that PEP-8 recommends against it but its recommendation is not absolute and is based only on aethtetics. With no real arguments against using it other than style, it should not be documented as an anti-idiom, recommendations against it should remain only in PEP-8 with other such style guidelines, and this section should be removed from the Anti-Idioms chapter. ---------- assignee: docs at python components: Documentation messages: 122477 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: remove or rewrite "Using Backslash to Continue Statements" anti-idiom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 22:08:32 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2010 21:08:32 +0000 Subject: [docs] [issue10546] UTF-16-LE and UTF-16-BE support non-BMP characters In-Reply-To: <1290805712.04.0.751752211923.issue10546@psf.upfronthosting.co.za> Message-ID: <1290805712.04.0.751752211923.issue10546@psf.upfronthosting.co.za> New submission from STINNER Victor : Python3 doc tells that UTF-16-LE and UTF-16-BE only support BMP characters. What? I think that it is wrong. It was maybe wrong with Python2 and narrow build (unichr() only supports BMP characters), but it is no more true in Python3. ---------- assignee: docs at python components: Documentation files: utf_16_bmp.patch keywords: patch messages: 122479 nosy: docs at python, haypo priority: normal severity: normal status: open title: UTF-16-LE and UTF-16-BE support non-BMP characters versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19830/utf_16_bmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 00:47:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Nov 2010 23:47:18 +0000 Subject: [docs] [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1290815238.26.0.221435583227.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: Great, thanks! New markup committed as r86823, long lines rewrapped in r86824 (along with a few minor touch-ups). I think we?re good now, I?ll backport shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 01:31:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Nov 2010 00:31:44 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290817904.88.0.305865078977.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Divided command-line options logically into sub-sections and improved > their explanations Using the program/cmdoption combo may be a good idea here. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 02:02:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Nov 2010 01:02:37 +0000 Subject: [docs] [issue10299] Add index with links section for built-in functions In-Reply-To: <1288794298.88.0.884491179751.issue10299@psf.upfronthosting.co.za> Message-ID: <1290819754.86.0.675283811319.issue10299@psf.upfronthosting.co.za> ?ric Araujo added the comment: Possible groups: Types constructors: bool, bytearray, bytes, complex, dict, float, frozenset, int, list, memoryview, object, range, set, slice, str, tuple Mathematical functions: abs, bin, divmod, hex, oct, pow, round Working with sequences: all, any, enumerate, filter, iter, len, map, max, min, reversed, sorted, sum, zip Working with strings: chr, format, ord I/O: input, open, print Introspection/metaprogramming: ascii, delattr, dir, getattr, globals, hasattr, help, id, isinstance, issubclass, locals, repr, setattr, type, vars Advanced functions: classmethod, compile, eval, exec, hash, next, property, staticmethod, super, __import__ The last two are debatable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:37:26 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 27 Nov 2010 08:37:26 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290847046.56.0.561311287912.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, good idea - I'll do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:52:48 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 27 Nov 2010 08:52:48 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290847968.46.0.913525833929.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: There's something weird going on with cmdoption... I've applied for subscription to the docs mailing list, but while I'm awaiting moderator approval, here's the brain-dump. Suppose this option description: .. program:: trace .. cmdoption:: -c, --count Blah blah blah And now this reference: This is a test long :option:`--count` and then short :option:`-c`, test. Only the -c gets linked to ..cmdoption, not --count. If I list --count before -c in ..cmdoption, then it's the other way around. What makes it kinda work (link both the long and short names) is: .. cmdoption:: -c --count Blah blah blah But this isn't standard (although it doesn't look too bad). Actually, the original listing (the short name first, then the long one) is customary in the library docs. ---------- _______________________________________ Python tracker _______________________________________ From strombrg at gmail.com Sat Nov 27 04:13:01 2010 From: strombrg at gmail.com (Dan Stromberg) Date: Fri, 26 Nov 2010 19:13:01 -0800 Subject: [docs] dbm doc Message-ID: I think the page describing the dbm module could be a little more clear. It's at http://docs.python.org/library/dbm.html First it says it's an interface to ndbm, then it says it could be used with an ndbm, gdbm or berkeley db interface. I submit that it's not an interface to ndbm, but rather provides something that looks like ndbm at the Python API layer, and that it's not used with different interfaces, but rather with a consistent interface having potentially inconsistent (from one machine to another) backend implementations (IOW, not necessarily always the same on-disk representation of the same key-value pairs). -- Dan Stromberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Nov 27 13:38:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Nov 2010 12:38:02 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290861482.51.0.171259102889.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: I noticed too that the second form given in a cmdoption directive cannot be linked to from an option construct. The workaround looks like this: :option:`--long <-l>`. This uses a generic Sphinx (or reST) property: When using :role:`text `, ?thing? will be given as argument to the role but ?text? will be displayed. It?s very useful for references for example, if you don?t want title case in the middle of your sentence of if you need to rephrase the title: ?Have a look at the :ref:`detailed explanation `?. Even if it can be worked around, can you report this Sphinx bug? ---------- _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Sat Nov 27 14:03:13 2010 From: eliben at gmail.com (Eli Bendersky) Date: Sat, 27 Nov 2010 15:03:13 +0200 Subject: [docs] possible bug in Sphinx's handling of the cmdoption directive Message-ID: This problem came up while working in issue 9264 ( http://bugs.python.org/issue9264). Copying the report from there: ---------------------------- There's something weird going on with cmdoption... I've applied for subscription to the docs mailing list, but while I'm awaiting moderator approval, here's the brain-dump. Suppose this option description: .. program:: trace .. cmdoption:: -c, --count Blah blah blah And now this reference: This is a test long :option:`--count` and then short :option:`-c`, test. Only the -c gets linked to ..cmdoption, not --count. If I list --count before -c in ..cmdoption, then it's the other way around. What makes it kinda work (link both the long and short names) is: .. cmdoption:: -c --count Blah blah blah But this isn't standard (although it doesn't look too bad). Actually, the original listing (the short name first, then the long one) is customary in the library docs. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Nov 27 14:20:20 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 27 Nov 2010 13:20:20 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290864020.64.0.559887385035.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, I sent an inquiry about this problem to the docs at python.org list. In the meantime, I will implement it with the workaround you suggest (I checked it works in this case too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:25:56 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 27 Nov 2010 14:25:56 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290867956.08.0.0682931390603.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching an updated patch for Doc/library/trace.rst in 3.2 Changed the formatting of command-line options per ?ric's suggestion of using program/cmdoption/option combos (great idea ?ric - it looks much better). ---------- Added file: http://bugs.python.org/file19837/issue9264.py32.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 16:07:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Nov 2010 15:07:40 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290870459.98.0.677793700466.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for your work on this! ``dir/package/module.cover`` ? :file:`{dir}/{package}/{module}.cover` '``>>>>>>``' looks wrong. ``os.pathsep``: You can use :data:`os.pathsep` to get a link, I think. +.. method:: CoverageResults.update(other) FTR, there is a new way for doing such things: You can nest method directives in a class directive block. See gettext.rst for an example. Your patch needn?t change that now, not all docs have been updated, so it?s best to do as you did and follow the style of the rest of the file. I propose to change it after your patch is committed. +.. Stray dots at the end of the file. The doc uses one or two spaces inconsistently. I don?t know if it?s worth changing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 16:17:33 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 27 Nov 2010 15:17:33 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290871053.19.0.896032033724.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching an updated patch following ?ric's suggestions: * ``dir/package/module.cover`` -- FIXED * '``>>>>>>``' looks wrong -- FIXED to just ``>>>>>>`` * ``os.pathsep`` -- FIXED * method:: CoverageResults.update(other) -- OK, let's leave it for a separate issue. * Stray dots at the end of the file -- FIXED * The doc uses one or two spaces inconsistently. -- not 100% what you mean here, but I found inconsistent separation between paragraphs (sometimes 1 blank line, sometimes 2), and fixed it. If you meant something else, I can fix that too :) ---------- Added file: http://bugs.python.org/file19838/issue9264.py32.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 17:01:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 27 Nov 2010 16:01:07 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290873667.52.0.0514580944988.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: Duh, I forgot some words: The file uses one or two dots *after full stops* inconsistently. I don?t think you have to change that now, we can make it consistent later (or not, as it does not affect the output), as we do with line wrapping. Just keep it in mind for future patches :) Terry: I got no warnings when building the HTML and the output looks good. +1 on commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 22:04:56 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2010 21:04:56 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290891896.82.0.390342578857.issue9264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ?ric, please feel free to commit (and even grab Assigned To:) when you feel patch is ready. You can do final review better than me. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:59:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 03:59:05 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1290916745.11.0.0906615117931.issue10318@psf.upfronthosting.co.za> ?ric Araujo added the comment: Attached patch fixes shebangs to use python3 in py3k. There are a lot of examples that use a bare ?python?; changing all of those would cause merging pains. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:59:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 03:59:20 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1290916760.91.0.589250442193.issue10318@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +patch Added file: http://bugs.python.org/file19850/env-python3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:03:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 28 Nov 2010 04:03:52 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1290916760.91.0.589250442193.issue10318@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: - #!/usr/bin/env python + #!/usr/bin/env python3 # -*- coding: UTF-8 -*- Not strictly related to this issue, but do we want to recommend redundant encoding cookie in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:05:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 04:05:16 +0000 Subject: [docs] [issue10318] "make altinstall" installs many files with incorrect shebangs In-Reply-To: <1288926610.35.0.932494150274.issue10318@psf.upfronthosting.co.za> Message-ID: <1290917116.43.0.39968310496.issue10318@psf.upfronthosting.co.za> ?ric Araujo added the comment: Good call. +1 on removing them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:50:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 04:50:12 +0000 Subject: [docs] [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1290919812.21.0.574991000883.issue8040@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 06:43:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 05:43:47 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1290923027.35.0.198045322274.issue9264@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: terry.reedy -> eric.araujo status: open -> pending versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 06:48:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 28 Nov 2010 05:48:29 +0000 Subject: [docs] [issue10559] NameError in tutorial/interpreter In-Reply-To: <1290923300.31.0.847319957553.issue10559@psf.upfronthosting.co.za> Message-ID: <1290923309.78.0.169692169657.issue10559@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:03:44 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 28 Nov 2010 06:03:44 +0000 Subject: [docs] [issue10559] NameError in tutorial/interpreter In-Reply-To: <1290923300.31.0.847319957553.issue10559@psf.upfronthosting.co.za> Message-ID: <1290924224.86.0.439777561799.issue10559@psf.upfronthosting.co.za> Ezio Melotti added the comment: What about "In order to use ``sys.argv`` you have to import the :mod:`sys` module doing ``import sys``.". "reference" sounds weird to me, and imho saying "import the module" is ok even if imports have not been introduced yet. If the user doesn't understand what "importing a module" means he can just execute the command as is. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:58:33 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 29 Nov 2010 08:58:33 +0000 Subject: [docs] [issue10559] NameError in tutorial/interpreter In-Reply-To: <1290923300.31.0.847319957553.issue10559@psf.upfronthosting.co.za> Message-ID: <20101129085731.GE2023@rubuntu> Senthil Kumaran added the comment: On Sun, Nov 28, 2010 at 05:48:20AM +0000, ?ric Araujo wrote: > I?m not committing directly because I?d like feedback: Is the > wording okay for the beginning of the tutorial? It seems fine and useful. Please go ahead. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 15:12:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Nov 2010 14:12:15 +0000 Subject: [docs] [issue10559] NameError in tutorial/interpreter In-Reply-To: <1290923300.31.0.847319957553.issue10559@psf.upfronthosting.co.za> Message-ID: <1291039935.23.0.140125873896.issue10559@psf.upfronthosting.co.za> ?ric Araujo added the comment: What about: ?You need to execute ``import sys`` before you can use ``sys.argv``.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:18:37 2010 From: report at bugs.python.org (INADA Naoki) Date: Mon, 29 Nov 2010 16:18:37 +0000 Subject: [docs] [issue10579] Is ``o[key]`` equivalent to PyMapping_HasKeyString? In-Reply-To: <1291047517.36.0.54391686166.issue10579@psf.upfronthosting.co.za> Message-ID: <1291047517.36.0.54391686166.issue10579@psf.upfronthosting.co.za> New submission from INADA Naoki : http://docs.python.org/c-api/mapping.html#PyMapping_HasKeyString and http://docs.python.org/c-api/mapping.html#PyMapping_HasKey says: > This is equivalent to ``o[key]`` I think it should be ``key in o``. ---------- assignee: docs at python components: Documentation messages: 122824 nosy: docs at python, naoki priority: normal severity: normal status: open title: Is ``o[key]`` equivalent to PyMapping_HasKeyString? versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:22:42 2010 From: report at bugs.python.org (INADA Naoki) Date: Mon, 29 Nov 2010 16:22:42 +0000 Subject: [docs] [issue10579] Is ``o[key]`` equivalent to PyMapping_HasKeyString? In-Reply-To: <1291047517.36.0.54391686166.issue10579@psf.upfronthosting.co.za> Message-ID: <1291047761.96.0.720817562202.issue10579@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry, I've misreaded. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From julien.baley at gmail.com Sat Nov 27 15:44:21 2010 From: julien.baley at gmail.com (Julien Baley) Date: Sat, 27 Nov 2010 14:44:21 +0000 Subject: [docs] zlib documentation Message-ID: Hello, in the page : http://docs.python.org/dev/py3k/library/zlib.html#module-zlib as well as http://docs.python.org/dev/py3k/tutorial/stdlib.html#data-compression We see that zlib.compress receives a string. This doesn't work, as you can see in the following example: >>> import zlib >>> s = 'witch which has which witches wrist watch' >>> t = zlib.compress(s) Traceback (most recent call last): File "", line 1, in TypeError: must be bytes or buffer, not str (directly copied from the doc). I don't know if this is a documentation error or a bug from the function however. Some people indicate that the string should be encoded first, and indeed, from the code above: >>> t = zlib.compress(s.encode("utf-8")) >>> len(t) 37 Cheers, Julien -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Nov 29 20:48:28 2010 From: report at bugs.python.org (flashk) Date: Mon, 29 Nov 2010 19:48:28 +0000 Subject: [docs] [issue10583] Encoding issue with chm help in 2.7.1 In-Reply-To: <1291060108.22.0.631034667944.issue10583@psf.upfronthosting.co.za> Message-ID: <1291060108.22.0.631034667944.issue10583@psf.upfronthosting.co.za> New submission from flashk : I just updated to Python 2.7.1 and noticed a small issue with the chm help file. The search results tab displays incorrect characters for various topic titles. It seems to be an encoding issue. For example, searching for 'json' yields the following results: - 18.2 json ??? JSON encoder and decoder - What???s New in Python 2.6 I noticed this issue on Windows XP 32-bit and Windows 7 64-bit. This issue does not exist with the 2.7 chm file. ---------- assignee: docs at python components: Documentation, Windows messages: 122857 nosy: docs at python, flashk priority: normal severity: normal status: open title: Encoding issue with chm help in 2.7.1 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 21:15:16 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 29 Nov 2010 20:15:16 +0000 Subject: [docs] [issue10583] Encoding issue with chm help in 2.7.1 In-Reply-To: <1291060108.22.0.631034667944.issue10583@psf.upfronthosting.co.za> Message-ID: <1291061716.45.0.846373730315.issue10583@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Mon Nov 29 21:38:03 2010 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Mon, 29 Nov 2010 21:38:03 +0100 Subject: [docs] (take 2) Python 3.1.2 xml.sax doc error, or bug, or error by the operator... In-Reply-To: <111272823F246042A70CE14768B23B1360EDE029EE@GVW0436EXB.americas.hpqcorp.net> References: <111272823F246042A70CE14768B23B1360ED52D860@GVW0436EXB.americas.hpqcorp.net> <4CEE49A0.4030802@netwok.org> <111272823F246042A70CE14768B23B1360EDE029EE@GVW0436EXB.americas.hpqcorp.net> Message-ID: <4CF40F2B.8010903@netwok.org> Le 29/11/2010 19:57, Ryan, Thomas a ?crit : > Thank you. > I will check that out. > The documentation, "string", and the implementation, bytes, may be out of synch. Yes, http://docs.python.org/dev/library/xml.sax is not clear on bytes vs. characters. Please open a documentation bug at bugs.python.org. Regards From report at bugs.python.org Tue Nov 30 00:08:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 29 Nov 2010 23:08:05 +0000 Subject: [docs] [issue10584] Bad links in doc of zipfile.open In-Reply-To: <1291072085.42.0.419401053582.issue10584@psf.upfronthosting.co.za> Message-ID: <1291072085.42.0.419401053582.issue10584@psf.upfronthosting.co.za> New submission from ?ric Araujo : There is this note in the doc of zipfile.open: ?The file-like object [ZipExtFile, internal class] is read-only and provides the following methods: read(), readline(), readlines(), __iter__(), __next__().? The :meth: construct gives interesting results here: link to zipfile.ZipFile.read (wrong), link to readline module (what?), no link, link to object.__iter__ (not bad), no link. ---------- assignee: docs at python components: Documentation messages: 122871 nosy: docs at python, eric.araujo priority: normal severity: normal status: open title: Bad links in doc of zipfile.open versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:46:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 30 Nov 2010 05:46:46 +0000 Subject: [docs] [issue10587] Document the meaning of str methods In-Reply-To: <1291096006.2.0.0136231958849.issue10587@psf.upfronthosting.co.za> Message-ID: <1291096006.2.0.0136231958849.issue10587@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : On Mon, Nov 29, 2010 at 4:13 PM, "Martin v. L?wis" wrote: >> - How specific should library reference manual be in defining methods >> affected by UCD such as str.upper()? > > It should specify what this actually does in Unicode terminology > (probably in addition to a layman's rephrase of that) > http://mail.python.org/pipermail/python-dev/2010-November/106155.html Some of the clarifications may actually lead to a conclusion that current behavior is wrong. For example, Unicode defines Alphabetic property as Lu + Ll + Lt + Lm + Lo + Nl + Other_Alphabetic http://www.unicode.org/reports/tr44/tr44-6.html#Alphabetic However, str.isalpha() is defined as just Lu + Ll + Lt + Lm + Lo. For example, >>> import unicodedata as ud >>> ud.category('?') 'Nl' >>> '?'.isalpha() False >>> ud.name('?') 'ROMAN NUMERAL FIVE' As far a I can tell, the source of Other_Alphabetic property data, http://unicode.org/Public/UNIDATA/PropList.txt, is not even included in the unicodedata module and neither is SpecialCasing.txt which is necessary for implementing a compliant case mapping algorithm. ---------- assignee: docs at python components: Documentation messages: 122885 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: Document the meaning of str methods versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:48:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 30 Nov 2010 05:48:11 +0000 Subject: [docs] [issue10587] Document the meaning of str methods In-Reply-To: <1291096006.2.0.0136231958849.issue10587@psf.upfronthosting.co.za> Message-ID: <1291096091.23.0.379934687935.issue10587@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +ezio.melotti, haypo, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:27:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 30 Nov 2010 07:27:07 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1291102027.83.0.292226796462.issue5088@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:56:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 30 Nov 2010 07:56:21 +0000 Subject: [docs] [issue10584] Bad links in doc of zipfile.open In-Reply-To: <1291072085.42.0.419401053582.issue10584@psf.upfronthosting.co.za> Message-ID: <1291103781.1.0.188881419946.issue10584@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in 86881. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From seemant at kulleen.org Tue Nov 30 15:32:34 2010 From: seemant at kulleen.org (Seemant Kulleen) Date: Tue, 30 Nov 2010 09:32:34 -0500 Subject: [docs] Documentation bug Message-ID: <201011300932.39937.seemant@kulleen.org> Hi, The page is: http://docs.python.org/library/pickle.html The diff I propose: --- pickle.txt.orig 2010-11-30 09:30:47.835228859 -0500 +++ pickle.txt 2010-11-30 09:31:22.993228853 -0500 @@ -53,7 +53,7 @@ objects. :mod:`marshal` exists primarily to support Python's :file:`.pyc` files. -The :mod:`pickle` module differs from :mod:`marshal` several significant ways: +The :mod:`pickle` module differs from :mod:`marshal` in several significant ways: * The :mod:`pickle` module keeps track of the objects it has already serialized, so that later references to the same object won't be serialized again. Thanks! Seemant -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From georg at python.org Tue Nov 30 16:07:54 2010 From: georg at python.org (Georg Brandl) Date: Tue, 30 Nov 2010 16:07:54 +0100 Subject: [docs] Documentation bug In-Reply-To: <201011300932.39937.seemant@kulleen.org> References: <201011300932.39937.seemant@kulleen.org> Message-ID: <4CF5134A.5070405@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 30.11.2010 15:32, schrieb Seemant Kulleen: > Hi, > > The page is: http://docs.python.org/library/pickle.html > > The diff I propose: > > --- pickle.txt.orig 2010-11-30 09:30:47.835228859 -0500 > +++ pickle.txt 2010-11-30 09:31:22.993228853 -0500 > @@ -53,7 +53,7 @@ > objects. :mod:`marshal` exists primarily to support Python's :file:`.pyc` > files. > > -The :mod:`pickle` module differs from :mod:`marshal` several significant > ways: > +The :mod:`pickle` module differs from :mod:`marshal` in several significant > ways: > > * The :mod:`pickle` module keeps track of the objects it has already > serialized, > so that later references to the same object won't be serialized again. Hi Seemant, thanks for the report, this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkz1E0oACgkQN9GcIYhpnLCjBACgm0HCf+yR0CJ0UGO1drt6RNdy mwwAniOpZ8qHpLl/qNOUjiy16gtiRv80 =9Izn -----END PGP SIGNATURE----- From report at bugs.python.org Tue Nov 30 19:53:57 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 30 Nov 2010 18:53:57 +0000 Subject: [docs] [issue10587] Document the meaning of str methods In-Reply-To: <1291096006.2.0.0136231958849.issue10587@psf.upfronthosting.co.za> Message-ID: <1291143237.56.0.478012941258.issue10587@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What is the issue that you are reporting? that the status quo should be documented, or that isalpha is wrong? These are independent - don't mix them. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 20:10:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 30 Nov 2010 19:10:51 +0000 Subject: [docs] [issue10587] Document the meaning of str methods In-Reply-To: <1291143237.56.0.478012941258.issue10587@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Nov 30, 2010 at 1:53 PM, Martin v. L?wis wrote: .. > What is the issue that you are reporting? that the status quo should be documented, or that isalpha is wrong? > These are independent - don't mix them. This is a documentation issue. I don't say that str.isalpha() is necessarily wrong. (If unicodedata had an isAlphabetic() menthod defined as Lu + Ll + Lt + Lm + Lo, I would file a bug report for that.) Here, I just want to mention that proper str.isalpha() definition is subject to debate and it being defined as Lu + Ll + Lt + Lm + Lo may need to be marked as CPython implementation detail. Note that the Unicode book (sorry, don't have the page reference) advises not to rely on catch-all APIs such as isAlphabetic(), but consult the underlying properties directly. I tend to agree with that because some programs may want to treat say Roman numerals as letters and some as numbers, so whether isAlphabetic() should include Nl category is better left to the application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:24:33 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 30 Nov 2010 22:24:33 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1291155873.12.0.99156475722.issue10589@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +docs at python, fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:26:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Nov 2010 22:26:19 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1291155979.76.0.451202385905.issue10589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What does "unsupported" mean? "Abstract" would look more exact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:28:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 30 Nov 2010 22:28:02 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1291156082.63.0.601748273025.issue10589@psf.upfronthosting.co.za> Georg Brandl added the comment: Not sure what "unsupported methods" means. E.g. "readinto" is listed as provided by RawIOBase in the doc text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:36:27 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 30 Nov 2010 22:36:27 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1291156586.97.0.696738327069.issue10589@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: > What does "unsupported" mean? "Abstract" would look more exact. It means they raise io.UnsupportedOperation when called (unless the subclass overrides them to do something else). They are not marked with @abstractmethod, so "Abstract" would be wrong. It should be a bit more clear in context. Here's a link to the point in the documentation where the table would fit: http://docs.python.org/dev/py3k/library/io.html#class-hierarchy The most relevant bit is: "implementations are allowed to raise UnsupportedOperation if they do not support a given operation." > E.g. "readinto" is listed as provided by RawIOBase in the doc text. The doc text describes the API. That is, it describes what the readinto method should do if a subclass of RawIOBase decides to implement it. The existing text doesn't contain any clues as to which methods contain useful implementations versus which will raise io.UnsupportedOperation if not overridden. Hence the need for the table. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:40:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Nov 2010 22:40:06 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291156586.97.0.696738327069.issue10589@psf.upfronthosting.co.za> Message-ID: <1291156801.8628.16.camel@localhost.localdomain> Antoine Pitrou added the comment: > > What does "unsupported" mean? "Abstract" would look more exact. > > It means they raise io.UnsupportedOperation when called (unless the > subclass overrides them to do something else). > > They are not marked with @abstractmethod, so "Abstract" would be > wrong. Except that "unsupported" is even more wrong, because it makes it look like that these methods are not supported by the respective ABCs. Actually, what happens is that the default implementations are stubs. If those methods weren't "supported" at all they wouldn't be defined in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:44:27 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 30 Nov 2010 22:44:27 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1291157067.6.0.0211042165825.issue10589@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Other suggestions for a better name for that column are certainly welcome. :-) "Stub Methods"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:45:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 30 Nov 2010 22:45:13 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291157067.6.0.0211042165825.issue10589@psf.upfronthosting.co.za> Message-ID: <1291157108.8628.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > Other suggestions for a better name for that column are certainly welcome. :-) > > "Stub Methods"? Fine with me. ---------- _______________________________________ Python tracker _______________________________________