From report at bugs.python.org Sun May 1 00:17:41 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 30 Apr 2011 22:17:41 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1304201861.95.0.367639661873.issue11964@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 07:56:24 2011 From: report at bugs.python.org (Takayuki SHIMIZUKAWA) Date: Sun, 01 May 2011 05:56:24 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> New submission from Takayuki SHIMIZUKAWA : WSGI sapmle code at wsgiref document (http://docs.python.org/py3k/library/wsgiref.html#wsgiref.util.setup_testing_defaults) was broken. - status = b'200 OK' - headers = [(b'Content-type', b'text/plain; charset=utf-8')] + status = '200 OK' + headers = [('Content-type', 'text/plain; charset=utf-8')] ---------- assignee: docs at python components: Documentation messages: 134900 nosy: docs at python, shimizukawa priority: normal severity: normal status: open title: wsgiref's wsgi application sample code does not work versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 15:51:36 2011 From: report at bugs.python.org (Lars Michelsen) Date: Sun, 01 May 2011 13:51:36 +0000 Subject: [docs] [issue11971] Wrong parameter -O0 instead of -OO in manpage In-Reply-To: <1304257896.02.0.842593796082.issue11971@psf.upfronthosting.co.za> Message-ID: <1304257896.02.0.842593796082.issue11971@psf.upfronthosting.co.za> New submission from Lars Michelsen : Hello Devs, digging around in the python manpage and playing with the parameters I found a wrong parameter specification in the python manpage. The -OO parameter for discarding docstrings is written as -O0 (the 2nd is a zero). A patch is attached. Regards ---------- assignee: docs at python components: Documentation files: fix-OO-param.patch keywords: patch messages: 134909 nosy: docs at python, lm priority: normal severity: normal status: open title: Wrong parameter -O0 instead of -OO in manpage versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file21846/fix-OO-param.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 17:15:26 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 May 2011 15:15:26 +0000 Subject: [docs] [issue11971] Wrong parameter -O0 instead of -OO in manpage In-Reply-To: <1304257896.02.0.842593796082.issue11971@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset d70b0137902b by R David Murray in branch '2.7': #11971: fix man page; it's -OO not -O0 http://hg.python.org/cpython/rev/d70b0137902b New changeset c57fdce01eb8 by R David Murray in branch '3.1': #11971: fix man page; it's -OO not -O0 http://hg.python.org/cpython/rev/c57fdce01eb8 New changeset bbc6129f7861 by R David Murray in branch '3.2': Merge #11971: fix man page; it's -OO not -O0 http://hg.python.org/cpython/rev/bbc6129f7861 New changeset e2f71bc9b0db by R David Murray in branch 'default': Merge #11971: fix man page; it's -OO not -O0 http://hg.python.org/cpython/rev/e2f71bc9b0db ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 17:16:25 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 01 May 2011 15:16:25 +0000 Subject: [docs] [issue11971] Wrong parameter -O0 instead of -OO in manpage In-Reply-To: <1304257896.02.0.842593796082.issue11971@psf.upfronthosting.co.za> Message-ID: <1304262985.36.0.220992346581.issue11971@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for catching that, and for the patch. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 22:21:02 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 01 May 2011 20:21:02 +0000 Subject: [docs] [issue11975] Fix intersphinx-ing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> New submission from Jonas H. : Intersphinx-ing of int, list, float, ... should work with ":class:`int`" (list, float, ...). Also, intersphinx-ing list methods, e.g. ":meth:`list.insert`", should work. ---------- assignee: docs at python components: Documentation messages: 134923 nosy: docs at python, jonash priority: normal severity: normal status: open title: Fix intersphinx-ing of built-in types (list, int, ...) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 22:21:37 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 01 May 2011 20:21:37 +0000 Subject: [docs] [issue11976] Provide proper documentation for list data type In-Reply-To: <1304281297.09.0.311318691729.issue11976@psf.upfronthosting.co.za> Message-ID: <1304281297.09.0.311318691729.issue11976@psf.upfronthosting.co.za> New submission from Jonas H. : Provide a proper `list` method reference (like the one for `dict`, http://docs.python.org/library/stdtypes.html#dict). Right now, documentation about lists is spread over multiple topics (.rst files) and methods are documented in footnotes. Also, intersphinx-ing and list methods is not possible -- :meth:`list.foo` does not create any links due to missing documentation. This is also related to #11975. ---------- assignee: docs at python components: Documentation messages: 134924 nosy: docs at python, jonash priority: normal severity: normal status: open title: Provide proper documentation for list data type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 22:25:27 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 01 May 2011 20:25:27 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> New submission from Jonas H. : Various `int` attributes and methods seem undocumented (at least it does not work to intersphinx them): * .conjugate * .denominator * .imag * .numerator * .real ---------- assignee: docs at python components: Documentation messages: 134926 nosy: docs at python, jonash priority: normal severity: normal status: open title: Document int.conjugate, .denominator, ... versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 22:31:48 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 May 2011 20:31:48 +0000 Subject: [docs] [issue11976] Provide proper documentation for list data type In-Reply-To: <1304281297.09.0.311318691729.issue11976@psf.upfronthosting.co.za> Message-ID: <1304281907.94.0.0875615637701.issue11976@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd go as far and say it is a duplicate. :) ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Fix intersphinx-ing of built-in types (list, int, ...) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 22:40:41 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 01 May 2011 20:40:41 +0000 Subject: [docs] [issue11974] Class definition gotcha.. should this be documented somewhere? In-Reply-To: <1304274889.3.0.162053692496.issue11974@psf.upfronthosting.co.za> Message-ID: <1304282441.06.0.959284705407.issue11974@psf.upfronthosting.co.za> Georg Brandl added the comment: Reclassifying as documentation issue. I was certain we had something about this in the tutorial, but couldn't find it with a quick look. It is in the FAQ ("how do I create static class data"), but that's not an obvious place to look. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 00:37:46 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 May 2011 22:37:46 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset dc65d1b99dff by Benjamin Peterson in branch '3.1': note abcs of int and float (closes #11977) http://hg.python.org/cpython/rev/dc65d1b99dff New changeset 5b315145e525 by Benjamin Peterson in branch '2.7': note abcs of int and float (closes #11977) http://hg.python.org/cpython/rev/5b315145e525 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 07:26:39 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 May 2011 05:26:39 +0000 Subject: [docs] [issue11974] Class definition gotcha.. should this be documented somewhere? In-Reply-To: <1304274889.3.0.162053692496.issue11974@psf.upfronthosting.co.za> Message-ID: <1304313999.88.0.485176262453.issue11974@psf.upfronthosting.co.za> Ezio Melotti added the comment: A good place where to add it would be http://docs.python.org/tutorial/classes.html. It might even get a small "Differences between class and instance attribute" section. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From mfoord at python.org Sun May 1 00:01:58 2011 From: mfoord at python.org (Michael Foord) Date: Sat, 30 Apr 2011 23:01:58 +0100 Subject: [docs] Fwd: [ Double entry of key function ] Message-ID: <4DBC86D6.7020105@python.org> -------- Original Message -------- Subject: [ Double entry of key function ] Date: Sat, 30 Apr 2011 23:45:37 +0530 From: Anurag Maurya To: webmaster at python.org Hi, I was just going through Glossary ( http://docs.python.org/glossary.html#glossary). I got that there is two entries for key function. Please take corrective measure. Thanks, Anurag -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Double entry of key function.jpg Type: image/jpeg Size: 282718 bytes Desc: not available URL: From report at bugs.python.org Mon May 2 09:06:09 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 May 2011 07:06:09 +0000 Subject: [docs] [issue11975] Fix intersphinx-ing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304319969.5.0.108629077655.issue11975@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #4966 and #11976. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 09:06:50 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 May 2011 07:06:50 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1304320010.54.0.0255392294633.issue4966@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #11975 and #11976. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 12:56:20 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 02 May 2011 10:56:20 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304333780.29.0.605823458328.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: I changed the title: intersphinx is a Sphinx extension used to links to foreign documentation, not create links inside one doc (as I understand the request is). ---------- nosy: +eric.araujo stage: -> needs patch title: Fix intersphinx-ing of built-in types (list, int, ...) -> Fix referencing of built-in types (list, int, ...) versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 13:27:52 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 02 May 2011 11:27:52 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304335672.11.0.434241878444.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: Actually I need to be able to intersphinx (because my documentation work is not the Python docs :-) but I guess it boils down to the same problem of incomplete Sphinx module/class indices. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 15:50:53 2011 From: report at bugs.python.org (Xavier Morel) Date: Mon, 02 May 2011 13:50:53 +0000 Subject: [docs] [issue11979] Minor improvements to the Sockets readme: typos, wording and sphinx features usage In-Reply-To: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> Message-ID: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> New submission from Xavier Morel : First patch fixes a typo ("the reads a reply" -> "then reads a reply") and ? I believe ? improves the wording of a pair of sentences. Second patch makes use of Sphinx's ``:abbr:`` role, and removes some period which I think are redundant with the use of ``::`` ---------- assignee: docs at python components: Documentation files: wording messages: 134970 nosy: docs at python, xmorel priority: normal severity: normal status: open title: Minor improvements to the Sockets readme: typos, wording and sphinx features usage versions: Python 3.3 Added file: http://bugs.python.org/file21853/wording _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 15:51:11 2011 From: report at bugs.python.org (Xavier Morel) Date: Mon, 02 May 2011 13:51:11 +0000 Subject: [docs] [issue11979] Minor improvements to the Sockets readme: typos, wording and sphinx features usage In-Reply-To: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> Message-ID: <1304344271.43.0.307476224221.issue11979@psf.upfronthosting.co.za> Changes by Xavier Morel : Added file: http://bugs.python.org/file21854/sphinx-features _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 17:07:10 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 May 2011 15:07:10 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304348830.57.0.516647494104.issue11975@psf.upfronthosting.co.za> Benjamin Peterson added the comment: FWIW, :func:`int/float` work IIRC. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 17:35:23 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 02 May 2011 15:35:23 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304350522.69.0.216617511154.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: Indeed they do; but documentation writers need to know that `int()` and `float()` are functions, which is counterintuitive. (and a CPython implementation detail) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 17:36:59 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 02 May 2011 15:36:59 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304350522.69.0.216617511154.issue11975@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2011/5/2 Jonas H. : > > Jonas H. added the comment: > > Indeed they do; but documentation writers need to know that `int()` and `float()` are functions, which is counterintuitive. (and a CPython implementation detail) They're not even functions, just documented as such. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 19:14:01 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 02 May 2011 17:14:01 +0000 Subject: [docs] [issue11834] wrong module installation dir on Windows In-Reply-To: <1302605256.31.0.234550103785.issue11834@psf.upfronthosting.co.za> Message-ID: <1304356441.68.0.78432260841.issue11834@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: docs at python -> nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 08:45:53 2011 From: report at bugs.python.org (Davi Post) Date: Tue, 03 May 2011 06:45:53 +0000 Subject: [docs] [issue11984] Wrong "See also" in symbol and token module docs In-Reply-To: <1304405152.56.0.259676009595.issue11984@psf.upfronthosting.co.za> Message-ID: <1304405152.56.0.259676009595.issue11984@psf.upfronthosting.co.za> New submission from Davi Post : The "See also" reference in the documentation for the token and symbol modules is no longer accurate. The "second example" mentioned was apparently removed in Python 2.7. This leaves no explanation for how to use the symbol module. I don't think this "See also" belongs in the token module at all. (It's in Python 2.5 and 2.6 as well.) http://docs.python.org/release/2.7.1/library/symbol.html See also: Module parser The second example for the parser module shows how to use the symbol module. ---------- assignee: docs at python components: Documentation messages: 135017 nosy: davipo, docs at python priority: normal severity: normal status: open title: Wrong "See also" in symbol and token module docs versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 19:04:30 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 03 May 2011 17:04:30 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> New submission from ?ric Araujo : The docstring and reST doc of platform.python_implementation mention possible return values of CPython, IronPython and Jython, but if I understand the code correctly, PyPy is supported too. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 135050 nosy: docs at python, eric.araujo, lemburg priority: normal severity: normal status: open title: Document that platform.python_implementation supports PyPy versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 19:27:35 2011 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 03 May 2011 17:27:35 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: <1304443655.21.0.526488908957.issue11985@psf.upfronthosting.co.za> Alex Gaynor added the comment: It returns "PyPy" on pypy. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 19:44:41 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2011 17:44:41 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f6c85df15874 by Ezio Melotti in branch '2.7': #11985: document the return value of platform.python_implementation for PyPy. http://hg.python.org/cpython/rev/f6c85df15874 New changeset 4d946d4166fc by Ezio Melotti in branch '3.1': #11985: document the return value of platform.python_implementation for PyPy. http://hg.python.org/cpython/rev/4d946d4166fc New changeset 5e661f5c301a by Ezio Melotti in branch '3.2': #11985: merge with 3.1. http://hg.python.org/cpython/rev/5e661f5c301a New changeset 847a38d787be by Ezio Melotti in branch 'default': #11985: merge with 3.2. http://hg.python.org/cpython/rev/847a38d787be ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 19:45:55 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 May 2011 17:45:55 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: <1304444755.74.0.442562555718.issue11985@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the info! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 22:47:11 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 May 2011 20:47:11 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> New submission from R. David Murray : The following code: -------------------------------- class X(list): def __contains__(self, key): print('X contains:', key) class Y(): def __init__(self, x): self.x = x def __getattr__(self, key): return getattr(self.x, key) def __iter__(self): print('Y iter') return iter([1,2]) x = X() y = Y(x) print('res:', 1 in y) ----------------------------- prints True. It has been explained to me that this is because of: http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes However, there is no way in the world that I would guess the behavior above from the documentation provided (and I find it surprising...I expected x's __contains__ to get called because Y (a class, not an instance) doesn't have a __contains__ method). Can anyone explain it more clearly and update the documentation? ---------- assignee: docs at python components: Documentation messages: 135068 nosy: docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: special method lookup docs don't address some important details type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 22:49:04 2011 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 03 May 2011 20:49:04 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304455744.08.0.753533134598.issue11988@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 22:56:10 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 May 2011 20:56:10 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304456170.53.0.543848337523.issue11988@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 23:18:14 2011 From: report at bugs.python.org (Eric Snow) Date: Tue, 03 May 2011 21:18:14 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304457494.25.0.312885147039.issue11988@psf.upfronthosting.co.za> Eric Snow added the comment: In 2.7 I get the following (if Y does not inherit from object): >>> print('res:', 1 in y) ('X contains:', 1) ('res:', False) This makes sense with old style classes. With Y(object): >>> print('res:', 1 in y) Y iter ('res:', True) ---------- nosy: +ericsnow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 23:19:21 2011 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2011 21:19:21 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304457560.98.0.476720376062.issue11988@psf.upfronthosting.co.za> Georg Brandl added the comment: Not sure I understand your issue here. How should "1 in y" get at X.__contains__ given the special method lookup rules? The __getattr__ is not called since y.__contains__ isn't looked up. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 23:43:41 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 May 2011 21:43:41 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304459021.78.0.854822828688.issue11988@psf.upfronthosting.co.za> R. David Murray added the comment: Well, then I suppose my question is why isn't __contains__ looked up? Other special methods that don't exist on Y do cause __getattr__ to be called. Why is __contains__ special? The docs for __getattr__ don't hint at this possibility either. I think the people that understand this must have a mental model of how the interpreter looks up methods that has some pieces that are missing from mine. I guess I'd like those bits to be made explicit in the special method lookup docs, or if they are already documented somewhere, for there to be a pointer to them in the special method lookup docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 00:01:56 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 May 2011 22:01:56 +0000 Subject: [docs] [issue11988] special method lookup docs don't address some important details In-Reply-To: <1304455631.01.0.264040156642.issue11988@psf.upfronthosting.co.za> Message-ID: <1304460116.34.0.354800871369.issue11988@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, that's what my problem is. My test example was poorly conceived (I used __del__!) so I *thought* the other special methods were triggering getattr. I'd have figured it out if I hadn't screwed up my test :( ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 05:02:21 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 May 2011 03:02:21 +0000 Subject: [docs] [issue11834] wrong module installation dir on Windows In-Reply-To: <1302605256.31.0.234550103785.issue11834@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 175dcc8c4b23 by Brian Curtin in branch '3.1': Fix #11834. Correct site-packages paths. http://hg.python.org/cpython/rev/175dcc8c4b23 New changeset 03d511dec224 by Brian Curtin in branch '3.2': Fix #11834. Correct site-packages paths. http://hg.python.org/cpython/rev/03d511dec224 New changeset 066e63425228 by Brian Curtin in branch 'default': Fix #11834. Correct site-packages paths. http://hg.python.org/cpython/rev/066e63425228 New changeset 1a2f0f545f55 by Brian Curtin in branch '2.7': Fix #11834. Correct site-packages paths. http://hg.python.org/cpython/rev/1a2f0f545f55 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 05:03:57 2011 From: report at bugs.python.org (Brian Curtin) Date: Wed, 04 May 2011 03:03:57 +0000 Subject: [docs] [issue11834] wrong module installation dir on Windows In-Reply-To: <1302605256.31.0.234550103785.issue11834@psf.upfronthosting.co.za> Message-ID: <1304478237.54.0.679694888032.issue11834@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for the patches and reviews! ---------- assignee: -> brian.curtin resolution: -> fixed stage: needs patch -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 11:53:57 2011 From: report at bugs.python.org (Steffen Daode Nurpmeso) Date: Wed, 04 May 2011 09:53:57 +0000 Subject: [docs] [issue11997] One typo in Doc/c-api/init.rst In-Reply-To: <1304502837.0.0.265474702081.issue11997@psf.upfronthosting.co.za> Message-ID: <1304502837.0.0.265474702081.issue11997@psf.upfronthosting.co.za> New submission from Steffen Daode Nurpmeso : Yes, i really found a typo. I'll send two patches, one with the typo fixed, and one with the typo fixed and one for which i've :setlocal tw=80:{gq} ---------- assignee: docs at python components: Documentation messages: 135107 nosy: docs at python, sdaoden priority: normal severity: normal status: open title: One typo in Doc/c-api/init.rst versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 11:59:44 2011 From: report at bugs.python.org (Steffen Daode Nurpmeso) Date: Wed, 04 May 2011 09:59:44 +0000 Subject: [docs] [issue11997] One typo in Doc/c-api/init.rst In-Reply-To: <1304502837.0.0.265474702081.issue11997@psf.upfronthosting.co.za> Message-ID: <20110504095935.GA40536@sherwood.local> Steffen Daode Nurpmeso added the comment: 11997.1.diff only corrects the typo, 11997.2.diff does also reformat. (Note that all of init.rst is hard to read on a 80 column terminal.) ---------- keywords: +patch Added file: http://bugs.python.org/file21880/11997.1.diff Added file: http://bugs.python.org/file21881/11997.2.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -883,7 +883,7 @@ modules. Also note that combining this functionality with :c:func:`PyGILState_\*` APIs -is delicate, become these APIs assume a bijection between Python thread states +is delicate, because these APIs assume a bijection between Python thread states and OS-level threads, an assumption broken by the presence of sub-interpreters. It is highly recommended that you don't switch sub-interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. -------------- next part -------------- diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -882,14 +882,14 @@ by such objects may affect the wrong (sub-)interpreter's dictionary of loaded modules. -Also note that combining this functionality with :c:func:`PyGILState_\*` APIs -is delicate, become these APIs assume a bijection between Python thread states -and OS-level threads, an assumption broken by the presence of sub-interpreters. -It is highly recommended that you don't switch sub-interpreters between a pair -of matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. -Furthermore, extensions (such as :mod:`ctypes`) using these APIs to allow calling -of Python code from non-Python created threads will probably be broken when using -sub-interpreters. +Also note that combining this functionality with :c:func:`PyGILState_\*` APIs is +delicate, because these APIs assume a bijection between Python thread states and +OS-level threads, an assumption broken by the presence of sub-interpreters. It +is highly recommended that you don't switch sub-interpreters between a pair of +matching :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` calls. +Furthermore, extensions (such as :mod:`ctypes`) using these APIs to allow +calling of Python code from non-Python created threads will probably be broken +when using sub-interpreters. Asynchronous Notifications From report at bugs.python.org Wed May 4 13:12:56 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 04 May 2011 11:12:56 +0000 Subject: [docs] [issue11834] wrong module installation dir on Windows In-Reply-To: <1302605256.31.0.234550103785.issue11834@psf.upfronthosting.co.za> Message-ID: <1304507576.36.0.068778595296.issue11834@psf.upfronthosting.co.za> anatoly techtonik added the comment: It's always a pleasure. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 14:42:31 2011 From: report at bugs.python.org (Brian Curtin) Date: Wed, 04 May 2011 12:42:31 +0000 Subject: [docs] [issue11834] wrong module installation dir on Windows In-Reply-To: <1302605256.31.0.234550103785.issue11834@psf.upfronthosting.co.za> Message-ID: <1304512951.74.0.369547482051.issue11834@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 17:32:56 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 04 May 2011 15:32:56 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: <1304523176.58.0.9820821694.issue11985@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you update the docstring as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 17:40:16 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 May 2011 15:40:16 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset affec521b330 by Ezio Melotti in branch '2.7': #11985: update docstring of platform.python_implementation. http://hg.python.org/cpython/rev/affec521b330 New changeset 7bf9d7ae6c94 by Ezio Melotti in branch '3.1': #11985: update docstring of platform.python_implementation. http://hg.python.org/cpython/rev/7bf9d7ae6c94 New changeset cc7342b4e59d by Ezio Melotti in branch '3.2': #11985: merge with 3.1. http://hg.python.org/cpython/rev/cc7342b4e59d New changeset 6b95bf39842f by Ezio Melotti in branch 'default': #11985: merge with 3.2. http://hg.python.org/cpython/rev/6b95bf39842f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 17:42:24 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 04 May 2011 15:42:24 +0000 Subject: [docs] [issue11985] Document that platform.python_implementation supports PyPy In-Reply-To: <1304442270.73.0.886848659063.issue11985@psf.upfronthosting.co.za> Message-ID: <1304523744.46.0.451390676344.issue11985@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 21:09:53 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 04 May 2011 19:09:53 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304536193.64.0.289818658697.issue11015@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 00:08:45 2011 From: report at bugs.python.org (alejandro david weil) Date: Wed, 04 May 2011 22:08:45 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> New submission from alejandro david weil : Python's documentation includes 2 source codes for alternate xrange implementations, which, at least in my tests, give unexpected results. # from file:///usr/share/doc/python2.6-doc/html/library/functions.html#xrange takewhile(lambda x:x _______________________________________ From report at bugs.python.org Thu May 5 00:14:50 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 04 May 2011 22:14:50 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304547290.43.0.365592869244.issue11015@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi all, IIUIC we are left with issue11015.py3k.testdoc.1.patch) since issue11015.py3k.remove_fcmp.{1,2}.patch has been already applied on default. I just gave a look to the doc patch and it seems fine (it also applies without any warning on default). Eli, do you want to expand this patch further (and how :) or do you think it's still the version you want to commit? Can a core devel, then, give this patch a deeper look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 01:14:01 2011 From: report at bugs.python.org (Bryce Verdier) Date: Wed, 04 May 2011 23:14:01 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1304550841.44.0.609673011693.issue8158@psf.upfronthosting.co.za> Bryce Verdier added the comment: Applied patch cleanly. Also the description reads clearly and makes sense. ---------- nosy: +louiscipher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 01:57:33 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 04 May 2011 23:57:33 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304553453.71.0.570303940199.issue11015@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is an improvement that I think should be committed before 3.2.1. Some comments: +.. function:: run_doctest(module, verbosity=None) + Run :mod:`doctest` on the given *module*. should be, I believe, + Run :func:`doctest.testmod` on the given *module*. as that is what the function actually does (I check the code). + If *verbosity* is :const:`None`, :meth:`doctest` is run with verbosity set + to :data:`verbose`. Otherwise, it is run with verbosity set to + :const:`None`. Should :meth:`doctest` be :func:`testmod` ? Otherwise the proposed text rewrites " If optional argument verbosity is not specified (or is None), pass support's belief about verbosity on to doctest. Else doctest's usual behavior is used (it searches sys.argv for -v)." The problem with the rewrite is that the keyword param of testmod is 'verbose', not 'verbosity'. 'Verbosity' is a dummy name used to either pass support.verbose to verbose, or not. So testmod is, in net effect, run with verbose=verbose or verbose=None. My attempt to explain a bad design (with probable markup errors): "If *verbosity* is :const:`None`, :func:`testmod` is run with verbose set to :data:`support.verbose`, which is set by :func:`regrtest`. Otherwise, it is run with verbose set to :const:`None` and subsequently replaced by :code:`'-v' in sys.argv`." +.. function:: temp_umask(umask) + + A context manager that temporarily sets the process umask to the + given value. "sets the process umask to *umask*." ? +.. function:: find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM) + Either this method or :func:`bind_port` should be used for any tests + where a server socket needs to be bound to a particular port for the + duration of the test. + Which one to use depends on whether the calling code is creating a python + socket, or if an unused port needs to be provided in a constructor + or passed to an external program (i.e. the ``-accept`` argument to + openssl's s_server mode). This is copied from the doc string but does really tell me which to use in which of the two situations. Other additions look OK to me. Some copied docstrings (or comments). Some are new. Support.py could also use a patch to add missing docstings (and turn a couple of comments into docstrings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 03:09:25 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 May 2011 01:09:25 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c13d2552eb51 by R David Murray in branch '2.7': #8158: add missing 'description' description to optparse docstring. http://hg.python.org/cpython/rev/c13d2552eb51 New changeset f559b88bcaa0 by R David Murray in branch '3.1': #8158: add missing 'description' description to optparse docstring. http://hg.python.org/cpython/rev/f559b88bcaa0 New changeset b4b0a1458638 by R David Murray in branch '3.2': Merge #8158: add missing 'description' description to optparse docstring. http://hg.python.org/cpython/rev/b4b0a1458638 New changeset 2a403afc4a76 by R David Murray in branch 'default': Merge #8158: add missing 'description' description to optparse docstring. http://hg.python.org/cpython/rev/2a403afc4a76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 03:10:23 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 May 2011 01:10:23 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1304557823.89.0.631121825959.issue8158@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks everyone. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 05:19:39 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 05 May 2011 03:19:39 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1304547290.43.0.365592869244.issue11015@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: > Eli, do you want to expand this patch further (and how :) or do you think > it's still the version you want to commit? Can a core devel, then, give this > patch a deeper look? > I will review this again in a couple of days and will commit. ---------- Added file: http://bugs.python.org/file21890/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

Eli, do you want to expand this patch further (and how :) or do you think it's still the version you want to commit? Can a core devel, then, give this patch a deeper look?

I will review this again in a couple of days and will commit.

From report at bugs.python.org Thu May 5 06:10:32 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 May 2011 04:10:32 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304568632.8.0.695964874906.issue11015@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file21890/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 12:17:54 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 05 May 2011 10:17:54 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304590674.23.0.198180171749.issue11015@psf.upfronthosting.co.za> Ezio Melotti added the comment: I left a few comments on rietveld for the testdoc and remove_fcmp patches. Unless I'm missing something, assertEqual works just fine in all the places where fcmp was used, so there's no need to use assertAlmostEqual. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 12:25:28 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 05 May 2011 10:25:28 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1304591128.95.0.372115073344.issue12003@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 13:22:10 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 May 2011 11:22:10 +0000 Subject: [docs] [issue11997] One typo in Doc/c-api/init.rst In-Reply-To: <1304502837.0.0.265474702081.issue11997@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 76a2354aa427 by Ezio Melotti in branch '2.7': #11997: fix typo in init.rst. http://hg.python.org/cpython/rev/76a2354aa427 New changeset 3aa51217492c by Ezio Melotti in branch '3.1': #11997: fix typo in init.rst. http://hg.python.org/cpython/rev/3aa51217492c New changeset 5a2d42a8c1ab by Ezio Melotti in branch '3.2': #11997: merge with 3.1. http://hg.python.org/cpython/rev/5a2d42a8c1ab New changeset 7c9717836c28 by Ezio Melotti in branch 'default': #11997: merge with 3.2. http://hg.python.org/cpython/rev/7c9717836c28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 13:23:05 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 05 May 2011 11:23:05 +0000 Subject: [docs] [issue11997] One typo in Doc/c-api/init.rst In-Reply-To: <1304502837.0.0.265474702081.issue11997@psf.upfronthosting.co.za> Message-ID: <1304594585.09.0.0189153819506.issue11997@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch. ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 13:37:40 2011 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 05 May 2011 11:37:40 +0000 Subject: [docs] [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1304595460.03.0.937284964697.issue12005@psf.upfronthosting.co.za> Mark Dickinson added the comment: I believe that this was a deliberate design decision, though now that I look it seems it's not well documented. That should probably be fixed, so I see this as a documentation issue. More details: The specification on which the decimal module is based requires that there be a 'remainder' operation with the semantics of Decimal's '%' operation (i.e., the result of x % y has the sign of x). However, the specification doesn't say anything about how the prescribed operations should map to language constructs. So the choice was between (1) leaving '%' for Decimal objects unimplemented, and providing a separate 'remainder' method, or (2) mapping '%' to Decimal's remainder operation, and accepting the slight mismatch between the '%' semantics for float and Decimal. Perhaps the wrong choice was made. But it's there now, and to me it's not so obviously wrong that it's worth the upheaval of deprecating '%' for Decimal objects. Of course there's a third choice, which is to implement the float % semantics for the Decimal type; however, this is outside the scope of the specification---none of the specified operations matches this behaviour, and I'd oppose the addition of such an operation to the Decimal module. There's a strong sense in which Decimal's % is a more natural operation for floating-point types than float's %. (For one thing, it's exact in many circumstances, while float's % suffers from surprising results with negative operands.) Reclassifying as a documentation issue. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 13:42:54 2011 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 05 May 2011 11:42:54 +0000 Subject: [docs] [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1304595774.27.0.563457000415.issue12005@psf.upfronthosting.co.za> Mark Dickinson added the comment: The doc change should also note that // and divmod suffer from a similar mismatch: >>> Decimal(-2) // Decimal(3) Decimal('-0') >>> -2 // 3 -1 >>> -2.0 // 3 -1.0 However, the invariant that x = x // y * y + x % y is retained, as it should be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 14:20:50 2011 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 May 2011 12:20:50 +0000 Subject: [docs] [issue11690] Devguide: Add "communication" FAQ In-Reply-To: <1301188192.33.0.9529618781.issue11690@psf.upfronthosting.co.za> Message-ID: <1304598050.18.0.0745032734567.issue11690@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: docs at python -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 15:53:01 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 May 2011 13:53:01 +0000 Subject: [docs] [issue12005] modulo result of Decimal differs from float/int In-Reply-To: <1304584519.64.0.99823949629.issue12005@psf.upfronthosting.co.za> Message-ID: <1304603581.06.0.00778231996078.issue12005@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 22:00:11 2011 From: report at bugs.python.org (Bryce Verdier) Date: Thu, 05 May 2011 20:00:11 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1304625611.67.0.0399143769929.issue11163@psf.upfronthosting.co.za> Bryce Verdier added the comment: Here is the patch to fix the documentation. Asked some core developers off the bug tracker how to handle this bug in relation to the bigger issue regarding "STOP" leading to an infinite loop. ---------- keywords: +patch nosy: +louiscipher Added file: http://bugs.python.org/file21898/issue11163.py33.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 22:37:11 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 May 2011 20:37:11 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1304627831.93.0.475762062243.issue11163@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think this is the wrong patch for reasons given below. The example should be replaced instead. Readline is documented as returning '' at EOF for text files. Iter(func,sentinel) is documented as calling func until sentinel is returned. If that never happens, it never stops. That makes it dangerous unless one KNOWS for sure that the sentinel WILL be returned or is willing to continue indefinitely. I think a sentence should be added to the doc to warn about this. So I consider the premise of the example, "One useful application of the second form of iter() is to read lines of a file until a certain line is reached.", to be somewhat dubious. The example could be considered instead to be an example of when NOT to use the second form. This application should better be written to avoid a possible infinite loop as with open(name) as fp: for line in fp: if line == sentinel: break process(line) I think a better example would be (3.2 version, use raw_input for 2.7): def my_input(): return input("Enter data or return to stop: ") for data in iter(my_input, ''): process(data) Your alternative also works, but the above is something one might actually do. Even that is hardly much better than: while True: data = input("Enter data or return to stop} if not data: break process data ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 22:37:24 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 May 2011 20:37:24 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1304627844.14.0.0287623819488.issue11163@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 22:58:58 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 May 2011 20:58:58 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1304629138.76.0.345196131903.issue11163@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 23:00:41 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 May 2011 21:00:41 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1304629241.17.0.756892304615.issue11163@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll replace this with a better example using binary chunked reads that terminate with an empty string. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 08:28:31 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 06 May 2011 06:28:31 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1304663311.37.0.309903332154.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Terry, I've incorporated your suggestions except the new formulation for verbosity to doctest.testmod, since it's not really clear which one is more accurate. I think it's intelligible as it is now (especially given that test.support is for use of Python contributors, and not random users). If you have strong preferences about it, feel free to commit another formulation. Ezio, I answered your comments in the code review tool. Regarding the use of assertEqual for the floating point results, I just didn't want to rely on the exact representation of these values. I'm not 100% sure Python ensures this is true on all platforms it supports. Recall that I was just replacing the fcmp code which did basically the same, also not comparing exactly. ---- I will commit a fixed patch to default. I see no reason to backport this since test.support is just a tool for core-devs and contributors and is mainly used for future developments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 08:30:36 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 May 2011 06:30:36 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 2fd435ac3551 by Eli Bendersky in branch 'default': Issue #11015: bring test.support docs up to date http://hg.python.org/cpython/rev/2fd435ac3551 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:04:46 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:04:46 +0000 Subject: [docs] [issue11762] Ast doc: warning and version number In-Reply-To: <1301933761.05.0.937546235723.issue11762@psf.upfronthosting.co.za> Message-ID: <1304697886.48.0.140150809721.issue11762@psf.upfronthosting.co.za> ?ric Araujo added the comment: The Python Insider blog has a nice phrasing: ?The AST module exposes a constant, ``ast.__version__``, which provides a means for user code to vary its behaviour depending on the version of the AST it encounters.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:35:05 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:35:05 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304699705.83.0.113184161284.issue11977@psf.upfronthosting.co.za> ?ric Araujo added the comment: Benjamin: In 2.7, long implements those ABCs too. I have added it to the doc in a local commit, I?ll push when I can. Jonas: Does the commit fix your use case? The attributes are now documented in the sense that a human can find them, but can Sphinx? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:36:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:36:19 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304699779.11.0.190535316935.issue11977@psf.upfronthosting.co.za> ?ric Araujo added the comment: BTW: If not, you can always use things like :attr:`int.real ` (real target in angle brackets, rest is text to display) but it?s a bit unwieldy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:39:07 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:39:07 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304699947.57.0.683232879729.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Intersphinx-ing of int, list, float, ... should work with > ":class:`int`" (list, float, ...). Is this a problem in our markup or a bug in intersphinx? IIRC, you can use func, class, mod, method or what you want, all these roles look up objects in the same way. > Also, intersphinx-ing list methods, e.g. ":meth:`list.insert`", > should work. If this work within one documentation set (as I believe it does) but not with intersphinx, it?s an intersphinx bug which should be reported to the Sphinx bug tracker on bitbucket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:51:08 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:51:08 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1304700668.39.0.947649784762.issue11964@psf.upfronthosting.co.za> ?ric Araujo added the comment: I will fix this. Prashanth Raghu: (sorry to call you by your full name, which is not very nice in my language, but I?m not sure which is your first name) ?The .rst file that was downloaded as of 30-04-2011 (dd-mm-yyyy) had the updated doc?: Yes, I saw that, but I reported a lack of versionchanged information (see example near the top of http://docs.python.org/dev/library/site). ---------- assignee: docs at python -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:53:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 16:53:25 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1304700804.99.0.392688694396.issue11968@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Can you tell more about the bug you perceive? The doc and code for wsgiref were carefully updated to play well with Python 3 clean bytes/characters distinction, so I?m surprised by this bug report. Maybe you mistakenly tried the example with a Python 2.x version? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:11:41 2011 From: report at bugs.python.org (Jonas H.) Date: Fri, 06 May 2011 17:11:41 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304701901.56.0.242773209884.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: > Is this a problem in our markup or a bug in intersphinx? It's a markup problem -- those types are documented as functions, using the :func: role/`.. func::` directive. It's not only a markup mismatch but, strictly speaking, it's *wrong* documentation: str, int, ... aren't functions, they're *classes* and should be documented as such. It's a bit odd to search for information on the str *class* in the list of built-in *functions*. > If this work within one documentation set (as I believe it does) It does not. For example, in http://docs.python.org/library/functions.html#max there's a reference to list.sort using :meth:`list.sort` but no link could be generated. How could it possibly work without decent documentation about the list data type? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:18:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 17:18:45 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1304702325.74.0.402164186031.issue12003@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi. Python 2.6 is in security mode, its documentation is not updated nor released anymore. Is this bug present in the documentation of 2.7 or 3.x versions? ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:22:59 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 17:22:59 +0000 Subject: [docs] [issue11984] Wrong "See also" in symbol and token module docs In-Reply-To: <1304405152.56.0.259676009595.issue11984@psf.upfronthosting.co.za> Message-ID: <1304702579.08.0.404328843335.issue11984@psf.upfronthosting.co.za> ?ric Araujo added the comment: IIUC, the parser and token module somehow can be used together. If so, the interlinks are okay, provided the text is revised to remove mention of the ?second example?. If I?m wrong, let?s remove the link. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:23:49 2011 From: report at bugs.python.org (alejandro david weil) Date: Fri, 06 May 2011 17:23:49 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1304702629.23.0.186911859075.issue12003@psf.upfronthosting.co.za> alejandro david weil added the comment: Yes it is. I copied both versions but forgot to specify the second is in 2.7. This is read in the current (2.7) documentation: # from: http://docs.python.org/library/functions.html?highlight=xrange#xrange islice(count(start, step), (stop-start+step-1)//step) and test_xrange.py shows the output of this code against range(). The code includes 2 samples of parameters which gives the unexpected results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:26:57 2011 From: report at bugs.python.org (Jonas H.) Date: Fri, 06 May 2011 17:26:57 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304702816.91.0.0778751980185.issue11977@psf.upfronthosting.co.za> Jonas H. added the comment: It doesn't. Sphinx still can't make any links, which btw also means that it's impossible to reference those methods within the Python documentation. Also I want to point out that I find the information very hard to find as a human. The fact that integers are based on `numbers.Number` is -- at this point in time where 95% of all Python developers don't know about the `numbers` module or abstract base classes in general -- an implementation detail and as such should not affect the way `int` is documented. I propose to have decent class references for int, str, ... similar to the reference for dict -- that is, document all attributes and methods in one place and make them referencable. For those who want to deep-dive into CPython internals, a note about those functionality actually being implemented in ABCs could be added. (But I think that's out of scope for this ticket. I could open a new one if anyone agrees with me... :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:31:30 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 May 2011 17:31:30 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304703090.31.0.998138950127.issue11977@psf.upfronthosting.co.za> Georg Brandl added the comment: Reopening, it makes sense to have everything available for linking. (Even if they are quite obscure attributes.) ---------- nosy: +georg.brandl status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:31:58 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 17:31:58 +0000 Subject: [docs] [issue11977] Document int.conjugate, .denominator, ... In-Reply-To: <1304281527.31.0.490855544057.issue11977@psf.upfronthosting.co.za> Message-ID: <1304703118.18.0.963403063153.issue11977@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Also I want to point out that I find the information very hard to > find as a human. The fact that integers are based on `numbers.Number` > is -- at this point in time where 95% of all Python developers don't > know about the `numbers` module or abstract base classes in general > -- an implementation detail and as such should not affect the way > `int` is documented. Not really: int is not based on numbers.Number, but the ABC serves as documentation. > I propose to have decent class references for int, str, ... similar > to the reference for dict -- that is, document all attributes and > methods in one place and make them referencable. Hum, I think this should be fixed, but not with tons of text containing duplicated information (once for int, once for long, once for float...) Ezio: you recently fixed a similar problem with collections ABCs methods; what?s your opinion here? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 19:37:41 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 May 2011 17:37:41 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304703461.18.0.44489809637.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: str, list and friends are both functions and classes, if you want to go that way :) Let?s keep purism out of this and discuss the result: we agree that missing links are a problem, so let?s fix it. > How could it possibly work What?s missing is class and method directives. If you?re interested in submitting a patch, guidelines are found at http://docs.python.org/dev/documenting/markup#information-units and http://docs.python.org/devguide > without decent documentation about the list data type? I can understand your feelings, but such a comment is a bit harsh for all the volunteer time that?s been put into documenting Python. http://docs.python.org/dev/library/functions#list and http://docs.python.org/dev/library/stdtypes#typesseq seem quite ?decent? to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 20:15:52 2011 From: report at bugs.python.org (Jonas H.) Date: Fri, 06 May 2011 18:15:52 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1304705752.88.0.247287058559.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: Shouldn't have used "decent" here, sorry. What I was trying to say is that there's no "reference-like" documentation for the list datatype (as for dict). There's more than enough quality documentation about lists but I think the way it's arranged can be improved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 01:20:31 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 06 May 2011 23:20:31 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304724031.17.0.367775933133.issue11948@psf.upfronthosting.co.za> Sandro Tosi added the comment: Here's attached the patch including Terry's suggestion (gaah, sorry for this late reply). ---------- Added file: http://bugs.python.org/file21913/issue11948-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 01:31:55 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 06 May 2011 23:31:55 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304724715.54.0.529113880458.issue11948@psf.upfronthosting.co.za> Ezio Melotti added the comment: s/``sys.path``/:data:`sys.path`/ (or whatever turns that into a link). I also don't like the "Python programs that know what they're doing" bit. The list of places where the modules are searched could be a bullet list. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 01:46:57 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 May 2011 23:46:57 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1304725617.42.0.379435145255.issue11968@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Takayuki is correct, the status and header strings should, it seems, be 'native strings', not bytes. The experimental proof is to run the current example code (I did so from IDLE editor window on WinXP) and then enter http://localhost:8000/ in a browser. Several error messages appear back in the shell window, like AssertionError: Header names/values must be of type str (got b'Content-type') Hit ^C to stop. Delete the b prefixes from the code. Rerun. Reaccess. And the environment dict appears as promised: TMP: C:\DOCUME~1\Terry\LOCALS~1\Temp WATCOM: C:\temp\WatconPermanent COMPUTERNAME: HP-PAVILION wsgi.multiprocess: False ... Takayuki, if you did the same thing, it would have been helpful if you had said so. Neither version works in 3.1.3. No exception messages either. Firefox says unable to connect. I retried with 3.2.0 and patched example and it worked again. Running this down in the docs was harder. In the example, function simple_app is a WSGI application object. The status and header objects are passed to the start_response function passed to simple_app after simple_app is passed to make_server. The manual (elsewhere) refers to PEP 3333 for the definition of WSGI app object. The 'start_response Callable' section says the status passed to start_response should be a string and that headers should be a list of tuples of header key and value, but it does not specify the type of the latter. The earlier 'Note on String Types says that headers are, for convenience, native-to-the-version strings while bodies are bytes. So the revised example that works matches the doc. Phillip or David, can you verify that this is all as intended? ---------- nosy: +pje, r.david.murray, terry.reedy stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 04:22:57 2011 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 07 May 2011 02:22:57 +0000 Subject: [docs] [issue12025] strangely missing separator in "resource" table In-Reply-To: <1304734977.84.0.0748743077356.issue12025@psf.upfronthosting.co.za> Message-ID: <1304734977.84.0.0748743077356.issue12025@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : "resource" page in python docs is missing a separator between 6 and 7. Checking the RST source code, everything seems correct. But the fact is that a line is missing in the HTML output. Checking the HTML output code, it seems OK. Disabling CSS, I see the table is correct. Maybe an issue with the CSS?. A bug in Firefox 4.0.1? (my current browser). Viewing in iPhone, the display is OK :-?. Python 2.7: http://docs.python.org/library/resource.html#resource-usage Python 3.1: http://docs.python.org/release/3.1.3/library/resource.html#resource-usage Python 3.2: http://docs.python.org/py3k/library/resource.html#resource-usage Python 3.3: http://docs.python.org/dev/library/resource.html#resource-usage ---------- assignee: docs at python components: Documentation messages: 135397 nosy: docs at python, jcea priority: normal severity: normal status: open title: strangely missing separator in "resource" table versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 07:00:03 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 May 2011 05:00:03 +0000 Subject: [docs] [issue12025] strangely missing separator in "resource" table In-Reply-To: <1304734977.84.0.0748743077356.issue12025@psf.upfronthosting.co.za> Message-ID: <1304744403.29.0.0864686242014.issue12025@psf.upfronthosting.co.za> Georg Brandl added the comment: Sorry, I can't see anything wrong here (with FF 4.0 too). Can you attach a screenshot? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 09:23:50 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 May 2011 07:23:50 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1304753030.01.0.318221754684.issue12003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified bug on winxp with 2.7 xrangef [5, 4, 3, 2, 1, 0] py26 [] py27 [5, 4, 3, 2, 1, 0, -1, -2] v1 [5, 4, 3, 2, 1, 0] v2 [5, 4, 3, 2, 1, 0] v3 [5, 4, 3, 2, 1, 0] ----------------------- xrangef [5, 3, 1, -1, -3] py26 [] py27 [5, 3, 1, -1, -3, -5] v1 [5, 3, 1, -1, -3] v2 [5, 3, 1, -1, -3] v3 [5, 3, 1, -1, -3] The problem is that -1 should instead be +1 for negative steps. The 2.6 version completely failed for negative steps because the comparison needs to be reversed. The doc example could add "for positive steps. For negative steps, use '+1' instead of '-1'". Or change expression to islice(count(start, step), (stop-start+step-1+2*(step<0))//step) (the addition is +2*(step<0)). Or change -1 to +(-1 if step>0 else 1). I tested both. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 12:24:45 2011 From: report at bugs.python.org (STINNER Victor) Date: Sat, 07 May 2011 10:24:45 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> New submission from STINNER Victor : I don't know why threading._get_ident() (which is _thread.get_ident()) is private: this function is safe. This function becomes useful with pthread_kill() which will be added by #8407. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 135441 nosy: docs at python, haypo priority: normal severity: normal status: open title: threading._get_ident(): remove it in the doc and make it public versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 12:26:38 2011 From: report at bugs.python.org (STINNER Victor) Date: Sat, 07 May 2011 10:26:38 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1304763998.76.0.565788611217.issue12028@psf.upfronthosting.co.za> STINNER Victor added the comment: I think that threading._get_ident() is more reliable than threading.current_thread().ident because Thread.ident can be None in some cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 17:09:47 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 07 May 2011 15:09:47 +0000 Subject: [docs] [issue10713] re module doesn't describe string boundaries for \b In-Reply-To: <1292461535.35.0.85810781117.issue10713@psf.upfronthosting.co.za> Message-ID: <1304780986.97.0.366935592017.issue10713@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Would you be interested in experimenting and/or reading the code to find the anwser and propose a doc patch? ---------- keywords: +easy nosy: +eric.araujo stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 17:10:31 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 07 May 2011 15:10:31 +0000 Subject: [docs] [issue10713] re module doesn't describe string boundaries for \b In-Reply-To: <1292461535.35.0.85810781117.issue10713@psf.upfronthosting.co.za> Message-ID: <1304781031.53.0.834493226755.issue10713@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 19:22:36 2011 From: report at bugs.python.org (Phillip J. Eby) Date: Sat, 07 May 2011 17:22:36 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1304788956.3.0.265060224619.issue11968@psf.upfronthosting.co.za> Phillip J. Eby added the comment: Yes, the 'b' is a docs error. I previously removed this in: http://hg.python.org/cpython-fullhistory/rev/2697326d4a77 It appears to have been reverted during a merge, here: http://hg.python.org/cpython-fullhistory/rev/88d04f0143c7 My browser crashed trying to view that huge second revision, so I'm not sure if there were any other regressions therein. ---------- _______________________________________ Python tracker _______________________________________ From fritz at quipugmbh.com Mon May 2 13:49:32 2011 From: fritz at quipugmbh.com (Alejandro Fritz) Date: Mon, 2 May 2011 13:49:32 +0200 Subject: [docs] shutil .move() on 2.6 Message-ID: <4DBE9A4C.7020807@quipugmbh.com> Hi, I am changing from py 2.5 and 2.6 on windows and noticed that the shutil.move() function changed from overwriting (in 2.4 and 2.5) to non-overwriting the destination file if it exists: if os.path.isdir(dst): real_dst = os.path.join(dst, _basename(src)) if os.path.exists(real_dst): raise Error, "Destination path '%s' already exists" % real_dst This behavior is not documented. best, af -- Alejandro Fritz Infoware project coordinator QUIPU GmbH Frankfurt Am Eisernen Schlag 31 / Gro?e Seestra?e 43 60431 Frankfurt/M. / 60486 Frankfurt/M. Skype: quipu_alex E-Mail: fritz at quipugmbh.com Web: www.quipu-processing.com ; www.quipugmbh.com CONFIDENTIALITY NOTICE This e-mail message and any attachments are only for the use of the intended recipient and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, any disclosure, distribution or other use of this e-mail message or attachments is prohibited. If you have received this e-mail message in error, please delete and notify the sender immediately. Thank you. From vikramls at gmail.com Mon May 2 19:52:52 2011 From: vikramls at gmail.com (Vikram Shirgur) Date: Mon, 2 May 2011 10:52:52 -0700 Subject: [docs] Typo in example code in section 6.2.6.10 in python3.3 documentation Message-ID: Hi, There seems to be a typo in the listing for section 6.2.6.10. The relevant code says this: #-- begin code snippet elif typ != 'SKIP': if typ == 'ID' and val in keywords: typ = val yield Token(typ, mo.group(typ), line, mo.start()-line_start) #-- end code snippet which results in NameError since val hasn't been defined before. It should be changed to: #-- begin code snippet elif typ != 'SKIP': val = mo.group(typ) if typ == 'ID' and val in keywords: typ = val yield Token(typ, val, line, mo.start()-line_start) #-- end code snippet I added a statement (val = mo.group(typ)) to assign a value to val before it is accessed. Thanks, Vikram From victor.varvariuc at gmail.com Tue May 3 06:39:12 2011 From: victor.varvariuc at gmail.com (Victor Varvariuc) Date: Tue, 3 May 2011 07:39:12 +0300 Subject: [docs] Looks like there should be walk() instead of listdir() Message-ID: http://docs.python.org/library/os.html#os.walk ... > By default errors from the listdir() call > are ignored. If optional argument *onerror* is specified, it should be a > function; it will be called with one argument, an OSError > instance. > ... Looks like there should be walk() instead of listdir() -- Victor Varvariuc -------------- next part -------------- An HTML attachment was scrubbed... URL: From avosoftware at gmail.com Thu May 5 12:57:55 2011 From: avosoftware at gmail.com (Avosoft) Date: Thu, 05 May 2011 11:57:55 +0100 Subject: [docs] Python documentation Message-ID: <4DC282B3.6040809@gmail.com> Hello, Why not build a chm version of the documentation. I can do that for you free, you only need to give specification like topics etc thanks -- Sincerely, AvoSoft Team Phone: +234 (805) 3120587, +234 (704) 0371303 Web: http://www.avo-soft.com Email: avosoftware at gmail.com ? 2003 -2011, AvoSoft Technologies From mlr54 at cisunix.unh.edu Fri May 6 02:58:36 2011 From: mlr54 at cisunix.unh.edu (Matthew Gilson) Date: Thu, 05 May 2011 20:58:36 -0400 Subject: [docs] List tutorial Message-ID: <4DC347BC.3040906@cisunix.unh.edu> at: http://docs.python.org/release/2.6/tutorial/datastructures.html#more-on-lists Perhaps this is nit-picky, but ... The documentation says that list.remove(x) removes the first item whose value is x. In reality, that method removes the first item whose value equals x. simple example: class test(object): def __eq__(self,other): return True l=[test(),test()] l.remove(True) l.remove(True) print l # [] <<< Empty list. test class instances were removed because they equal True, not because they are True! Perhaps that is what is meant by whose "value" is x, but I think the wording there is a little ambiguous. From report at bugs.python.org Sun May 8 16:27:10 2011 From: report at bugs.python.org (Ralph Corderoy) Date: Sun, 08 May 2011 14:27:10 +0000 Subject: [docs] [issue10713] re module doesn't describe string boundaries for \b In-Reply-To: <1292461535.35.0.85810781117.issue10713@psf.upfronthosting.co.za> Message-ID: <1304864830.64.0.333911175024.issue10713@psf.upfronthosting.co.za> Ralph Corderoy added the comment: Examining the source of Ubuntu's python2.6 2.6.6-5ubuntu1 package suggests beyond the limits of the string is considered \W, like Perl. Modules/_sre.c: 336 LOCAL(int) 337 SRE_AT(SRE_STATE* state, SRE_CHAR* ptr, SRE_CODE at) 338 { 339 /* check if pointer is at given position */ 340 341 Py_ssize_t thisp, thatp; ... 365 case SRE_AT_BOUNDARY: 366 if (state->beginning == state->end) 367 return 0; 368 thatp = ((void*) ptr > state->beginning) ? 369 SRE_IS_WORD((int) ptr[-1]) : 0; 370 thisp = ((void*) ptr < state->end) ? 371 SRE_IS_WORD((int) ptr[0]) : 0; 372 return thisp != thatp; SRE_IS_WORD() returns 16 for the 63 \w characters, 0 otherwise. This is born out by tests. Note, 366 above confirms it's never true for an empty string. The documentation states that \B "is just the opposite of \b" yet re.match(r'\b', '') returns None and so does \B so \B isn't the opposite of \b in all cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 03:46:38 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 09 May 2011 01:46:38 +0000 Subject: [docs] [issue12025] strangely missing separator in "resource" table In-Reply-To: <1304734977.84.0.0748743077356.issue12025@psf.upfronthosting.co.za> Message-ID: <1304905598.08.0.639661577195.issue12025@psf.upfronthosting.co.za> Ezio Melotti added the comment: If I zoom out (Ctrl+-) with FF4 one of the lines (the one between 9 and 10 for me) disappear. Try Ctrl+0 to fix it. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 05:06:05 2011 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 09 May 2011 03:06:05 +0000 Subject: [docs] [issue12025] strangely missing separator in "resource" table In-Reply-To: <1304734977.84.0.0748743077356.issue12025@psf.upfronthosting.co.za> Message-ID: <1304910365.23.0.202025648132.issue12025@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Cntl+0 "fixes" it. I was not aware of having set a zoom level for python website. Sorry for wasting your time. PS: FF should no "drop" details like that. Whatever :). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Mon May 9 15:00:22 2011 From: eliben at gmail.com (Eli Bendersky) Date: Mon, 9 May 2011 16:00:22 +0300 Subject: [docs] List tutorial In-Reply-To: <4DC347BC.3040906@cisunix.unh.edu> References: <4DC347BC.3040906@cisunix.unh.edu> Message-ID: On Fri, May 6, 2011 at 03:58, Matthew Gilson wrote: > at: > > http://docs.python.org/release/2.6/tutorial/datastructures.html#more-on-lists > Perhaps this is nit-picky, but ... > The documentation says that list.remove(x) removes the first item whose > value is x. In reality, that method removes the first item whose value > equals x. > > simple example: > class test(object): > def __eq__(self,other): > return True > > l=[test(),test()] > l.remove(True) > l.remove(True) > print l # [] <<< Empty list. test class instances were removed because > they equal True, not because they are True! > > Perhaps that is what is meant by whose "value" is x, but I think the > wording there is a little ambiguous. > I agree it's nit-picky :-) At the tutorial level, "value is x" is good enough for the readers. Twisting the tongue to avoid confusion between "is" and "equals" is IMHO unnecessary. So -1 from me. Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliben at gmail.com Mon May 9 15:03:06 2011 From: eliben at gmail.com (Eli Bendersky) Date: Mon, 9 May 2011 16:03:06 +0300 Subject: [docs] Looks like there should be walk() instead of listdir() In-Reply-To: References: Message-ID: On Tue, May 3, 2011 at 07:39, Victor Varvariuc wrote: > http://docs.python.org/library/os.html#os.walk > > ... >> By default errors from the listdir() call >> are ignored. If optional argument *onerror* is specified, it should be a >> function; it will be called with one argument, an OSError >> instance. >> ... > > > > Looks like there should be walk() instead of listdir() > walk() is implemented using listdir(), so I believe the documentation here is right. Here's the relevant code from os.walk(): try: # Note that listdir and error are globals in this module due # to earlier import-*. names = listdir(top) except error, err: if onerror is not None: onerror(err) return As you can see, if listdir() throws an exception, it is ignored unless "onerror" is specified. Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon May 9 16:37:30 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 09 May 2011 14:37:30 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1304951850.42.0.310409327182.issue11968@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 19:54:15 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 09 May 2011 17:54:15 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304963655.46.0.255719825102.issue11948@psf.upfronthosting.co.za> Sandro Tosi added the comment: What about the attached (v3) patch? the "This allows...experts hands." part can be remove completely if can be mis-interpreted. ---------- Added file: http://bugs.python.org/file21944/issue11948-v3.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon May 9 20:03:30 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 9 May 2011 20:03:30 +0200 Subject: [docs] Python documentation In-Reply-To: <4DC282B3.6040809@gmail.com> References: <4DC282B3.6040809@gmail.com> Message-ID: Hello, On Thu, May 5, 2011 at 12:57, Avosoft wrote: > Why not build a chm version of the documentation. I can do that for you > free, you only need to give specification like topics etc I can only guess an answer here, but I think it's mainly because all the docs generation is done but Sphinx[1] and it can't generate a CHM output file. I don't know even if an open-source CHM generator exists of it's possible (given the licenses involved in the format), but a CHM build for sphinx might be really interesting, so if you want to contribute one.... :) [1] http://sphinx.pocoo.org -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon May 9 20:55:17 2011 From: report at bugs.python.org (Davi Post) Date: Mon, 09 May 2011 18:55:17 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> New submission from Davi Post : In this section: http://docs.python.org/whatsnew/2.6.html#pep-371-the-multiprocessing-package This sentence follows the first example: "A Queue is used to communicate the input parameter N and the result." In the example, the queue is used only for the result, not the input parameter N. [P.S. I'd be happy to submit corrections, but don't want to have to install and learn Mercurial. Is there a simpler way?] ---------- assignee: docs at python components: Documentation messages: 135626 nosy: davipo, docs at python priority: normal severity: normal status: open title: What's New multiprocessing example error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 20:55:30 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 May 2011 18:55:30 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304967330.3.0.902718116401.issue11948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please don't make these kind of changes. Guido has been clear that the docs need to affirmatively state what the language does. Except for certain security risks or segfault risks, the docs should avoid wording along the lines of "feature x is dangerous" or "experts only". These kind of value judgements belong in blogs and wikis, not in the core documentation which should simply focus on what the language does and examples of how to use it effectively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 20:59:05 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 09 May 2011 18:59:05 +0000 Subject: [docs] [issue12043] Update shutil documentation In-Reply-To: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> Message-ID: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> New submission from Sandro Tosi : This issue is to keep track of the 'shutil' documentation update, since it seems to miss several information (in particular in comparison with the docstrings). I'll post patches as soon as I get them. ---------- assignee: docs at python components: Documentation messages: 135628 nosy: docs at python, sandro.tosi priority: low severity: normal stage: needs patch status: open title: Update shutil documentation versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 21:05:12 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 09 May 2011 19:05:12 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304967912.47.0.261655116267.issue11948@psf.upfronthosting.co.za> Sandro Tosi added the comment: Sorry Raymond for the bad editing, I was confused by thinking 'tutorial' is particularly meant for new-coming people. Anyhow, sorry again: I attach a patch removing the badworded part. Please let me know if anything else is missing or needs fixing. Thanks for your check & time. ---------- Added file: http://bugs.python.org/file21946/issue11948-v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 21:08:53 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 May 2011 19:08:53 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304968133.42.0.6854950652.issue11948@psf.upfronthosting.co.za> R. David Murray added the comment: Raymond: I haven't read the examples in detail so I don't have an opinion on the appropriateness of the text, but I'm curious: while what you say certainly applies to the Language Reference, does it also apply to the Tutorial? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon May 9 21:09:51 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 9 May 2011 21:09:51 +0200 Subject: [docs] shutil .move() on 2.6 In-Reply-To: <4DBE9A4C.7020807@quipugmbh.com> References: <4DBE9A4C.7020807@quipugmbh.com> Message-ID: Hello Alejandro, On Mon, May 2, 2011 at 13:49, Alejandro Fritz wrote: > Hi, > I am changing from py 2.5 and 2.6 on windows and noticed that ?the > shutil.move() function changed from overwriting (in 2.4 and 2.5) ?to > non-overwriting the destination file if it exists: > > ? ?if os.path.isdir(dst): > ? ? ? ?real_dst = os.path.join(dst, _basename(src)) > ? ? ? ?if os.path.exists(real_dst): > ? ? ? ? ? ?raise Error, "Destination path '%s' already exists" % real_dst > > This behavior is not documented. 2.6 is in security-only support state, that means it only receive security patches and nothing else. So the problem you show cannot be fixed in that version, anyhow all the other supported branches (2.7, 3.1, 3.2, and on-development 3.3) needs improvement: I opened http://bugs.python.org/issue12043 to track progress on that. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon May 9 21:13:00 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 May 2011 19:13:00 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304968380.4.0.703850262287.issue11948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The tutorial is meant for newcomers. The experience needs to be positive and not leave the reader with worries that something bad will happen if they make a misstep. People commonly use the tutorial to evaluate the language as a whole. The tutorial needs to show people what the language is capable of doing. It should not create the impression that all its features are dangerous and should only be used by experts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 21:19:32 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 May 2011 19:19:32 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304968772.47.0.445339267356.issue11948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One other stylistic note. The tone of the tutorial (and all the docs) needs to be respectful of the readers intelligence. We don't presume that the readers are stupid. We lay out the relevant information, show motivating use cases, provide glossary links, and do our best to connect-the-dots, but don't talk down them or waste their time. The recent doc patch for using the in-operator instead of str.find borders on the edge of not giving readers credit for being able to make trivial inferences about the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 23:39:23 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 09 May 2011 21:39:23 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304977163.65.0.323323966041.issue11948@psf.upfronthosting.co.za> Sandro Tosi added the comment: Raymond, thanks for explaining the reasoning behind your replies, it really helps me understand the "spirit" behind python :) That said, and trying to be a bit more pragmatical, what are the next steps to make this patch acceptable? It's kinda of a small patch, and I honestly didn't foresee the long ping-pong of corrections I received :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 00:41:22 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 09 May 2011 22:41:22 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304980882.45.0.903321365653.issue11948@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sandro, import is a somewhat dark corner of Python that newcomers and even experienced people ofter trip over. So getting the text both correct and clear is worth some thought. I just noticed that the text is only true for Python-coded modules and not for built-in modules. I discovered this by setting sys.path to {} and importing itertools. It works. It appears that Python first searches for builtins -- I created itertools.py and it did not mask the builtin. If there were a Lib/itertools.py which imported _itertools, it would have been masked. So it appears that the text should begin "When a module named :mod:`spam` is imported, the interpreter first searches for a built-in module with that name. If not found, it then searches for a file ..." I suggest changing "This allows Python programs to modify or replace the module search path." to "After initialization, Python programs can modify sys.path." and changing the followup " Note that because the directory containing the script being run is on the search path, it is important that the script not have the same name as a standard module, or Python will attempt to load the script as a module when that module is imported. This will generally be an error." to something more like "Because the directory containing the script being run is placed at the beginning of the search path, ahead of the standard library path, the script and other scripts in that directory should not have the same name as a standard library module unless one really intends for the script to be loaded in place of the standard library module." or perhaps "The directory containing the script being run is placed at the beginning of the search path, ahead of the standard library path. This means that scripts in that directory will be loaded instead of modules of the same name in the library directory. This is an error unless the replacement is intended." I think the change to warn about all possibly conflicting scripts in the directory is needed because a common problem people have is more like import random a = random.choice('abc') raising AttributeError ("O python-list, why???") because there is a forgotten random.py in the same directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 01:52:36 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 May 2011 23:52:36 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304985156.5.0.429085428316.issue11948@psf.upfronthosting.co.za> R. David Murray added the comment: Raymond: yes, thanks for the clear guidance. Perhaps it could be added to Documenting Python, perhaps in the Style Guide chapter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 03:12:35 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 May 2011 01:12:35 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1304989955.36.0.436682836932.issue11948@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with both Raymond and David's suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 06:46:53 2011 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 May 2011 04:46:53 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305002812.92.0.238253737378.issue11948@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 to the guidance, and to adding it to the doc style chapter. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 08:58:04 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 May 2011 06:58:04 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305010684.61.0.369799580849.issue11948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See http://bugs.python.org/issue12047 ---------- _______________________________________ Python tracker _______________________________________ From georg at python.org Tue May 10 09:03:00 2011 From: georg at python.org (Georg Brandl) Date: Tue, 10 May 2011 09:03:00 +0200 Subject: [docs] Python documentation In-Reply-To: References: <4DC282B3.6040809@gmail.com> Message-ID: <4DC8E324.2040508@python.org> On 09.05.2011 20:03, Sandro Tosi wrote: > Hello, > > On Thu, May 5, 2011 at 12:57, Avosoft wrote: >> Why not build a chm version of the documentation. I can do that for you >> free, you only need to give specification like topics etc > > I can only guess an answer here, but I think it's mainly because all > the docs generation is done but Sphinx[1] and it can't generate a CHM > output file. I don't know even if an open-source CHM generator exists > of it's possible (given the licenses involved in the format), but a > CHM build for sphinx might be really interesting, so if you want to > contribute one.... :) > > [1] http://sphinx.pocoo.org Well, CHM build is already implemented, and we also offer CHMs for download along with the Windows executables. Georg From georg at python.org Tue May 10 09:05:12 2011 From: georg at python.org (Georg Brandl) Date: Tue, 10 May 2011 09:05:12 +0200 Subject: [docs] List tutorial In-Reply-To: References: <4DC347BC.3040906@cisunix.unh.edu> Message-ID: <4DC8E3A8.5040004@python.org> On 09.05.2011 15:00, Eli Bendersky wrote: > > > On Fri, May 6, 2011 at 03:58, Matthew Gilson > wrote: > > at: > http://docs.python.org/release/2.6/tutorial/datastructures.html#more-on-lists > Perhaps this is nit-picky, but ... > The documentation says that list.remove(x) removes the first item whose > value is x. In reality, that method removes the first item whose value > equals x. > > simple example: > class test(object): > def __eq__(self,other): > return True > > l=[test(),test()] > l.remove(True) > l.remove(True) > print l # [] <<< Empty list. test class instances were removed because they > equal True, not because they are True! > > Perhaps that is what is meant by whose "value" is x, but I think the wording > there is a little ambiguous. > > > I agree it's nit-picky :-) > > At the tutorial level, "value is x" is good enough for the readers. Twisting the > tongue to avoid confusion between "is" and "equals" is IMHO unnecessary. > > So -1 from me. If the sentence was "... the first item that is x", I would object (since it implies object identity comparison). As it is right now, the "value of the item" isn't really a well-defined Python term anyway, so whether you say "the value is x" or "the value equals x" doesn't make a difference. But it serves the purpose well in the tutorial, so I'd just keep it. Georg From patricksgann at gmail.com Mon May 9 18:53:06 2011 From: patricksgann at gmail.com (Patrick Gann) Date: Mon, 9 May 2011 12:53:06 -0400 Subject: [docs] Documentation bug -- Python 3.2 tutorial 4.7 Message-ID: To the wonderful Python volunteers, I'm totally new to coding. Not just Python, but coding and scripting in general. I know precious little bits of C, and I know html. I thought I'd start fresh with something awesome, so I went to Python 3.2 and have been slowly walking myself through the tutorial and its examples using "Python Portable." I got stuck on 4.7 http://docs.python.org/py3k/tutorial/controlflow.html#more-on-defining-functions I entered 'y' or 'n' and kept getting the complaint message. I couldn't figure it out for the life of me. I called on my little brother to help me. We did some basic troubleshooting using the scripter, and determined by setting ok = y in the programming line, that it was the input itself that wasn't being recognized properly. We scoured the net, and then found this pretty annoying bug first reported March 7th... http://mail.python.org/pipermail/new-bugs-announce/2011-March/010263.html Sure enough, if I change the line if ok in ('y', 'ye', 'yes'): to if ok in ('y\r', 'ye\r', 'yes\r'): Then when I just type 'y' or whatever, it'll go through. I can't remove my own \r in the prompt. For anyone learning by way of the tutorial, like I am, you might want to put a temporary note in the documentation about the known bug, so that until the fix is in, they can even witness the bug by doing y\r in the code and explaining how the bug is affecting inputs. Learning how this affects users, sort of a "troubleshooting 101," is also really helpful for new users like myself. Just a suggestion. (Yes, I'm too wordy. "Get on with it!") Patrick From sandro.tosi at gmail.com Tue May 10 13:48:22 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 10 May 2011 13:48:22 +0200 Subject: [docs] Python documentation In-Reply-To: <4DC8E324.2040508@python.org> References: <4DC282B3.6040809@gmail.com> <4DC8E324.2040508@python.org> Message-ID: On Tue, May 10, 2011 at 09:03, Georg Brandl wrote: > Well, CHM build is already implemented, and we also offer CHMs for download > along with the Windows executables. Oh great, I didn't know that. Is that because CHM is built using Windows tools and/or can the CHM file be added to the download page of the documentation? Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue May 10 16:10:48 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 10 May 2011 14:10:48 +0000 Subject: [docs] [issue11979] Minor improvements to the Sockets readme: typos, wording and sphinx features usage In-Reply-To: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> Message-ID: <1305036648.14.0.432018039219.issue11979@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 21:23:33 2011 From: report at bugs.python.org (Jordan Stadler) Date: Tue, 10 May 2011 19:23:33 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305055413.27.0.0887264297355.issue8824@psf.upfronthosting.co.za> Jordan Stadler added the comment: I'm going to update the documentation to include the scope information. Should be done within a day. ---------- nosy: +jstadler _______________________________________ Python tracker _______________________________________ From georg at python.org Tue May 10 21:44:11 2011 From: georg at python.org (Georg Brandl) Date: Tue, 10 May 2011 21:44:11 +0200 Subject: [docs] Python documentation In-Reply-To: References: <4DC282B3.6040809@gmail.com> <4DC8E324.2040508@python.org> Message-ID: <4DC9958B.6050204@python.org> On 10.05.2011 13:48, Sandro Tosi wrote: > On Tue, May 10, 2011 at 09:03, Georg Brandl wrote: >> Well, CHM build is already implemented, and we also offer CHMs for download >> along with the Windows executables. > > Oh great, I didn't know that. Is that because CHM is built using > Windows tools and/or can the CHM file be added to the download page of > the documentation? Yep, HTML Help Workshop is needed to process the files into a .chm. This runs only on Windows, so we can't build the CHM automatically as we do for the other docs. Georg From report at bugs.python.org Tue May 10 23:55:12 2011 From: report at bugs.python.org (Jordan Stadler) Date: Tue, 10 May 2011 21:55:12 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305064512.9.0.877665137961.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : ---------- keywords: +patch Added file: http://bugs.python.org/file21960/exec_doc_touchup_2_x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 23:55:59 2011 From: report at bugs.python.org (Jordan Stadler) Date: Tue, 10 May 2011 21:55:59 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305064559.79.0.476527734976.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : Added file: http://bugs.python.org/file21961/exec_doc_touchup_3_x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 00:02:43 2011 From: report at bugs.python.org (Jordan Stadler) Date: Tue, 10 May 2011 22:02:43 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305064963.8.0.591357176141.issue8824@psf.upfronthosting.co.za> Jordan Stadler added the comment: Patches for 2.x and 3.x documentation related to 'exec'. 2.x Provides more information about scopes when using additional expressions for 'exec'. 2.x documentation for 'exec' is found in reference/simple_stmts. 3.x Provides more information about scopes when using additional expressions for 'exec'. 3.x documentation for 'exec' is found in library/functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 04:38:36 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 11 May 2011 02:38:36 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305081516.47.0.0588294390731.issue8824@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 16:27:43 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 May 2011 14:27:43 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset e7c62e0981c7 by Senthil Kumaran in branch 'default': Fix closed Issue #11968 - the start_response header values in wsgiref shoudl be http://hg.python.org/cpython/rev/e7c62e0981c7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 16:29:21 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 11 May 2011 14:29:21 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: <1305124160.99.0.592717477781.issue11968@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 16:38:05 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 May 2011 14:38:05 +0000 Subject: [docs] [issue11968] wsgiref's wsgi application sample code does not work In-Reply-To: <1304229384.21.0.895279111303.issue11968@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 5add0c01933f by Senthil Kumaran in branch '3.2': Issue #11968 - the start_response header values in wsgiref shoudl be str not http://hg.python.org/cpython/rev/5add0c01933f New changeset 482f60d6a687 by Senthil Kumaran in branch 'default': [Merge Branch] Issue #11968 - the start_response header values in wsgiref shoudl be http://hg.python.org/cpython/rev/482f60d6a687 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 21:59:23 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 11 May 2011 19:59:23 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305143962.98.0.852349685142.issue11948@psf.upfronthosting.co.za> Sandro Tosi added the comment: I first would like to apologize if my comments were interpreted like I'd like to do a poor quality job, that's actually the opposite! I just get caught by surprise how a simple change in a word to better join two paragraphs grows up like this - but that's perfectly fine and understandable we want to be as detailed and precise as possible Here's the fifth version of the patch, including Terry's suggestions - thanks! ---------- Added file: http://bugs.python.org/file21972/issue11948-v5.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed May 11 23:07:15 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 11 May 2011 23:07:15 +0200 Subject: [docs] Documentation bug -- Python 3.2 tutorial 4.7 In-Reply-To: References: Message-ID: Hello Patrick, On Mon, May 9, 2011 at 18:53, Patrick Gann wrote: > http://mail.python.org/pipermail/new-bugs-announce/2011-March/010263.html The issue you're referring to[1] is actually a duplicate of another one[2] that has already been fixed[3]: it just need to be released a new version of Python 3.2 . [1] http://bugs.python.org/issue11434 [2] http://bugs.python.org/issue11272 [3] http://bugs.python.org/issue11272#msg129180 Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Wed May 11 23:49:23 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 11 May 2011 23:49:23 +0200 Subject: [docs] =?windows-1252?q?Incorrect_footnote_in_=2215=2E3=2E_time_?= =?windows-1252?q?=97_Time_access_and_conversions=22?= In-Reply-To: <4DB9492E.2000909@thehaxbys.co.uk> References: <4DB9492E.2000909@thehaxbys.co.uk> Message-ID: Hi John, On Thu, Apr 28, 2011 at 13:02, John Haxby wrote: > The footnote at the end of http://docs.python.org/library/time.html says >> >> [1] ? ?[...] Also, a strict reading of the original 1982 RFC 822 >> standard calls for a two-digit year (%y rather than %Y), but practice >> moved to 4-digit years long before the year 2000. The 4-digit year has >> been mandated by RFC 2822, which obsoletes RFC 822. > > The change from 2 digit years to 4 digit years was actually mandated by > RFC 1123 in 1989 I'm not sure which one is more relevant; from RFC 1123 I can read: This document is one of a pair that defines and discusses the requirements for host system implementations of the Internet protocol suite. This RFC covers the applications layer and support protocols. so it seems more about the IP implementation only, than anything else. Also the example is clearly referring to RFC 2822 and the footnote explains why the year value is made of 4 digits. So I don't think the documentation needs to be fixed. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Thu May 12 00:33:07 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 11 May 2011 22:33:07 +0000 Subject: [docs] [issue12061] Remove duplicate 'key functions' entry in Glossary In-Reply-To: <1305153187.55.0.682645049185.issue12061@psf.upfronthosting.co.za> Message-ID: <1305153187.55.0.682645049185.issue12061@psf.upfronthosting.co.za> New submission from Sandro Tosi : Hi, only on 2.7 there were 2 entries for 'key function': this patches remove the second occurrence, leaving that part of Glossary equals to the other branches. ---------- assignee: docs at python components: Documentation files: remove_duplicate_key_functions-2.7.patch keywords: patch messages: 135810 nosy: docs at python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Remove duplicate 'key functions' entry in Glossary versions: Python 2.7 Added file: http://bugs.python.org/file21978/remove_duplicate_key_functions-2.7.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu May 12 00:34:21 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 12 May 2011 00:34:21 +0200 Subject: [docs] Fwd: [ Double entry of key function ] In-Reply-To: <4DBC86D6.7020105@python.org> References: <4DBC86D6.7020105@python.org> Message-ID: Hi Anurag, > Hi, > ? ? I was just going through Glossary (?http://docs.python.org/glossary.html#glossary). I got that there is two entries for key function. > ? ? Please take corrective measure. I just opened http://bugs.python.org/issue12061 to fix it. Thanks, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Thu May 12 07:47:12 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 12 May 2011 05:47:12 +0000 Subject: [docs] [issue12061] Remove duplicate 'key functions' entry in Glossary In-Reply-To: <1305153187.55.0.682645049185.issue12061@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 534a9e274d88 by Georg Brandl in branch '2.7': #12061: remove duplicate glossary entry. http://hg.python.org/cpython/rev/534a9e274d88 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 07:47:28 2011 From: report at bugs.python.org (Georg Brandl) Date: Thu, 12 May 2011 05:47:28 +0000 Subject: [docs] [issue12061] Remove duplicate 'key functions' entry in Glossary In-Reply-To: <1305153187.55.0.682645049185.issue12061@psf.upfronthosting.co.za> Message-ID: <1305179248.6.0.848113280659.issue12061@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 07:51:48 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 12 May 2011 05:51:48 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305179508.68.0.729868464798.issue8824@psf.upfronthosting.co.za> Ezio Melotti added the comment: In 3.x exec is a function, so the reference to 'in' should be removed/updated. On 2.x it might be better to just use ``in`` instead of :keyword:`in`, because the latter probably links to the 'in' operator that checks for containment. ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 08:10:15 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 12 May 2011 06:10:15 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1305180615.61.0.365793729674.issue12042@psf.upfronthosting.co.za> Ezio Melotti added the comment: The workflow to prepare a patch using Mercurial is pretty much the same as SVN: # get a clone (checkout) of the repository hg clone http://hg.python.org/cpython # select the branch where you want to fix the issue hg update 2.7 # make changes on the file(s) and make a patch hg diff > issue12042.diff See also http://docs.python.org/devguide/setup.html Also note that 2.6 only receives security fixes, so it can't be fixed there. All the "whatsnew" files are also included in the following versions though, so it might be worth preparing a patch against 2.7. ---------- nosy: +ezio.melotti versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 17:44:20 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 12 May 2011 15:44:20 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305215060.51.0.125158240301.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : Removed file: http://bugs.python.org/file21961/exec_doc_touchup_3_x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 17:44:34 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 12 May 2011 15:44:34 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305215074.93.0.692747500635.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : Added file: http://bugs.python.org/file21981/exec_doc_touchup_3.x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 18:00:38 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 12 May 2011 16:00:38 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305216038.67.0.785902246623.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : Added file: http://bugs.python.org/file21982/exec_doc_touchup_2.x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 18:04:31 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 12 May 2011 16:04:31 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305216271.36.0.717786267185.issue8824@psf.upfronthosting.co.za> Jordan Stadler added the comment: I've updated the 3.x patch, should be correct now. I also updated the 2.x patch to use ``in``. :keyword:`in` was used in an earlier part of the paragraph I modified, so I have changed both for consistency. This is the paragraph before modification: " In all cases, if the optional parts are omitted, the code is executed in the current scope. If only the first expression after :keyword:`in` is specified, it should be a dictionary, which will be used for both the global and the local variables. If two expressions are given, they are used for the global and local variables, respectively. If provided, *locals* can be any mapping object. " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 18:04:57 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 12 May 2011 16:04:57 +0000 Subject: [docs] [issue8824] Improve documentation of exec In-Reply-To: <1274895407.96.0.160223468489.issue8824@psf.upfronthosting.co.za> Message-ID: <1305216297.01.0.267748297612.issue8824@psf.upfronthosting.co.za> Changes by Jordan Stadler : Removed file: http://bugs.python.org/file21960/exec_doc_touchup_2_x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 19:29:03 2011 From: report at bugs.python.org (Ron Ridley) Date: Thu, 12 May 2011 17:29:03 +0000 Subject: [docs] [issue10713] re module doesn't describe string boundaries for \b In-Reply-To: <1292461535.35.0.85810781117.issue10713@psf.upfronthosting.co.za> Message-ID: <1305221343.71.0.753137608641.issue10713@psf.upfronthosting.co.za> Changes by Ron Ridley : ---------- nosy: +Ron.Ridley _______________________________________ Python tracker _______________________________________ From hjackson at wne.edu Wed May 11 19:36:26 2011 From: hjackson at wne.edu (Herman L. Jackson) Date: Wed, 11 May 2011 17:36:26 +0000 Subject: [docs] Bug in re example Message-ID: Hi, When running the tokenize example at the bottom of http://docs.python.org/py3k/library/re.html#match-objects I received the following error: Traceback (most recent call last): File "", line 1, in File "", line 23, in tokenize NameError: global name 'val' is not defined The problem is that val is never assigned to before this line: if typ == 'ID' and val in keywords: Here is a suggested rewrite of the that section: elif typ != 'SKIP': val = mo.group(typ) if typ == 'ID' and val in keywords: typ = val yield Token(typ, val, line, mo.start()-line_start) Attached is a complete working example. -------------- next part -------------- A non-text attachment was scrubbed... Name: tokenize.py Type: text/x-python-script Size: 1431 bytes Desc: tokenize.py URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00001.txt URL: From sandro.tosi at gmail.com Wed May 11 23:10:48 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 11 May 2011 23:10:48 +0200 Subject: [docs] pydoc 2.7 in chm format In-Reply-To: References: Message-ID: On Sat, Apr 30, 2011 at 18:10, Anup Warnulkar wrote: > Where can i download python 2.7.1 documentation in chm format ? Documentation in CHM format can be found in the windows build of Python, so in your case at [1] [1] http://www.python.org/download/releases/2.7.1/ Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Thu May 12 23:59:34 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 12 May 2011 21:59:34 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Current 3.2 doc, 5.9. Comparisons, has this paragraph about mixed-type comparisons. "The operators <, >, ==, >=, <=, and != compare the values of two objects. The objects need not have the same type. If both are numbers, they are converted to a common type. Otherwise, the == and != operators *always* consider objects of different types to be unequal, while the <, >, >= and <= operators raise a TypeError when comparing objects of different types that do not implement these operators for the given pair of types. You can control comparison behavior of objects of non-built-in types by defining rich comparison methods like __gt__(), described in section Basic customization." Sentence 3: "If both are numbers, they are converted to a common type." I suspect it would be more true to say 'common internal type' as I would not think it a language requirement to produce Python objects. In any case, I think it is only true for built-in number types, and I do not see that qualification anywhere previously. That aside, it does not appear to be true for Decimals and Fractions in 2.7.1. Sentence 4: first clause is only true for built-in types. That qualification is not obvious to everyone, as evidenced by a current python-list sub thread. For 2.7, which has a different continuation, I suggest adding 'built-in' before 'objects of'. For 3.2/3, I suggest deleting '*always*' and adding a comma after 'TypeError' so that the 'when' condition applies to equality comparisons also. After discussion about same-type comparisons, there is another paragraph about mixed-type comparison: "Comparison of objects of the differing types depends on whether either of the types provide explicit support for the comparison. Most numeric types can be compared with one another, but comparisons of float and Decimal are not supported to avoid the inevitable confusion arising from representation issues such as float('1.1') being inexactly represented and therefore not exactly equal to Decimal('1.1') which is. When cross-type comparison is not supported, the comparison method returns NotImplemented. This can create the illusion of non-transitivity between supported cross-type comparisons and unsupported comparisons. For example, Decimal(2) == 2 and 2 == float(2) but Decimal(2) != float(2)." I suggest deleting this entirely. The first sentence and first clause of the second repeat what was said above. The rest is obsolete as float/decimal comparisons *are* implemented in 2.7.1 and 3.2.0. ---------- assignee: docs at python components: Documentation keywords: easy messages: 135873 nosy: docs at python, rhettinger, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Doc: remove errors about mixed-type comparisons. versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 00:10:30 2011 From: report at bugs.python.org (Chris Rebert) Date: Thu, 12 May 2011 22:10:30 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1305238230.98.0.426251939087.issue12067@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 00:22:33 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 12 May 2011 22:22:33 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1305238952.97.0.215682237251.issue12067@psf.upfronthosting.co.za> Ezio Melotti added the comment: Can you provide a patch? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From k.langer at arkadin.com Thu May 12 21:57:35 2011 From: k.langer at arkadin.com (Ken Langer) Date: Thu, 12 May 2011 15:57:35 -0400 Subject: [docs] MOBI format for DOCs In-Reply-To: References: Message-ID: Sandro/Nick: Thanks for considering on this as a new format. Just out of curiosity, does this mean you will move forward with this? If so, will you do it only for 3.x or for 2.7 and 3.x? If you need help confirming the output, let me know. Ken -----Original Message----- From: matrixhasu at gmail.com [mailto:matrixhasu at gmail.com] On Behalf Of Sandro Tosi Sent: Tuesday, March 22, 2011 4:11 PM To: Nick Efford Cc: Ken Langer; docs at python.org; Georg Brandl Subject: Re: [docs] MOBI format for DOCs On Tue, Mar 22, 2011 at 20:47, Nick Efford wrote: > On Tue, 22 Mar 2011, Sandro Tosi wrote: > >> Since Python 3.2, we started to ship documentation in EPUB format, >> meant to be read by mobile devices. AFAIK MOBI is used only on Palm >> devices, and it seems some are also able to read EPUB. What's exactly >> the reason for your request. It seems Palm is going to be less and >> less used, do we really need this format? > > Sandro, > > MOBI is the native format for the Amazon Kindle. Oh, I didn't know that, and from what I read on Internet, Kindle doesn't support EPUB. >?Given the > popularity of this device, I think it might be a good idea to > support MOBI alongside EPUB. I agree, so we just need to make Sphinx (our doc generator) support MOBI - Georg, is this already in program or brand new request? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri May 13 09:20:44 2011 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 May 2011 07:20:44 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1305271243.86.0.874496378001.issue12067@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Docs] "If both are numbers, they are converted to a common type." [Terry] "In any case, I think it is only true for built-in number types," It's not even true for built-in number types. When comparing an int with a float, it's definitely *not* the case that the int is converted to a float and the floats compared. And that's for good reason: the int -> float conversion is lossy for large integers, so if int <-> float comparisons just converted the int to a float before comparing, we'd have (for example): >>> 10**16 == 1e16 == 10**16 + 1 leading to broken transitivity of equality, and strange dict and set behaviour. So int <-> float comparisons do a complicated dance under the hood to compare the exact numerical values of the two objects and produce the correct result. I'm not sure what the intent of the original sentence was, or how to reword it. The key point is simply that it *is* possible to compare an int with a float, and that the result is sensible, based on numeric values. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 17:27:04 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 15:27:04 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1305300424.25.0.967159151913.issue11964@psf.upfronthosting.co.za> ?ric Araujo added the comment: It turns out that only one documentation block talks about the new indent behavior. It was easy to add a versionchanged directive to that, but I think a complete patch would fix all mentions of the indent argument, after checking that all of encode/dump/dumps/Encoder.whatnot support the new behavior (there is a test for dumps only, I checked that dump works too but not the other ones). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 18:00:11 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 16:00:11 +0000 Subject: [docs] [issue11786] ConfigParser.[Raw]ConfigParser optionxform() In-Reply-To: <1302110277.82.0.57770456199.issue11786@psf.upfronthosting.co.za> Message-ID: <1305302411.16.0.360606091073.issue11786@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: closed -> pending title: ConfigParser. -> ConfigParser.[Raw]ConfigParser optionxform() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 19:08:23 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 17:08:23 +0000 Subject: [docs] [issue12043] Update shutil documentation In-Reply-To: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> Message-ID: <1305306503.58.0.761098277919.issue12043@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?it seems to?: does this come from the mailing list? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 19:12:34 2011 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 13 May 2011 17:12:34 +0000 Subject: [docs] [issue12043] Update shutil documentation In-Reply-To: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> Message-ID: <1305306754.78.0.6285009127.issue12043@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 19:22:22 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 17:22:22 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305307341.92.0.934646145821.issue11948@psf.upfronthosting.co.za> ?ric Araujo added the comment: About Terry?s suggestion to change "This allows Python programs to modify or replace the module search path" to "After initialization, Python programs can modify sys.path": IMO the old text is talking about intent (modify the module search path) and the replacement about implementation (modify sys.path). I prefer the former; what do you think? ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Fri May 13 19:57:23 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 13 May 2011 19:57:23 +0200 Subject: [docs] MOBI format for DOCs In-Reply-To: References: Message-ID: On Thu, May 12, 2011 at 21:57, Ken Langer wrote: > Sandro/Nick: > > Thanks for considering on this as a new format. ? Just out of curiosity, does this mean you will move forward with this? ?If so, will you do it only for 3.x or for 2.7 and 3.x? ?If you need help confirming the output, let me know. No, it just means that we need to find someone willing to dedicate time to writing a Sphinx generator for the MOBI file format. Once we have that, we can talk about shipping the new documentation format. Retgards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Fri May 13 20:00:23 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 13 May 2011 20:00:23 +0200 Subject: [docs] Typo in example code in section 6.2.6.10 in python3.3 documentation In-Reply-To: References: Message-ID: Hi Vikram, thanks for your report. On Mon, May 2, 2011 at 19:52, Vikram Shirgur wrote: > Hi, > > There seems to be a typo in the listing for section 6.2.6.10. The > relevant code says this: > > #-- begin code snippet > ? ? ? ?elif typ != 'SKIP': > ? ? ? ? ? ?if typ == 'ID' and val in keywords: > ? ? ? ? ? ? ? ?typ = val > ? ? ? ? ? ?yield Token(typ, mo.group(typ), line, mo.start()-line_start) > #-- end code snippet > > which results in NameError since val hasn't been defined before. It > should be changed to: > > #-- begin code snippet > ? ? ? ?elif typ != 'SKIP': > ? ? ? ? ? ?val = mo.group(typ) > ? ? ? ? ? ?if typ == 'ID' and val in keywords: > ? ? ? ? ? ? ? ?typ = val > ? ? ? ? ? ?yield Token(typ, val, line, mo.start()-line_start) > #-- end code snippet > > I added a statement (val = mo.group(typ)) to assign a value to val > before it is accessed. It's already been fixed in http://hg.python.org/cpython/rev/538a6b23b18f/ Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri May 13 20:10:15 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 May 2011 18:10:15 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305310215.61.0.764196778846.issue11948@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I disagree (else I would not have suggested change ;-). First, I dislike 'This allows' on stylistic grounds, when there is a better alternative. It is rather wishy-washy: 'this allows' -- so what? As for the rest -- why not be specific? The whole paragraph is about sys.path, so it is not an hidden detail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 20:11:47 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 13 May 2011 18:11:47 +0000 Subject: [docs] [issue12072] Missing parenthesis in c-api/buffer PyBuffer_FillContiguousStrides In-Reply-To: <1305310307.77.0.353459071063.issue12072@psf.upfronthosting.co.za> Message-ID: <1305310307.77.0.353459071063.issue12072@psf.upfronthosting.co.za> New submission from Sandro Tosi : Following up with http://mail.python.org/pipermail/docs/2011-April/004159.html here's a tiny patch to add a missing parenthesis. ---------- assignee: docs at python components: Documentation files: capi_buffer_PyBuffer_FillContiguousStrides-py27.patch keywords: patch messages: 135938 nosy: docs at python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Missing parenthesis in c-api/buffer PyBuffer_FillContiguousStrides versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file21994/capi_buffer_PyBuffer_FillContiguousStrides-py27.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Fri May 13 20:12:22 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 13 May 2011 20:12:22 +0200 Subject: [docs] Python v2.7.1 documentation bug In-Reply-To: References: Message-ID: Hi Tomo, thanks for your report. On Sat, Apr 30, 2011 at 02:59, tomo cocoa wrote: > Hello > > I am a Japanese Pythonista and now belong to the document translating team. > > I found a subtle bug in the c-api/buffer.html. > > In the explanation about the PyBuffer_FillContiguousStrides function, > there is one open parenthesis but is no close parenthesis. > I guess that a close parenthesis should be inserted between words > "'F'" and "array". I've filed http://bugs.python.org/issue12072 to fix it. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri May 13 20:15:35 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 13 May 2011 18:15:35 +0000 Subject: [docs] [issue12043] Update shutil documentation In-Reply-To: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> Message-ID: <1305310535.78.0.662925446413.issue12043@psf.upfronthosting.co.za> Sandro Tosi added the comment: nope, from a quick glance at the docstrings text and what's on the ReST documentation - was I a bit too catastrophic? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 20:17:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 18:17:25 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305310645.41.0.556776675691.issue11948@psf.upfronthosting.co.za> ?ric Araujo added the comment: > First, I dislike 'This allows' on stylistic grounds Fully agreed, sir! > The whole paragraph is about sys.path, so it is not an hidden detail. It may be that I miss context; I don?t actually know whether the paragraph is only about sys.path or about module search in general. Apologies if my comments are only noise. This is my last proposal: ?After initialization, Python programs can modify sys.path to modify or replace the module search path (except for built-in modules)? If it?s redundant, then +1 to your earlier suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 20:18:16 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 May 2011 18:18:16 +0000 Subject: [docs] [issue12043] Update shutil documentation In-Reply-To: <1304967545.46.0.442679433989.issue12043@psf.upfronthosting.co.za> Message-ID: <1305310695.99.0.183830252872.issue12043@psf.upfronthosting.co.za> ?ric Araujo added the comment: No, it?s just the wording that made me think you were referring to other reports or to posts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 20:22:27 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 May 2011 18:22:27 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305310946.93.0.983093850381.issue11948@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sandro, thank you for sticking with this. Seemingly simples issues sometimes 'explode' a bit. Having reviewed the patch, I think the it is ready to be committed. ?ric: if you were to commit this and, in the process, wanted to change sys.path back to 'this module search path' ('this' instead of 'the' to refer back to the definition of sys.path just given), I would not object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 20:22:55 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 May 2011 18:22:55 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1305310975.88.0.906607429331.issue11948@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 13 21:10:33 2011 From: report at bugs.python.org (Jordan Stadler) Date: Fri, 13 May 2011 19:10:33 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1305313833.64.0.19458243623.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: I'll prepare the patch if davipo doesn't want to. I'm trying to become more comfortable with the patching process and this seems simple enough for me to handle. ---------- nosy: +jstadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 08:24:43 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 14 May 2011 06:24:43 +0000 Subject: [docs] [issue11979] Minor improvements to the Sockets readme: typos, wording and sphinx features usage In-Reply-To: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4081f326e46c by Ezio Melotti in branch '2.7': #11979: improve wording and markup in sockets howto. Patch by Xavier Morel. http://hg.python.org/cpython/rev/4081f326e46c New changeset 85b9ad8b219b by Ezio Melotti in branch '3.1': #11979: improve wording and markup in sockets howto. Patch by Xavier Morel. http://hg.python.org/cpython/rev/85b9ad8b219b New changeset bc251b65de1d by Ezio Melotti in branch '3.2': #11979: merge with 3.1. http://hg.python.org/cpython/rev/bc251b65de1d New changeset 4b122cac7ac5 by Ezio Melotti in branch 'default': #11979: merge with 3.2. http://hg.python.org/cpython/rev/4b122cac7ac5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 08:25:35 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 14 May 2011 06:25:35 +0000 Subject: [docs] [issue11979] Minor improvements to the Sockets readme: typos, wording and sphinx features usage In-Reply-To: <1304344252.29.0.0856006463682.issue11979@psf.upfronthosting.co.za> Message-ID: <1305354334.97.0.574146546969.issue11979@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patches! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 15:56:26 2011 From: report at bugs.python.org (Davide Rizzo) Date: Sat, 14 May 2011 13:56:26 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> New submission from Davide Rizzo : There are three sources of information for the descriptor protocol: - Data model reference (Doc/reference/datamodel.rst) - Descriptor HowTo guide (Doc/howto/descriptor.rst) - PEP 252 A developer who already knows descriptor tipically reads the first one: object.__get__(self, instance, owner) "... owner is always the owner class ..." Reading a bit further there are the ways a descriptor can be called, and the "direct call" is x.__get__(a). That is, without the third argument (owner) specified. The how-to definition is slightly different: descr.__get__(self, obj, type=None) --> value Here the arguments have different names ("type" shadowing the type bultin) and it seems to be implied that the third argument is optional. The ClassMethod example at the end of the document seems to confirm this: def __get__(self, obj, klass=None): (though another example doesn't). And the method contains an explicit check on klass being None. Also it could be confusing that through the examples in the same document many different names are used for the same argument (type, objtype, klass), and all different than the name used in the reference. Lastly the PEP is more explicit: __get__(): a function callable with one or two arguments. [...] When X is None, the optional second argument, T, should be meta-object. [...] When both X and T are specified ... One more quirk: the reference explains the distinction between data and non-data descriptors, though says nothing about __set__ raising AttributeError for read-only data descriptors. My proposal: - use the same names for __get__ arguments throughout the documentation (both the reference and the tutorial), e.g. __get__(self, instance, owner) - decide whether the third argument should be optional, or state the common usage in the reference, and fix accordingly the examples in the howto - explain data, non-data and read-only descriptors in the __set__ reference, or more simply, how the defintion of __set__ affects these things. ---------- assignee: docs at python components: Documentation messages: 135974 nosy: davide.rizzo, docs at python priority: normal severity: normal status: open title: Harmonizing descriptor protocol documentation versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 19:23:03 2011 From: report at bugs.python.org (Jordan Stadler) Date: Sat, 14 May 2011 17:23:03 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1305393783.13.0.71381645242.issue12042@psf.upfronthosting.co.za> Changes by Jordan Stadler : ---------- keywords: +patch Added file: http://bugs.python.org/file22002/issue12042_2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 19:24:10 2011 From: report at bugs.python.org (Jordan Stadler) Date: Sat, 14 May 2011 17:24:10 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1305393850.83.0.988673186904.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: Patch is up for 2.7, minor change in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From harish.kukreja at gmail.com Sat May 14 07:58:27 2011 From: harish.kukreja at gmail.com (Harish Kukreja) Date: Sat, 14 May 2011 01:58:27 -0400 Subject: [docs] Python 3.2 Tutorial: Class Attribute Lookups Message-ID: There seems to be an error in the first sentence of section 9.4, which currently starts as: "Data attributes override method attributes with the same name; ..." The following code serves as a counterexample: # beginning of code class Foo: spam = 'demo' def spam(self): pass class Bar: def spam(self): pass spam = 'demo' print('Foo.spam is of type: %s' % type(Foo.spam)) print('Bar.spam is of type: %s' % type(Bar.spam)) # end of code From urkera at gmail.com Sat May 14 23:26:05 2011 From: urkera at gmail.com (Abdullah Urker) Date: Sun, 15 May 2011 00:26:05 +0300 Subject: [docs] ScrolledText Destroying Bug Message-ID: Hi I am Abdullah ?RKER from Turkey. I am using Python and Tkinter for a while, but i have never used ScrolledText object until to night. It works great but when i try to destroy it i suprised because Text is destroyed but Scrollbar was still there. My os is Windows XP Service Pack 3, Python version is 2.7.1 and Tkinter.__version__ is "$Revision: 81008 $" Here is an example code: *from Tkinter import * from ScrolledText import ScrolledText root=Tk() button=Button(text="Remove Text!") button.pack() Text=ScrolledText() Text.pack() def remove(): Text.destroy() button.config(command=remove) root.mainloop()* -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon May 16 10:35:44 2011 From: report at bugs.python.org (Radomir Dopieralski) Date: Mon, 16 May 2011 08:35:44 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> New submission from Radomir Dopieralski : In the tutorial, at http://docs.python.org/tutorial/classes.html#private-variables you can read: ---- 9.6. Private Variables ?Private? instance variables that cannot be accessed except from inside an object don?t exist in Python. However, there is a convention that is followed by most Python code: a name prefixed with an underscore (e.g. _spam) should be treated as a non-public part of the API (whether it is a function, a method or a data member). It should be considered an implementation detail and subject to change without notice. Since there is a valid use-case for class-private members (namely to avoid name clashes of names with names defined by subclasses), there is limited support for such a mechanism, called name mangling. Any identifier of the form __spam (at least two leading underscores, at most one trailing underscore) is textually replaced with _classname__spam, where classname is the current class name with leading underscore(s) stripped. This mangling is done without regard to the syntactic position of the identifier, as long as it occurs within the definition of a class. Note that the mangling rules are designed mostly to avoid accidents; it still is possible to access or modify a variable that is considered private. This can even be useful in special circumstances, such as in the debugger. [...] ---- I think that this section doesn't stress enough how special the "__foo" syntax is and how rarely it should be used. If I was a programmer coming from Java to Python, I would start using "__foo" everywhere after reading this. I actually receive code written like that from programmers new to Python, and they point to that section of documentation when I ask why they did it. At minimum, I'd add a paragraph that warns about how name mangling makes the code hard to reuse, difficult to test and unpleasant to debug. ---------- assignee: docs at python components: Documentation messages: 136072 nosy: docs at python, sheep priority: normal severity: normal status: open title: Tutorial doesn't discourage name mangling type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 10:37:38 2011 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 16 May 2011 08:37:38 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305535058.55.0.727553983201.issue12086@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: docs at python -> lukasz.langa nosy: +lukasz.langa stage: -> needs patch versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 10:42:27 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 16 May 2011 08:42:27 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305535347.4.0.489008796507.issue12086@psf.upfronthosting.co.za> Georg Brandl added the comment: No warnings, please. See http://docs.python.org/documenting/style.html#affirmative-tone and related sections. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 10:52:19 2011 From: report at bugs.python.org (Tim Golden) Date: Mon, 16 May 2011 08:52:19 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305535939.44.0.271839785599.issue12086@psf.upfronthosting.co.za> Tim Golden added the comment: But at the least, the start of the para might be slightly reworded to something like: "If you specifically need to avoid name clashes with subclasses, there is limited support..." which avoids the phrase "Since there is a valid use-case for class-private members". ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 10:54:41 2011 From: report at bugs.python.org (Radomir Dopieralski) Date: Mon, 16 May 2011 08:54:41 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305536081.84.0.730354011027.issue12086@psf.upfronthosting.co.za> Radomir Dopieralski added the comment: "In the unlikely case that you specifically need to avoid name clashes with subclasses, there is limited support..." ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 11:34:19 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 16 May 2011 09:34:19 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305538459.87.0.21843464717.issue12086@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think the main problem here is that they are called "private" and people coming from other languages assume that the double underscore is the Python way to mark variables as private, whereas the appearance of being private is just a side effect of the name mangling. This part should IMHO focus on the name mangling, explaining what it is and what it's useful for, and mention clearly that this doesn't really make the variable "private", because it can still be accessed through the mangled name. The section could also mention that the word "private" here doesn't mean the same thing as in other language. I don't know if the "trust the programmer" philosophy found in Python is explained somewhere in the doc, but if not it could be added to the tutorial or the FAQ. ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 12:17:57 2011 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 16 May 2011 10:17:57 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305541077.16.0.720223678781.issue12086@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I'd like to see that section gone altogether. The tutorial is designed to be the first point of contact with the language. In that context name mangling is an obscure detail with an unlikely use case. If anything, the tutorial should simply state that private variables are by convention prepended with a single underscore. Maybe there's place for a separate short article which would nicely explain the philosophy behind the lack of an enforcing `private` modifier. The "we're all consenting adults here" stuff. Agreed with Ezio that "private" is in itself a poor name for what underscore (regardless whether a single one or two) really means. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 13:45:58 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 16 May 2011 11:45:58 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305546358.56.0.256593125955.issue12077@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 14:00:22 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 16 May 2011 12:00:22 +0000 Subject: [docs] [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1305547222.01.0.465758631111.issue9938@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW unittest had a similar issue and it's been solved adding an 'exit' argument to unittest.main() [0]. I think using an attribute here might be fine. The patch contains some trailing whitespace that should be removed, also it might be enough to name the attribute "exit_on_error". It should also include tests to check that the attribute is set with the correct default value and that it doesn't raise SystemExit when the attribute is False. [0]: http://docs.python.org/library/unittest.html#unittest.main ---------- nosy: +ezio.melotti versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 15:50:14 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 May 2011 13:50:14 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1305553814.33.0.339798433186.issue12028@psf.upfronthosting.co.za> STINNER Victor added the comment: @pitrou: What do you think Antoine? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 15:56:24 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 May 2011 13:56:24 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1305554184.8.0.622730726334.issue12028@psf.upfronthosting.co.za> STINNER Victor added the comment: The threading API changed in Python 3 with the PEP 3108, especially and issue #2875. Extract of the PEP: "thread [done] * People should use 'threading' instead. * Rename 'thread' to _thread. * Deprecate dummy_thread and rename _dummy_thread. * Move thread.get_ident over to threading. * Guido has previously supported the deprecation [13]." The issue was closed by the commit [7fe3a8648ce2], "Issue #2875: Rename thread to _thread and dummy_thread to _dummy_thread." ---------- nosy: +brett.cannon, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 15:59:01 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 16 May 2011 13:59:01 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1305554341.9.0.0247768970734.issue12028@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I think that threading._get_ident() is more reliable than > threading.current_thread().ident because Thread.ident can be None in > some cases. In which case can it be None? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 16:12:19 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 May 2011 14:12:19 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1305555139.51.0.921637009637.issue12028@psf.upfronthosting.co.za> STINNER Victor added the comment: > In which case can it be None? Oh, I misunderstood threading.py. current_thread().ident cannot be None. During the bootstrap of a thread, Thread._ident is None, but current_thread().ident is not None because current_thread() creates a dummy thread object having the right identifer. This dummy object is destroyed at soon as the Thread object is started (see Thread._bootstrap_inner). current_thread().ident is a little bit "suboptimal" because it gets the identifier of the thread, it reads the corresponding thread object, and then it gets the identifier of the thread object. def current_thread(): ... return _active[_get_ident()] ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 17:12:20 2011 From: report at bugs.python.org (=?utf-8?q?Ana_Sofia_Paix=C3=A3o?=) Date: Mon, 16 May 2011 15:12:20 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1305558740.36.0.111092862924.issue4966@psf.upfronthosting.co.za> Ana Sofia Paix?o added the comment: I was taking a look into the possibility of splitting this page into several pages, and wondered: could the contents of the Comparisons and the Boolean operations sections just be merged into Python Reference / Expressions, and then deleted from this page altogether? They are not even data types but operators, after all. ---------- nosy: +anasofiapaixao _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 17:38:33 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 16 May 2011 15:38:33 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1305560313.64.0.00447655181396.issue4966@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it should be OK. The stdtypes page could then mention type-specific behavior in the types' sections (e.g. <, <=, =>, > for sets) and link to the language reference for the general behavior. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon May 16 19:20:32 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 16 May 2011 19:20:32 +0200 Subject: [docs] ScrolledText Destroying Bug In-Reply-To: References: Message-ID: Hello Abdullah On Sat, May 14, 2011 at 23:26, Abdullah Urker wrote: > Hi I am Abdullah ?RKER from Turkey. I am using Python and Tkinter for a > while, but i have never used ScrolledText object until to night. It works > great but when i try to destroy it i suprised because Text is destroyed but > Scrollbar was still there. This mailing list is not about users support, but about bugs in the documentation of python. I encourage you to contact users support forum, like python-list [1] . [1] http://mail.python.org/mailman/listinfo/python-list Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon May 16 23:50:21 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 16 May 2011 21:50:21 +0000 Subject: [docs] [issue12092] Clarify sentence in tutorial In-Reply-To: <1305582621.21.0.962963966235.issue12092@psf.upfronthosting.co.za> Message-ID: <1305582621.21.0.962963966235.issue12092@psf.upfronthosting.co.za> New submission from Sandro Tosi : following up http://mail.python.org/pipermail/docs/2011-April/004161.html, it would be nice to have changeset 1811eb03ba00 applied in 2.7 (it's already there in 3.1, 3.2 and default). Added Georg to the nosy list since it's the author of the given cs. ---------- assignee: docs at python components: Documentation keywords: patch messages: 136128 nosy: docs at python, georg.brandl, sandro.tosi priority: normal severity: normal stage: commit review status: open title: Clarify sentence in tutorial versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon May 16 23:51:03 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 16 May 2011 23:51:03 +0200 Subject: [docs] 4.7.2. Keyword Arguments - Small Typo: 'sort()' -> 'sorted()' In-Reply-To: <308799.94592.qm@web112611.mail.gq1.yahoo.com> References: <308799.94592.qm@web112611.mail.gq1.yahoo.com> Message-ID: Hi Joe, On Sat, Apr 30, 2011 at 18:33, Joe Mirizio wrote: > From 4.7.2. Keyword Arguments: > " > def cheeseshop(kind, *arguments, **keywords): > print "-- Do you have any", kind, "?" > print "-- I'm sorry, we're all out of", kind > for arg in arguments: > print arg > print "-" * 40 > keys = sorted(keywords.keys()) > for kw in keys: > print kw, ":", keywords[kw] > > ... > > Note that the sort() method of the list of keyword argument names is > called before printing the contents of the keywords dictionary; if this is > not done, the order in which the arguments are printed is undefined. > " I've just opened http://bugs.python.org/issue12092 to track this. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 17 00:16:29 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 17 May 2011 00:16:29 +0200 Subject: [docs] minor bug in python documentation 2.7 - multiprocessing In-Reply-To: <4DB7D397.7050605@tuebingen.mpg.de> References: <4DB7D397.7050605@tuebingen.mpg.de> Message-ID: Hi Christian, thanks for your email. On Wed, Apr 27, 2011 at 10:28, Christian Herdtweck wrote: > In the description of Pipe the docu says: > If duplex is False then the pipe is unidirectional: conn1 can only be used > for receiving messages and conn2 can only be used for sending messages. > > which is exactly the other way round as used in the the example on the same > page further down, where the first connection sends and the second receives: >>>> from multiprocessing import Pipe >>>> a, b = Pipe() >>>> a.send([1, 'hello', None]) >>>> b.recv() > > ?I do not know which one is correct since True is the default value for duplex, in this case both connections can send&receive: ./python Python 2.7.1+ (2.7:a56cd7aeac5e+, Mar 29 2011, 00:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing import Pipe >>> a, b = Pipe() >>> a.send([1, 'hello', None]) >>> b.send([2, 'spam', True]) >>> a.recv() [2, 'spam', True] >>> b.recv() [1, 'hello', None] >>> while passing explictly False to Pipe(): >>> a, b = Pipe(False) >>> a.send([1, 'hello', None]) Traceback (most recent call last): File "", line 1, in IOError: connection is read-only >>> b.send([2, 'spam', True]) >>> a.recv() [2, 'spam', True] >>> b.recv() Traceback (most recent call last): File "", line 1, in IOError: connection is write-only >>> Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue May 17 00:36:11 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 16 May 2011 22:36:11 +0000 Subject: [docs] [issue12093] Typo in struct unpacking example In-Reply-To: <1305585371.59.0.443162933344.issue12093@psf.upfronthosting.co.za> Message-ID: <1305585371.59.0.443162933344.issue12093@psf.upfronthosting.co.za> New submission from Sandro Tosi : following up http://mail.python.org/pipermail/docs/2011-April/004154.html and what was done in 1de718a31004, here's a tiny patch to correct that typo in 2.7 too. ---------- assignee: docs at python components: Documentation files: struct_unpack_record.patch keywords: patch messages: 136129 nosy: docs at python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Typo in struct unpacking example versions: Python 2.7 Added file: http://bugs.python.org/file22011/struct_unpack_record.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue May 17 00:36:54 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 17 May 2011 00:36:54 +0200 Subject: [docs] A minor bug in code examples In-Reply-To: References: Message-ID: Hi Yukun, On Wed, Apr 27, 2011 at 07:19, Yukun Guo wrote: > @ http://docs.python.org/library/struct.html#examples > > - ? ? >>> Student._make(unpack('<10sHHb', s)) > + ? ?>>> Student._make(unpack('<10sHHb', record)) I've filed http://bugs.python.org/issue12093 to track it. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue May 17 04:04:17 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 May 2011 02:04:17 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305597857.41.0.768945573971.issue12086@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: lukasz.langa -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:06:51 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 May 2011 02:06:51 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305598011.85.0.540799690862.issue12086@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a venerable section of the tutorial that has been exposed to many, many readers and AFAICT it has never caused a problem. So, I see no need to make a change to it. Also as Georg points out, the docs (especially the tutorial) are not about discouragement, they are about empowerment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:08:01 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 May 2011 02:08:01 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305598081.5.0.789513454512.issue12077@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:12:08 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 May 2011 02:12:08 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1305598328.51.0.552926336585.issue12028@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:18:43 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 17 May 2011 02:18:43 +0000 Subject: [docs] [issue12093] Typo in struct unpacking example In-Reply-To: <1305585371.59.0.443162933344.issue12093@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 874309ce6e62 by Ezio Melotti in branch '2.7': #12093: fix typo in struct doc. Patch by Sandro Tosi. http://hg.python.org/cpython/rev/874309ce6e62 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:19:55 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 17 May 2011 02:19:55 +0000 Subject: [docs] [issue12093] Typo in struct unpacking example In-Reply-To: <1305585371.59.0.443162933344.issue12093@psf.upfronthosting.co.za> Message-ID: <1305598795.04.0.662260755463.issue12093@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:39:34 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 17 May 2011 02:39:34 +0000 Subject: [docs] [issue12092] Clarify sentence in tutorial In-Reply-To: <1305582621.21.0.962963966235.issue12092@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c449d3c3e0da by Ezio Melotti in branch '2.7': #12092: backport rephrasing of a paragraph in the tutorial. http://hg.python.org/cpython/rev/c449d3c3e0da ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 04:40:11 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 17 May 2011 02:40:11 +0000 Subject: [docs] [issue12092] Clarify sentence in tutorial In-Reply-To: <1305582621.21.0.962963966235.issue12092@psf.upfronthosting.co.za> Message-ID: <1305600011.3.0.869093001254.issue12092@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 07:16:58 2011 From: report at bugs.python.org (Daniel Urban) Date: Tue, 17 May 2011 05:16:58 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305609418.55.0.471210019176.issue12077@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 11:16:50 2011 From: report at bugs.python.org (Radomir Dopieralski) Date: Tue, 17 May 2011 09:16:50 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305623810.06.0.242144878193.issue12086@psf.upfronthosting.co.za> Radomir Dopieralski added the comment: I am reporting this specifically because I just had two independent cases of people who submitted code that had almost all methods name-mangled (within 2 weeks), and who then pointed to that section of the tutorial as justification. I have a hard time convincing them that it is a bad idea, as I have to work against the official documentation here. I agree that the language and library references should explain the mechanics behind the language in a neutral and empowering way. But I think that tutorial shouldn't tell people to write horrible code. Perhaps it would suffice if the tutorial didn't call this "private methods"? A more descriptive and accurate section name, such as "name mangling" or "avoiding name clashes" could help a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 12:33:46 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 17 May 2011 10:33:46 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1305628426.66.0.0687617512452.issue12086@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW that section used to be called "Private variables through name mangling" back in 1.5, and started by saying "There is now limited support for class-private identifiers.". PEP8 [0] also talks about the name mangling in several places, and carefully avoids the use of "private": """ To avoid name clashes with subclasses, use two leading underscores to invoke Python's name mangling rules. Python mangles these names with the class name: if class Foo has an attribute named __a, it cannot be accessed by Foo.__a. (An insistent user could still gain access by calling Foo._Foo__a.) Generally, double leading underscores should be used only to avoid name conflicts with attributes in classes designed to be subclassed. """ And it even includes the following two notes: """ We don't use the term "private" here, since no attribute is really private in Python (without a generally unnecessary amount of work). """ """ Not everyone likes name mangling. Try to balance the need to avoid accidental name clashes with potential use by advanced callers. """ [0]: http://www.python.org/dev/peps/pep-0008/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 14:32:16 2011 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 17 May 2011 12:32:16 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za> Message-ID: <1305635536.6.0.686354490068.issue9811@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've filed #9451707 about this in Apple's bug tracker. BTW. I don't think this is a platform bug, neither the manpage nor the unix specification at specify what happens when you use an undocumented format specifier. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 16:06:27 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 May 2011 14:06:27 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za> Message-ID: <1305641187.84.0.87762230449.issue9811@psf.upfronthosting.co.za> R. David Murray added the comment: Right, that's why I said "if it is a bug" :) FreeBSD has the same behavior, so I'd actually prefer that Apple not "fix" this. It would be nice if FreeBSD did and Apple adopted it, though, since only dropping the % is the least intuitive approach to handling unknown codes I can think of. Is Apple tracking FreeBSD development at all these days, or are they a true fork now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 16:52:48 2011 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 17 May 2011 14:52:48 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za> Message-ID: <1305643968.0.0.963385463942.issue9811@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm not sure if Apple's tracking FreeBSD, but they at the very least heavily borrow code (see for libc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 20:17:20 2011 From: report at bugs.python.org (Jay Parlar) Date: Tue, 17 May 2011 18:17:20 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305656240.02.0.23832057026.issue12077@psf.upfronthosting.co.za> Jay Parlar added the comment: While working on this, I believe it would also make sense to remove all instances of the terms "new-style" and "old-style" from the Descriptor HowTo (and wherever else they might be present) It still makes sense for them to be present in the 2.7 documentation, but they're concepts that don't exist in 3.x ---------- nosy: +Jay.Parlar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 17 23:23:48 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Tue, 17 May 2011 21:23:48 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za> Message-ID: <1305667428.05.0.739774828841.issue9811@psf.upfronthosting.co.za> Santoso Wijaya added the comment: `strftime` does not, indeed, seem to define what behaviour it is supposed to do when given non-supported format characters. Under Windows, in fact, it will crash the runtime (see: issue #10762). ---------- nosy: +santa4nt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 18 09:53:22 2011 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 18 May 2011 07:53:22 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1305667428.05.0.739774828841.issue9811@psf.upfronthosting.co.za> Message-ID: <4DD37AEE.5000409@egenix.com> Marc-Andre Lemburg added the comment: Santoso Wijaya wrote: > > Santoso Wijaya added the comment: > > `strftime` does not, indeed, seem to define what behaviour it is supposed to do when given non-supported format characters. Under Windows, in fact, it will crash the runtime (see: issue #10762). According to POSIX, it is defined to be undefined: """ If a conversion specification does not correspond to any of the above, the behavior is undefined. """ Of course, crashing the runtime is not a good way to interpret this ;-) ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 18 10:22:17 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Wed, 18 May 2011 08:22:17 +0000 Subject: [docs] [issue9811] strftime strips '%' from unknown format codes on OS X In-Reply-To: <1284026345.38.0.190320909092.issue9811@psf.upfronthosting.co.za> Message-ID: <1305706936.89.0.714627403597.issue9811@psf.upfronthosting.co.za> Santoso Wijaya added the comment: Yeah, I meant undefined. I looked that up when writing a patch for issue #10762. Correction: It *used to* crash on Windows, before the patch was applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 18 13:01:25 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 18 May 2011 11:01:25 +0000 Subject: [docs] [issue12103] Documentation of open() does not claim 'e' support in mode string In-Reply-To: <1305716485.42.0.643130250278.issue12103@psf.upfronthosting.co.za> Message-ID: <1305716485.42.0.643130250278.issue12103@psf.upfronthosting.co.za> New submission from ???? ????????? : open() and friends (like temporaryfile) does not document 'e' letter in second arguement. At least on Linux, it opens file with O_CLOEXEC. Not sure under Windows. Also, there are other interesting letters (man -a fopen), like: c (since glibc 2.3.3) Do not make the open operation, or subsequent read and write operations, thread cancellation points. e (since glibc 2.7) Open the file with the O_CLOEXEC flag. See open(2) for more information. m (since glibc 2.3) Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is only attempted for a file opened for reading. x Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen(). ---------- assignee: docs at python components: Documentation messages: 136223 nosy: docs at python, mmarkk priority: normal severity: normal status: open title: Documentation of open() does not claim 'e' support in mode string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 18 13:01:37 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 18 May 2011 11:01:37 +0000 Subject: [docs] [issue12103] Documentation of open() does not claim 'e' support in mode string In-Reply-To: <1305716485.42.0.643130250278.issue12103@psf.upfronthosting.co.za> Message-ID: <1305716497.12.0.159848069587.issue12103@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 18 13:16:08 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 May 2011 11:16:08 +0000 Subject: [docs] [issue12103] Documentation of open() does not claim 'e' support in mode string In-Reply-To: <1305716485.42.0.643130250278.issue12103@psf.upfronthosting.co.za> Message-ID: <1305717367.97.0.979677541207.issue12103@psf.upfronthosting.co.za> STINNER Victor added the comment: c, e, m and x flags are specific to the GNU libc. Python 2 does basically pass the mode to fopen() unmodified (there is one exception, the U flag). fopen() of Visual C++ 2005 has other flags: c Enable the commit flag for the associated filename so that the contents of the file buffer are written directly to disk if either fflush or _flushall is called. n Reset the commit flag for the associated filename to "no-commit." This is the default. It also overrides the global commit flag if you link your program with COMMODE.OBJ. The global commit flag default is "no-commit" unless you explicitly link your program with COMMODE.OBJ (see Link Options). N Specifies that the file is not inherited by child processes. S Specifies that caching is optimized for, but not restricted to, sequential access from disk. R Specifies that caching is optimized for, but not restricted to, random access from disk. T Specifies a file as temporary. If possible, it is not flushed to disk. D Specifies a file as temporary. It is deleted when the last file pointer is closed. ccs=ENCODING Specifies the coded character set to use (UTF-8, UTF-16LE, or UNICODE) for this file. Leave unspecified if you want ANSI encoding. This option is available in Visual C++ 2005 and later. http://msdn.microsoft.com/en-us/library/yeby3zcb(v=vs.80).aspx I don't think that non standard modes should be documented in Python doc, but we may add links to specific documentations like the GNU libc and Microsoft fopen(). -- This issue is specific to Python 2, Python 3 doesn't use fopen() anymore. ---------- nosy: +haypo versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 19 06:02:39 2011 From: report at bugs.python.org (Tom McDermott) Date: Thu, 19 May 2011 04:02:39 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1305777759.02.0.771466394321.issue11643@psf.upfronthosting.co.za> Tom McDermott added the comment: Things are slightly worse than this issue suggests: the Sphinx formatting string |version| has leaked into the html docs in a few places (library/site.html for example). The difficulty is that Sphinx isn't expanding the |version| variable inside :file: markup. ---------- nosy: +sponster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 19 10:25:09 2011 From: report at bugs.python.org (Martin von Gagern) Date: Thu, 19 May 2011 08:25:09 +0000 Subject: [docs] [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1305793509.3.0.591392623249.issue4934@psf.upfronthosting.co.za> Changes by Martin von Gagern : ---------- nosy: +gagern _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 19 16:16:48 2011 From: report at bugs.python.org (Jay Parlar) Date: Thu, 19 May 2011 14:16:48 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1305814608.73.0.686269989384.issue12077@psf.upfronthosting.co.za> Jay Parlar added the comment: Another problem is that the examples and text in the section "Functions and Methods" is no longer correct in 3.x. Namely the the references to unbound methods, and the example showing an unbound method being returned when accessing a method of a class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 20 02:23:52 2011 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 20 May 2011 00:23:52 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : http://docs.python.org/py3k/howto/sockets.html#non-blocking-sockets "And if you put a socket in more than one input list, it will only be (at most) in one output list." >>> import socket >>> s = socket.socket() >>> s.connect(('localhost', 22)) >>> import select >>> select.select([s], [s], []) ([], [], []) >>> ---------- assignee: docs at python components: Documentation messages: 136350 nosy: docs at python, exarkun priority: normal severity: normal status: open title: incorrect select documentation type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 20 14:07:14 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 20 May 2011 12:07:14 +0000 Subject: [docs] [issue12072] Missing parenthesis in c-api/buffer PyBuffer_FillContiguousStrides In-Reply-To: <1305310307.77.0.353459071063.issue12072@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6a546bf5252f by Ezio Melotti in branch '2.7': #12072: add missing parenthesis in the doc. Patch by Sandro Tosi. http://hg.python.org/cpython/rev/6a546bf5252f New changeset 68134a384c73 by Ezio Melotti in branch '3.1': #12072: add missing parenthesis in the doc. Patch by Sandro Tosi. http://hg.python.org/cpython/rev/68134a384c73 New changeset 68dd623f77f4 by Ezio Melotti in branch '3.2': #12072: merge with 3.1. http://hg.python.org/cpython/rev/68dd623f77f4 New changeset d6f899ae4ca0 by Ezio Melotti in branch 'default': #12072: merge with 3.2. http://hg.python.org/cpython/rev/d6f899ae4ca0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 20 14:07:54 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 20 May 2011 12:07:54 +0000 Subject: [docs] [issue12072] Missing parenthesis in c-api/buffer PyBuffer_FillContiguousStrides In-Reply-To: <1305310307.77.0.353459071063.issue12072@psf.upfronthosting.co.za> Message-ID: <1305893274.3.0.617864159971.issue12072@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 20 17:03:57 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 20 May 2011 15:03:57 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1305903837.17.0.460189230777.issue11643@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 01:32:08 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 20 May 2011 23:32:08 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305934328.92.0.534516907511.issue12126@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The socket HOWTO looks so stupid, obscure and badly written that it should IMO be deleted. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 01:33:42 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 20 May 2011 23:33:42 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305934422.99.0.365131543543.issue12126@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 08:46:03 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 21 May 2011 06:46:03 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305960363.68.0.950528147858.issue12126@psf.upfronthosting.co.za> Eli Bendersky added the comment: Antoine, can you be more specific? I recall finding it quite useful when first learning Python. Perhaps it can be improved in a few specific places, but overall I don't think it's a bad document. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 09:22:37 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 21 May 2011 07:22:37 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305962557.4.0.524843733797.issue12126@psf.upfronthosting.co.za> Eli Bendersky added the comment: This issue Jean-Paul raises seems to be a plain error. select() certainly can return that some given socket is both readable and writable (this is explicitly discussed in Steven's APitUE $14.5), and I see no evidence in the implementation of Python's selectmodule.c that it somehow violates the output of system's select() to behave otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 09:23:57 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 21 May 2011 07:23:57 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1305962636.92.0.145851370456.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Can this issue be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 12:12:40 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 21 May 2011 10:12:40 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1305972760.26.0.61785399458.issue12003@psf.upfronthosting.co.za> Eli Bendersky added the comment: I think that if this note should stay in the docs at all, it should be as concise as possible, so I like Terry's -1+2*(step<0) option. I also tested it on a few more inputs and it works fine. If there are no objections, I can commit it to python 2.7 docs in a couple of days. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 13:01:27 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 21 May 2011 11:01:27 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305975687.75.0.779081458321.issue12126@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, my main issue with this document is that it doesn't seem to have a well-defined destination: - people who know sockets won't learn anything from it - but people who don't know sockets will probably find it clear as mud (for example, what's an "INET" or "STREAM" socket? what's "select"?) I have other issues, such as the style/tone it's written in. I'm sure the author had fun writing it but it doesn't fit well with the rest of the documentation. Also, the author gives a lot of "advice" without really giving an example ("if somewhere in those input lists of sockets is one which has died a nasty death, the select will fail" -> is that really true? what is a "nasty death" and how is that supposed to happen? couldn't the author have put a 3-line example to demonstrate this supposed drawback and how it manifests?). And, finally, many statements seem arbitrary ("There?s no question that the fastest sockets code uses non-blocking sockets and select to multiplex them") or plain wrong ("threading support in Unixes varies both in API and quality. So the normal Unix solution is to fork a subprocess to deal with each connection"). I don't think giving misleading advice to users is really a good idea. And suggesting beginners they use non-blocking sockets without even *showing* how (or pointing to asyncore or Twisted) is a very bad idea. select() is not enough, you still have to be prepared to get EAGAIN or EWOULDBLOCK when calling recv() or send() (i.e. select() can give false positives). Oh and I think it's obsolete too, because the "class mysocket" concatenates the output of recv() with a str rather than a bytes object. Not to mention that features of the "class mysocket" can be had using a buffered socket.makefile() instead of writing custom code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 14:59:04 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 21 May 2011 12:59:04 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1305982744.62.0.145800504942.issue11015@psf.upfronthosting.co.za> Ezio Melotti added the comment: There are still functions that are not documented, so I think this should stay open until we documented them (unless they shouldn't be documented -- in that case it can be closed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 15:57:27 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 21 May 2011 13:57:27 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1305986247.17.0.544389895162.issue12134@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is indeed the case. And the solution is obvious: call dumps() and then write() the result yourself. If dump() used _one_shot=True, it would defeat the purpose of minimizing memory consumption by not buffering the whole result. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 16:59:48 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 21 May 2011 14:59:48 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1305989988.04.0.917088482418.issue12126@psf.upfronthosting.co.za> Eli Bendersky added the comment: It makes sense to bring this up for discussion on pydev, then. Perhaps it will be decided to remove this document from the official documentation, possibly relegating it to the Wiki. In the meantime, is there an objection to removing the incorrect statement Jean-Paul mentioned from the doc? It's obviously incorrect both in theory and practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 21 17:07:50 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 21 May 2011 15:07:50 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305989988.04.0.917088482418.issue12126@psf.upfronthosting.co.za> Message-ID: <1305990465.31647.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > It makes sense to bring this up for discussion on pydev, then. Ok, done. > In the meantime, is there an objection to removing the incorrect > statement Jean-Paul mentioned from the doc? Well, no. ---------- _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Sun May 22 05:44:34 2011 From: eliben at gmail.com (Eli Bendersky) Date: Sun, 22 May 2011 06:44:34 +0300 Subject: [docs] Bug in re example In-Reply-To: References: Message-ID: On Wed, May 11, 2011 at 20:36, Herman L. Jackson wrote: > Hi, > > When running the tokenize example at the bottom of http://docs.python.org/py3k/library/re.html#match-objects > I received the following error: > > ? ?Traceback (most recent call last): > ? ? ?File "", line 1, in > ? ? ?File "", line 23, in tokenize > ? ?NameError: global name 'val' is not defined > > The problem is that val is never assigned to before this line: > > ? ?if typ == 'ID' and val in keywords: > > Here is a suggested rewrite of the that section: > > ? ?elif typ != 'SKIP': > ? ? ? ?val = mo.group(typ) > ? ? ? ?if typ == 'ID' and val in keywords: > ? ? ? ? ? ?typ = val > ? ? ? ?yield Token(typ, val, line, mo.start()-line_start) > > Attached is a complete working example. > Herman, thank you for the report. I've opened Issue 12146 in the Python tracker (http://bugs.python.org/issue12146) to track this. Eli From report at bugs.python.org Sun May 22 05:49:22 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 22 May 2011 03:49:22 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c0a3e17e677f by Eli Bendersky in branch '2.7': Issue 12126: removing incorrect claim about return value of select http://hg.python.org/cpython/rev/c0a3e17e677f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 06:00:12 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 22 May 2011 04:00:12 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset ca4d9ccb6894 by Eli Bendersky in branch '3.1': Issue 12126: removing incorrect claim about return value of select http://hg.python.org/cpython/rev/ca4d9ccb6894 New changeset c26d551b5ff6 by Eli Bendersky in branch '3.2': Issue 12126: removing incorrect claim about return value of select http://hg.python.org/cpython/rev/c26d551b5ff6 New changeset 53242ca6df28 by Eli Bendersky in branch 'default': Issue 12126: removing incorrect claim about return value of select http://hg.python.org/cpython/rev/53242ca6df28 ---------- _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Sun May 22 06:25:48 2011 From: eliben at gmail.com (Eli Bendersky) Date: Sun, 22 May 2011 07:25:48 +0300 Subject: [docs] Bug in re example In-Reply-To: References: Message-ID: > > Herman, thank you for the report. I've opened Issue 12146 in the > Python tracker (http://bugs.python.org/issue12146) to track this. > > Eli > And I've just noticed these were already fixed by Georg, committed in revisions 538a6b23b18f and 12a2c1085621 Eli From report at bugs.python.org Sun May 22 12:09:26 2011 From: report at bugs.python.org (ekorn) Date: Sun, 22 May 2011 10:09:26 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> New submission from ekorn : Combining multiple option flags to doctest.testmod(optionflags=...) requires the bitwise or operator |, not plain "or". I therefore suggest rewording "or-ing together individual option flags." to "or-ing together individual option flags, using the 'bitwise or' operator |.", perhaps with a link to http://docs.python.org/reference/expressions.html#binary-bitwise-operations. Example: """ Doctest option flags must be or-ed together with '|', not 'or'. >>> print "A B C" A B... """ import doctest print "Combining option flags using bitwise '|'..." doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS) print "Combining option flags using logical 'or'..." doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE or doctest.ELLIPSIS) ---------- assignee: docs at python components: Documentation messages: 136509 nosy: docs at python, ekorn priority: normal severity: normal status: open title: Clarify "or-ing together" doctest option flags versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 14:54:52 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 22 May 2011 12:54:52 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306068892.92.0.417359408197.issue12148@psf.upfronthosting.co.za> R. David Murray added the comment: I think adding the word 'bitwise' in front of "or'ed" and linking it to that section would be sufficient. ---------- nosy: +r.david.murray versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 15:58:59 2011 From: report at bugs.python.org (STINNER Victor) Date: Sun, 22 May 2011 13:58:59 +0000 Subject: [docs] [issue12103] Documentation of open() does not claim 'e' support in mode string In-Reply-To: <1305716485.42.0.643130250278.issue12103@psf.upfronthosting.co.za> Message-ID: <1306072739.84.0.96987271517.issue12103@psf.upfronthosting.co.za> STINNER Victor added the comment: Issue #12105 adds os.O_CLOEXEC flag, so we will be able to write open(os.open(filename, os.O_RDONLY|os.O_CLOEXEC)). Do you want to work on a doc patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 19:23:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 22 May 2011 17:23:32 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1306085012.17.0.712090158881.issue12003@psf.upfronthosting.co.za> ?ric Araujo added the comment: The docs should value readability over conciseness IMHO; the examples here with seven operations in a row are a bit scary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 19:35:36 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 22 May 2011 17:35:36 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1306085736.38.0.247344490602.issue12003@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric, I'm not sure that the note is necessary at all, but once it's there, it should value *correctness* over conciseness and readability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 22 22:59:11 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 22 May 2011 20:59:11 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1306097950.99.0.678400368697.issue12003@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Given that the note is already gone* as obsolete in 3.x, I think a minimal maintenance fix for correctness should be fine for 2.7. * It is replaced, in essence, by "Ranges containing absolute values larger than sys.maxsize are permitted but some features (such as len()) will raise OverflowError." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 05:10:53 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 23 May 2011 03:10:53 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 76e5fe8e21fd by Eli Bendersky in branch '2.7': Issue 12003: fixing error in xrange alternative sample http://hg.python.org/cpython/rev/76e5fe8e21fd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 05:11:31 2011 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 23 May 2011 03:11:31 +0000 Subject: [docs] [issue12003] documentation: alternate version of xrange seems to fail. In-Reply-To: <1304546925.26.0.129100386248.issue12003@psf.upfronthosting.co.za> Message-ID: <1306120290.98.0.434155813819.issue12003@psf.upfronthosting.co.za> Eli Bendersky added the comment: Agreed. Fix committed & issue closed. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 05:12:45 2011 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 23 May 2011 03:12:45 +0000 Subject: [docs] [issue12126] incorrect select documentation In-Reply-To: <1305851032.27.0.6340611371.issue12126@psf.upfronthosting.co.za> Message-ID: <1306120365.81.0.295594612203.issue12126@psf.upfronthosting.co.za> Eli Bendersky added the comment: Closing this issue, since it specifically refers to the select error which was fixed. Tracking the removal of the sockets howto document can be done elsewhere. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 06:02:43 2011 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 23 May 2011 04:02:43 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1306123363.31.0.164688469.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Ezio, you're right, there are still a lot of undocumented symbols (functions, classes, globals). I compiled a list of those I could not find in the .rst docs, excluding ones that are only used in regrtest.py itself: ------------------------------------------ get_attribute record_original_stdout/get_original_stdout unload unlink rmtree make_legacy_pyc IPV6_ENABLED TESTFN_ENCODED TESTFN_UNENCODABLE sortdict check_syntax_error open_urlresource CleanImport DirsOnSysPath transient_internet captured_output captured_stderr gc_collect python_is_optimized set_memlimit bigmemtest precisionbigmemtest bigaddrspacetest requires_resource cpython_only impl_detail check_impl_detail no_tracing refcount_test modules_setup / modules_cleanup threading_setup / threading_cleanup reap_threads reap_children swap_attr swap_item strip_python_stderr TestHandler Matcher patch ------------------------------------------ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 12:22:31 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 May 2011 10:22:31 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> New submission from STINNER Victor : The queue doc contains the following example: ------------------ def worker(): while True: item = q.get() do_work(item) q.task_done() q = Queue() for i in range(num_worker_threads): t = Thread(target=worker) t.daemon = True t.start() for item in source(): q.put(item) q.join() # block until all tasks are done ------------------ http://docs.python.org/library/queue.html It doesn't define do_work(), num_worker_threads or do_work(), but my concern is that it doesn't stop worker threads. I consider "t.daemon = True" as an hack to not care about stopping threads. The example should pass a special value to each worker to stop it. For example: while True: job = queue.get() if job is None: break audio.play(*job) queue.task_done() Main thread: ... threads = [] for i in range(num_worker_threads): t = Thread(target=worker) threads.append(t) t.start() ... for i in range(num_worker_threads): queue.put(None) queue.join() for thread in threads: thread.join() ---------- assignee: docs at python components: Documentation messages: 136601 nosy: docs at python, haypo, pitrou priority: normal severity: normal status: open title: queue example doesn't stop worker threads versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 12:49:17 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 23 May 2011 10:49:17 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306147757.55.0.0253320030556.issue12155@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 13:32:37 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 11:32:37 +0000 Subject: [docs] [issue4600] __class__ assignment: new-style? heap? == confusing In-Reply-To: <1228771522.72.0.688992536212.issue4600@psf.upfronthosting.co.za> Message-ID: <1306150357.55.0.556430055423.issue4600@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.3 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 15:15:47 2011 From: report at bugs.python.org (Sye van der Veen) Date: Mon, 23 May 2011 13:15:47 +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: <1306156547.05.0.782914193562.issue10224@psf.upfronthosting.co.za> Sye van der Veen added the comment: I ran smack into this while setting up my Doc build for the first time. In trying to fix my build problems, it took me about an hour to find that this was a known issue. I've attached a patch to warn others of the issue, in the documentation and the build itself. Also, I've updated the version of Sphinx in building.rst, and made a note reminding others to do the same. I've only tested this patch on Windows 7. ---------- keywords: +patch nosy: +syeberman Added file: http://bugs.python.org/file22080/Issue10224Warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 15:57:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 13:57:45 +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: <1306159065.28.0.119945332401.issue10224@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t see how the comment ?As such, you will need to specify PYTHON explicitly? logically follows from the fact that Python 2.x is required. IMO, building the docs require Python 2.x, so you?ll need a ?python? executable on your PATH that is 2.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:15:08 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 14:15:08 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306160108.62.0.9577988039.issue12134@psf.upfronthosting.co.za> ?ric Araujo added the comment: I believe Antoine is saying ?works as intended?, i.e. not a bug. I?m not sure it?s worth a doc change. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:22:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 14:22:34 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306160554.36.0.693145042449.issue12148@psf.upfronthosting.co.za> ?ric Araujo added the comment: As a non-native speaker, I found constructs such as ?OR-ed? or ?syncing? a bit non-obvious when I started reading docs. +1 on adding ?bitwise?, +1 on changing to ?combined with the | operator?. (Yes, this is an or-ed vote.) ---------- nosy: +eric.araujo versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:31:16 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 14:31:16 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc and make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1306161076.49.0.333414043514.issue12028@psf.upfronthosting.co.za> ?ric Araujo added the comment: I find it strange that you propose to make a function public and remove its doc :) Is a negative missing in the bug title? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:32:04 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 14:32:04 +0000 Subject: [docs] [issue12086] Tutorial doesn't discourage name mangling In-Reply-To: <1305534944.68.0.723553568142.issue12086@psf.upfronthosting.co.za> Message-ID: <1306161124.51.0.0902380282711.issue12086@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:32:40 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 May 2011 14:32:40 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc or make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1306161160.88.0.241390469157.issue12028@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: threading._get_ident(): remove it in the doc and make it public -> threading._get_ident(): remove it in the doc or make it public _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 16:41:31 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 14:41:31 +0000 Subject: [docs] [issue12077] Harmonizing descriptor protocol documentation In-Reply-To: <1305381385.94.0.81554539251.issue12077@psf.upfronthosting.co.za> Message-ID: <1306161691.52.0.424434469553.issue12077@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 17:02:48 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 15:02:48 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306162968.19.0.566326474295.issue12042@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not sure historical whatsnew documents get fixes. As long as the PEPs and docs get fixes, the whatsnew can stay as they are. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 18:24:42 2011 From: report at bugs.python.org (Davi Post) Date: Mon, 23 May 2011 16:24:42 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306167882.04.0.506124485238.issue12042@psf.upfronthosting.co.za> Davi Post added the comment: The What's New docs are the place to find information on changes between versions. Upgrading to 2.7 from 2.5, I needed to read the 2.6 and 2.7 What's New docs to learn what changes I should be aware of. I hope errors in these docs will be fixed, at least for a few versions back. (This particular fix is not so important, but I'm trying to practice the habit of at least reporting problems I see, to make a contribution to Python.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 18:34:24 2011 From: report at bugs.python.org (Jordan Stadler) Date: Mon, 23 May 2011 16:34:24 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306168464.53.0.580014359267.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: Alright, should it be closed if we aren't going to touch it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 18:54:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 May 2011 16:54:38 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306169678.37.0.0332580116632.issue12042@psf.upfronthosting.co.za> ?ric Araujo added the comment: Let?s fix it in the open branches. ---------- versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 23 21:51:07 2011 From: report at bugs.python.org (poq) Date: Mon, 23 May 2011 19:51:07 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306180267.82.0.409919529805.issue12134@psf.upfronthosting.co.za> poq added the comment: Alright. I wouldn't mind a little note in the docs; I certainly did not expect that these two functions would perform so differently. Would it be very difficult though to add buffering support the C encoder? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 00:06:58 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 23 May 2011 22:06:58 +0000 Subject: [docs] [issue10994] implementation details in sys module In-Reply-To: <1295876620.3.0.027428786588.issue10994@psf.upfronthosting.co.za> Message-ID: <1306188417.88.0.664662926829.issue10994@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The __sizeof__ special attribute shows up in dir(object) but appears not to be documented other than with >>> help(object.__sizeof__) Help on method_descriptor: __sizeof__(...) __sizeof__() -> size of object in memory, in bytes Should it have an entry in Lib 4.12. Special Attributes? object.__sizeof__ A method used by sys.getsizeof. It should then show up in the index (missing now) and point people to sys.getsizeof. Looking further, I see that it is mentioned but not indexed in the sys.getsizeof entry. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 02:07:37 2011 From: report at bugs.python.org (Seth Troisi) Date: Tue, 24 May 2011 00:07:37 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> New submission from Seth Troisi : It would be nice to clarify re documentation on how to use \number. current documentation lists three half examples: "(.+) \1 matches 'the the' or '55 55', but not 'the end' (note the space after the group)." This is rather confusing (at least to me) as it might be assumed that re.search("(.+) \1", "the the") would return a match, which it does not. A better example would be re.search("(\w+) \\1", "the the") which does match. the other confusing portion is the requirement of the second "\" to make it match. I would think that a quick example below the text would help. >>> re.search("(\w+) \\1", "can you do the can can?") # \\1 matches the second can at the end of the sentence <_sre.SRE_Match object at ...> This is my first python issue and if I have misfiled or left out some information please tell me how to proceed. ---------- assignee: docs at python components: Documentation messages: 136708 nosy: Seth.Troisi, docs at python priority: normal severity: normal status: open title: Documentation about re \number type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 02:12:32 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 24 May 2011 00:12:32 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306195952.61.0.713619853072.issue12162@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 02:54:15 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 24 May 2011 00:54:15 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306198455.45.0.282867243316.issue12162@psf.upfronthosting.co.za> R. David Murray added the comment: Read the description of strings and raw strings at the top of the re documentation for the answer to your question about \\. It would probably be better if the example regular expression was written r'(.+) \1' instead of as a bare expression as it is now. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 03:08:33 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 May 2011 01:08:33 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306199313.72.0.701977794695.issue12155@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 03:17:50 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 24 May 2011 01:17:50 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306199870.47.0.479921204892.issue12155@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > It doesn't define do_work(), num_worker_threads or do_work() Is it unclear to you what those mean? They are placeholders for the user's actual task at hand. > my concern is that it doesn't stop worker threads. Stopping the threads wasn't the intent of the example. > I consider "t.daemon = True" as an hack to not care > about stopping threads. If you post a high-quality self-contained example somewhere on the net, I would be happy to link to it. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 04:27:05 2011 From: report at bugs.python.org (Seth Troisi) Date: Tue, 24 May 2011 02:27:05 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306204025.92.0.1546388276.issue12162@psf.upfronthosting.co.za> Seth Troisi added the comment: Given David Murray's input I think the example would be best done as >>> re.search(r'(\w+) \1', "can you do the can can?") # Matches the duplicate can <_sre.SRE_Match object at ...> I want to stress that the documentation is not wrong but confusing, especially for someone unfamiliar with regression expressions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 07:14:45 2011 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 24 May 2011 05:14:45 +0000 Subject: [docs] [issue12164] str.translate docstring doesn't mention that 'table' can be None In-Reply-To: <1306214084.99.0.386690557918.issue12164@psf.upfronthosting.co.za> Message-ID: <1306214084.99.0.386690557918.issue12164@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 2.6 and 2.7, str.translate accepts None as a first argument. That's documented in the docs, but not in the str.translate docstring. ---------- assignee: docs at python components: Documentation messages: 136720 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: str.translate docstring doesn't mention that 'table' can be None versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From sakhat at gmail.com Tue May 17 17:03:51 2011 From: sakhat at gmail.com (Sahat Yalkabov) Date: Tue, 17 May 2011 11:03:51 -0400 Subject: [docs] 9.3.3 bug? Message-ID: Did you mean it will print the value 18? 9.3.3. Instance Objects Now what can we do with instance objects? The only operations understood by instance objects are attribute references. There are two kinds of valid attribute names, data attributes and methods. data attributes correspond to ?instance variables? in Smalltalk, and to ?data members? in C++. Data attributes need not be declared; like local variables, they spring into existence when they are first assigned to. For example, if x is the instance of MyClass created above, the following piece of code will print the value 16, without leaving a trace: x.counter = 1 while x.counter < 10: x.counter = x.counter * 2 print(x.counter) del x.counter The other kind of instance attribute reference is a method. A method is a function that ?belongs to? an object. (In Python, the term method is not unique to class instances: other object types can have methods as well. For example, list objects have methods called append, insert, remove, sort, and so on. However, in the following discussion, we?ll use the term method exclusively to mean methods of class instance objects, unless explicitly stated otherwise.) Valid method names of an instance object depend on its class. By definition, all attributes of a class that are function objects define corresponding methods of its instances. So in our example, x.f is a valid method reference, since MyClass.f is a function, but x.i is not, since MyClass.i is not. But x.f is not the same thing as MyClass.f ? it is a method object, not a function object. -------------- next part -------------- An HTML attachment was scrubbed... URL: From caf at slac.stanford.edu Tue May 17 23:49:31 2011 From: caf at slac.stanford.edu (Christopher Ford) Date: Tue, 17 May 2011 14:49:31 -0700 Subject: [docs] documentation bug report: stat.UF_OPAQUE Message-ID: <4DD2ED6B.6080204@slac.stanford.edu> Hi, It looks like the description of stat.UF_OPAQUE and stat.UF_NOUNLINK are swapped in the Python v2.7.1 documentation: http://docs.python.org/library/stat.html > stat.UF_OPAQUE > The file may not be renamed or deleted. > > stat.UF_NOUNLINK > The directory is opaque when viewed through a union stack. Compare to CHFLAGS(2) in the BSD System Calls Manual: http://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man2/chflags.2.html > UF_OPAQUE The directory is opaque when viewed through a union stack. Thanks, -Chris Ford From a.tahiri at f2s.ma Wed May 18 17:27:24 2011 From: a.tahiri at f2s.ma (Ahmed TAHIRI) Date: Wed, 18 May 2011 15:27:24 +0000 Subject: [docs] Code samples Message-ID: <1305732444.3812.46.camel@darkstar.f2s.ma> Hi, I try the example in exception chapter and it doasn't work Here what i get: >>> try: ... raise MyError(2*2) ... except MyError as e: :3: Warning: 'as' will become a reserved keyword in Python 2.6 File "", line 3 except MyError as e: ^ The warning is the fact behind the error, isn't it? Thank's for your answer. -- Ahmed TAHIRI Ing?nieur s?curit? syst?mes et r?seaux Free Software Services -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan_benavente_ponce at yahoo.es Thu May 19 02:00:35 2011 From: juan_benavente_ponce at yahoo.es (Juan Benavente Ponce) Date: Thu, 19 May 2011 02:00:35 +0200 Subject: [docs] Num Lock key in IDLE Message-ID: Hello! I think it would be a nice addition to IDLE's documentation if it was mentioned that if you toggle "Num Lock" on, "Home" key behavior changes: pressing it while in the Python Shell window makes the cursor to be carried to the start of text on the line, skipping whitespace or the prompt characters; instead of to the absolute start of the line. Default IDLE behavior was quite annoying to me, and I only found this easy solution by pure chance. Best regards and thanks a lot for your work! Juan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel_s1 at o2.pl Fri May 20 15:28:51 2011 From: pawel_s1 at o2.pl (=?UTF-8?Q?pawel=5Fs1?=) Date: Fri, 20 May 2011 15:28:51 +0200 Subject: [docs] =?utf-8?q?Found_an_ambiguity_in_the_documentation?= Message-ID: <7e6d46b1.7fda40ae.4dd66c93.5154d@o2.pl> Hello, In the programming FAQ: http://docs.python.org/faq/programming.html by the question ?How can I have modules that mutually import each other?? there is a statement: ?Guido van Rossum recommends avoiding all uses of from import ..., and placing all code inside functions.? So, does that mean ?avoiding all uses of (?) and avoiding placing all code inside functions?, or ?avoiding all uses of (?) and instead placing all code inside functions?? Someone could tell me and maybe fix this fragment of FAQ? Thanks for reading, Pozdrawiam, Pawe? From report at bugs.python.org Tue May 24 09:32:37 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 May 2011 07:32:37 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306222357.13.0.382806629523.issue12155@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is it unclear to you what those mean? Well, it's clear, but I like when I can simply copy/paste the example and it does just work: > If you post a high-quality self-contained example somewhere > on the net, I would be happy to link to it. I just propose to change the example to stop the threads: ------------------ def worker(): while True: item = q.get() if item is None: break do_work(item) q.task_done() q = Queue() threads = [] for i in range(num_worker_threads): t = Thread(target=worker) threads.append(t) t.start() for item in source(): q.put(item) q.join() # block until all tasks are done for i in range(num_worker_threads): q.put(None) for t in threads: t.join() ------------------ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 24 12:25:44 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 May 2011 10:25:44 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc or make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: <1306232744.28.0.51296155895.issue12028@psf.upfronthosting.co.za> STINNER Victor added the comment: threading_get_ident.patch: make get_ident() public, replace threading._get_ident() by threading.get_ident(). According to this patch, get_ident() function *is* used: it is used by the logging and reprlib modules (and many tests). My patch avoids the usage of the low-level module, _thread_, in logging and reprlib. I adapted signal.pthread_kill() documentation to replace threading.current_thread().ident by threading.get_ident(). ---------- keywords: +patch Added file: http://bugs.python.org/file22089/threading_get_ident.patch _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Tue May 24 12:53:50 2011 From: eliben at gmail.com (Eli Bendersky) Date: Tue, 24 May 2011 13:53:50 +0300 Subject: [docs] Code samples In-Reply-To: <1305732444.3812.46.camel@darkstar.f2s.ma> References: <1305732444.3812.46.camel@darkstar.f2s.ma> Message-ID: > I try the example in exception chapter and it doasn't work > > Here what i get: > *>>> try:* > *... raise MyError(2*2)* > *... except MyError as e:* > *:3: Warning: 'as' will become a reserved keyword in Python 2.6* > * File "", line 3* > * except MyError as e:* > * ^* > What version of Python are you running? Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliben at gmail.com Tue May 24 14:07:35 2011 From: eliben at gmail.com (Eli Bendersky) Date: Tue, 24 May 2011 15:07:35 +0300 Subject: [docs] 9.3.3 bug? In-Reply-To: References: Message-ID: On Tue, May 17, 2011 at 18:03, Sahat Yalkabov wrote: > Did you mean it will print the value 18? > Nope. 16 >>> x = 1 >>> while x < 10: x = x * 2 ... >>> x 16 Obviously, 16 is the first power of 2 above 10. Eli From report at bugs.python.org Tue May 24 18:31:01 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 24 May 2011 16:31:01 +0000 Subject: [docs] [issue12160] codecs doc: what is StreamCodec? In-Reply-To: <1306166137.72.0.066960808058.issue12160@psf.upfronthosting.co.za> Message-ID: <1306254661.17.0.0891920571514.issue12160@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 01:30:38 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 May 2011 23:30:38 +0000 Subject: [docs] [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1306279838.55.0.836161796496.issue9382@psf.upfronthosting.co.za> STINNER Victor added the comment: > The entire os.popen*() family is supposed be gone in Python 3.x os.popen2(), os.popen3() and os.popen4() were removed in Python 3.0, but os.popen() was kept. Guido wants to keep it because it has a nicer API than subprocess.Popen. I'm too lazy to replace all calls to os.popen() by subprocess.Popen in the Python code base: it's still widely used. Hum, I'm unable to find the issue giving more details about this choice (keep os.popen). The os.popen() doc should be restored. Can you work on a patch? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 02:24:33 2011 From: report at bugs.python.org (Sye van der Veen) Date: Wed, 25 May 2011 00:24:33 +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: <1306283073.38.0.591239301202.issue10224@psf.upfronthosting.co.za> Sye van der Veen added the comment: I had trouble wording that sentence. Under Unix, Makefile is used, in which you specify "PYTHON=" on the command line else the default "python" (from the PATH) is used. Under Windows, it's make.bat, where PYTHON needs to be set in the environment else "..\pcbuild\python" is used (which ignores the PATH). In either case, there's a high likelihood the PYTHON default will resolve to 3.3a0 for any Python developer. building.rst doesn't mention any of this, though; README.txt does. I wanted to keep the patch small, as I suspect this issue will be properly fixed soon, but I could create a new patch that better explains how to force that 2.x be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 05:21:29 2011 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 25 May 2011 03:21:29 +0000 Subject: [docs] [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1306293689.2.0.240030881136.issue9382@psf.upfronthosting.co.za> Eli Bendersky added the comment: os.popen() is certainly deprecated. Its documentation in both 2.6 and 2.7 notes: Deprecated since version 2.6: This function is obsolete. Use the subprocess module. Indeed, the Python 3.x library/os.rst doc mentions it several times, but the documentation was removed. I don't think this is following the rules of deprecation. If it was decided to keep os.popen alive, it *should* be documented in 3.x, possibly retaining the deprecation notice. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 13:54:07 2011 From: report at bugs.python.org (JJeffries) Date: Wed, 25 May 2011 11:54:07 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> New submission from JJeffries : It is unclear without reference to the logging module where the multiprocessing logging levels fit in the normal logging provided by the logging module, even though it says above the table "The table below illustrates where theses fit in the normal level hierarchy. +----------------+----------------+ | Level | Numeric value | +================+================+ | ``SUBWARNING`` | 25 | +----------------+----------------+ | ``SUBDEBUG`` | 5 | +----------------+----------------+" I propose adding further values from the logging module for clarification. ---------- assignee: docs at python components: Documentation messages: 136839 nosy: JJeffries, docs at python priority: normal severity: normal status: open title: Multiprocessing logging levels unclear versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 14:19:24 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 25 May 2011 12:19:24 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306325963.98.0.18262489514.issue12174@psf.upfronthosting.co.za> Petri Lehtinen added the comment: It seems that the documentation of logging no longer gives a table with numeric values for levels (I remember seeing it before). Maybe it would be most useful to remove the table from multiprocessing documentation and state it explicitly that "SUBDEBUG is lower than DEBUG and SUBWARNING is between INFO and WARNING". ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 14:32:06 2011 From: report at bugs.python.org (JJeffries) Date: Wed, 25 May 2011 12:32:06 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306326726.53.0.639735503589.issue12174@psf.upfronthosting.co.za> Changes by JJeffries : ---------- keywords: +patch Added file: http://bugs.python.org/file22106/multiprocessing_logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 14:39:38 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 25 May 2011 12:39:38 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306327177.92.0.869995340681.issue12174@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The patch is in an invalid format. See http://docs.python.org/devguide/patch.html for instructions on working with patches. If you cannot/won't use Mercurial, use two separate directories for original and modified cpython source tree, and invoke: diff -urN cpython-orig cpython-modified ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 25 17:04:39 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 25 May 2011 15:04:39 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306335879.42.0.362300340052.issue12174@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Converted the patch by JJeffries to a valid format. ---------- Added file: http://bugs.python.org/file22110/multiprocessing_logging_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 06:42:00 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 26 May 2011 04:42:00 +0000 Subject: [docs] [issue12183] Python does not support lutime() function In-Reply-To: <1306384920.41.0.626033537775.issue12183@psf.upfronthosting.co.za> Message-ID: <1306384920.41.0.626033537775.issue12183@psf.upfronthosting.co.za> New submission from ???? ????????? : see http://www.linuxquestions.org/questions/programming-9/utime-on-a-symbolic-link-743085/: ---------- Hello, The API utime() is not available for symbolic links. However, with kernel 2.6.22 lutimes() API allowed setting times on atime and mtime on symbolic links. ---------- Neither python 2.7 nor 3.4 support lutime() syscall. So imlpementation of shutil.copy2() and shutil.copystat() under question for symlinks. Also it's not clear in documentation behaviour of these functions on symlinks. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 136928 nosy: docs at python, mmarkk priority: normal severity: normal status: open title: Python does not support lutime() function type: feature request versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 07:35:03 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 26 May 2011 05:35:03 +0000 Subject: [docs] [issue12183] Document behaviour of shutil.copy2 and copystat with symlinks In-Reply-To: <1306384920.41.0.626033537775.issue12183@psf.upfronthosting.co.za> Message-ID: <1306388102.99.0.835334806859.issue12183@psf.upfronthosting.co.za> Ross Lagerwall added the comment: Python 3.3 (as yet unreleased) supports the lutimes function: http://docs.python.org/dev/py3k/library/os.html#os.lutimes Python 2.7 is not getting any more features so it will not be added. I'm changing the title to the second part of your question, documenting the behaviour of shutil.copy2 and copytree. ---------- nosy: +rosslagerwall title: Python does not support lutime() function -> Document behaviour of shutil.copy2 and copystat with symlinks versions: +Python 3.1, Python 3.2, Python 3.3 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 07:52:58 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 26 May 2011 05:52:58 +0000 Subject: [docs] [issue12183] Document behaviour of shutil.copy2 and copystat with symlinks In-Reply-To: <1306384920.41.0.626033537775.issue12183@psf.upfronthosting.co.za> Message-ID: <1306389178.88.0.145181170348.issue12183@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 08:29:34 2011 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 26 May 2011 06:29:34 +0000 Subject: [docs] [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1306391374.38.0.563283138198.issue12174@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +jnoller, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 08:49:53 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 26 May 2011 06:49:53 +0000 Subject: [docs] [issue12164] str.translate docstring doesn't mention that 'table' can be None In-Reply-To: <1306214084.99.0.386690557918.issue12164@psf.upfronthosting.co.za> Message-ID: <1306392593.66.0.125591559969.issue12164@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- keywords: +patch nosy: +petri.lehtinen Added file: http://bugs.python.org/file22122/str_translate_docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 13:59:23 2011 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 26 May 2011 11:59:23 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> New submission from Eric V. Smith : http://docs.python.org/library/decimal.html In 9.4.2, "Decimal objects", some of the methods mention the first and second parameters, when really it should be "self" and the argument, usually named "other" and sometimes something more specific. These include: compare_total copy_sign next_toward quantize (argument is exp) rotate scaleb shift It looks this is left over from where the same-named functions are described in the "Context objects" section. ---------- assignee: docs at python components: Documentation messages: 136947 nosy: docs at python, eric.smith priority: normal severity: normal status: open title: Decimal documentation lists "first" and "second" arguments, should be "self" and "other" versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 19:12:29 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 26 May 2011 17:12:29 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306429949.38.0.161687175367.issue12042@psf.upfronthosting.co.za> Changes by Jordan Stadler : Added file: http://bugs.python.org/file22127/issue12042_31.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 19:12:50 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 26 May 2011 17:12:50 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306429970.21.0.392535116395.issue12042@psf.upfronthosting.co.za> Changes by Jordan Stadler : Added file: http://bugs.python.org/file22128/issue12042_32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 19:17:12 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 26 May 2011 17:17:12 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306430232.75.0.323638534886.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: Alright, patches are up for 3.1 and 3.2. I'm not sure if I can just make one for the 3.x's so I made both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 20:19:32 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 26 May 2011 18:19:32 +0000 Subject: [docs] [issue12188] PEP 7, C style: add ++ policy and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In response to a discussion of a patch removing 'useless' post-increments, (which issue has apparently come up before) Guido posted "> Sorry to butt in here, but I agree with Eric that it was better > before. There is a common idiom, *pointer++ =, and > whenever you see that you know that you are appending something to an > output buffer. Perhaps the most important idea here is that this > maintains the *invariant* "pointer points just after the last thing in > the buffer". Always maintaining the invariant is better than trying to > micro-optimize things so as to avoid updating dead values. The > compiler is better at that." A condensed version of the above added to PEP 7 would help new developers see the usage as local idiom rather than style bug. ---------- assignee: docs at python components: Documentation messages: 136991 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: PEP 7, C style: add ++ policy and explanation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 21:37:54 2011 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 26 May 2011 19:37:54 +0000 Subject: [docs] [issue12188] PEP 7, C style: add ++ policy and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1306438674.6.0.728997549832.issue12188@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 26 23:33:11 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 26 May 2011 21:33:11 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> New submission from Terry J. Reedy : BACKGROUND One of most common recurring topics on python-list (perhaps monthly) is newbies tripping over a mutation method returning None when they expect the collection. Today's example: "Puzzled by list-appending behavior". An excerpt from the responses: "On 5/26/2011 11:58 AM, MRAB wrote: > On 26/05/2011 06:17, Chris Rebert wrote: >> list.remove(), list.sort(), and list.extend() similarly return None >> rather than the now-modified list. > I'd just like to point out that it's a convention, not a rigid rule. > Sometimes it's not followed, for example, dict.setdefault." In Python 1, I believe it was true that all mutation methods of mutable builtin collections (ie, lists -- I do not think dicts had any and sets did not exist yet) returned None. With the introduction of list.pop, the return-None rule was 'broken', though the meme continues. However, the flip side of that rule, do-not-return-the-collection, continues to be true. And the return_None rule was not really broken, but broadened to "return None or an item from the collection". I believe this should be better documented than it is now. PROPOSALS 1. State the general rule. A. Tutorial: At the top of chapter 5, just after "This chapter describes some things you?ve learned about already in more detail, and adds some new things as well.", add something like "For lists, sets, and dicts, methods that change the contents or order never return the instance. Instead, they return an item from the instance or, more commonly, None." B. Library Manual: Near the top of 4. Built-in Types, after "The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions.", add something like "Some collection classes are mutable. The methods that add, subtract, or rearrange their members never return the collection instance itself but instead return an item from the instance or None." Comment: This rule applies to special methods like __getitem__ and __setitem__. 'lis.append(item)' is equivalent to lis.__setitem__(len(lis):len(lis), item), so it should not be so surprising that it has the same return. 2. Document None returns explicitly. They are currently documented implicitly, by absence. A. Docstrings: Compare the relevant parts of the output from 'help(list.append)' and 'help(list.pop)' L.append(object) -- append object to end L.pop([index]) -> item -- remove and return item at index Add ' -> None' to specify return for .append. L.append(object) -> None -- append object to end I expect experienced Python programmers may object that this puts too much emphasis on the unimportant null return, but it is important that Python programmers know about it and experience shows that many newbies *need* that emphasis. B. Doc entries: Essentially same suggestion -- add 'Return None.' to appropriate entries in tutorial chapter 5. For library manual, possibly add footnote '(9) Returns None' to the method table in 4.6.4. Mutable Sequence Types. For sets and dicts, add 'and return None' to appropriate entries. ---------- assignee: docs at python components: Documentation messages: 137009 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: Doc that collection mutation methods return item or None versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 00:31:59 2011 From: report at bugs.python.org (Chris Rebert) Date: Thu, 26 May 2011 22:31:59 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306449119.77.0.0888409966449.issue12192@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 01:07:20 2011 From: report at bugs.python.org (Davi Post) Date: Thu, 26 May 2011 23:07:20 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1306430232.75.0.323638534886.issue12042@psf.upfronthosting.co.za> Message-ID: Davi Post added the comment: Thanks Jordan. How about 2.7? Is that not an open branch? --Davi On Thu, May 26, 2011 at 12:17 PM, Jordan Stadler wrote: > > Jordan Stadler added the comment: > > Alright, patches are up for 3.1 and 3.2. I'm not sure if I can just make > one for the 3.x's so I made both. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file22141/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Thanks Jordan. How about 2.7? Is that not an open branch?

--Davi


On Thu, May 26, 2011 at 12:17 PM, Jordan Stadler <report at bugs.python.org> wrote:

Jordan Stadler <jordan.stadler at gmail.com> added the comment:

Alright, patches are up for 3.1 and 3.2. I'm not sure if I can just make one for the 3.x's so I made both.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12042>
_______________________________________

From report at bugs.python.org Fri May 27 01:37:09 2011 From: report at bugs.python.org (Jordan Stadler) Date: Thu, 26 May 2011 23:37:09 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306453029.21.0.050793709995.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: To be honest, I'm getting a bit confused as to what is required. I thought the two most important patches would be 2.7 and 3.2, but we have 2.7, 3.1, 3.2, and 3.3 listed as versions affected. I posted the patch for 2.7 originally on May 14th. I'm not sure if there is a problem with that patch I posted, but Eric didn't seem content with the versions. At this time versions 3.1, 3.2, and 3.3 were added to the affected versions list. Today I did the patches for 3.1 and 3.2, but I am unsure of how to provide one for 3.3 as is is not listed in mercurial for me (I'm probably doing something wrong, but I couldn't see it). The change in the patch is so minor and I don't mind doing 3.3 if I can get my mercurial to update to 3.3. If the change I made in the patches is insufficient please let me know, I have no problem making adjustments. I'm still getting used to the patching process and how to properly contribute to the community. TLDR: Basically, I'm a little confused as to whether or not the patches I provided are sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 04:45:15 2011 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 May 2011 02:45:15 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306464314.87.0.935129966014.issue12042@psf.upfronthosting.co.za> R. David Murray added the comment: Sometimes only one patch is needed, if it applies cleanly to both python2 and python3. If it doesn't, then two patches are useful, one for python2.7 and one for python3.2. (The last version of 3.1 is about to be released, so I don't think it likely that the fix will get in to that version.) We will use hg merge to merge it into 3.3, which is simply the 'default' head in the repository. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 04:51:40 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 May 2011 02:51:40 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306464700.22.0.064458702472.issue12042@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 05:13:52 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 27 May 2011 03:13:52 +0000 Subject: [docs] [issue12188] PEP 7, C style: add ++ policy and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1306466032.28.0.181984991386.issue12188@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 09:13:39 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 May 2011 07:13:39 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306480419.17.0.23615764736.issue12192@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on the doc suggestions -1 on any hope that casual users will have read or remembered them. ISTM that a common theme among the post of people getting tripped-up by this is that they aren't doing more than a quick skim of the docs anyway. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 10:52:53 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 27 May 2011 08:52:53 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306486373.26.0.5159698283.issue12192@psf.upfronthosting.co.za> Ezio Melotti added the comment: I find this wording a little confusing: "For lists, sets, and dicts, methods that change the contents or order never return the instance. Instead, they return an item from the instance or, more commonly, None.". I would suggest to drop the second part because we don't care about those methods now and because some of them return None too, and simply use "Methods that mutate the object never return the instance.", possibly adding something like "to remind you that no new objects have been created.". The same wording can be used in both the Tutorial and the Library Manual (if readers happen to read it twice, it's even more likely that they will remember it). FWIW the glossary has entries for "mutable" and "immutable", adding a note about this convention in the "mutable" entry might be a good idea too. Adding the '-> None' in the docstring is fine too, I'm not sure about the footnote. Terry, do you want to work on a patch? ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 14:22:13 2011 From: report at bugs.python.org (JJeffries) Date: Fri, 27 May 2011 12:22:13 +0000 Subject: [docs] [issue12195] Little documentation of annotations In-Reply-To: <1306498933.41.0.74384373818.issue12195@psf.upfronthosting.co.za> Message-ID: <1306498933.41.0.74384373818.issue12195@psf.upfronthosting.co.za> New submission from JJeffries : There are very few pages relating to annotations in the documentation. Making it very unclear how they work and what they could be used for other than the original PEP. ---------- assignee: docs at python components: Documentation messages: 137047 nosy: JJeffries, docs at python priority: normal severity: normal status: open title: Little documentation of annotations versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 15:48:37 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 27 May 2011 13:48:37 +0000 Subject: [docs] [issue12195] Little documentation of annotations In-Reply-To: <1306498933.41.0.74384373818.issue12195@psf.upfronthosting.co.za> Message-ID: <1306504117.35.0.488247454457.issue12195@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We could beef this up a little bit, but it was intentional that we leave it completely open on how to use it. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 17:45:33 2011 From: report at bugs.python.org (Jordan Stadler) Date: Fri, 27 May 2011 15:45:33 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306511133.58.0.612544483667.issue12042@psf.upfronthosting.co.za> Jordan Stadler added the comment: Alright, thanks for the clarification, that's pretty much how I thought it worked. Patches supplied should be good then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 17:53:15 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 27 May 2011 15:53:15 +0000 Subject: [docs] [issue11948] Tutorial/Modules - small fix to better clarify the modules search path In-Reply-To: <1304011111.24.0.834772686878.issue11948@psf.upfronthosting.co.za> Message-ID: <1306511595.74.0.273623459078.issue11948@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think I?d better leave this one to Terry or Raymond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 18:31:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 27 May 2011 16:31:19 +0000 Subject: [docs] [issue12042] What's New multiprocessing example error In-Reply-To: <1304967317.91.0.912225759197.issue12042@psf.upfronthosting.co.za> Message-ID: <1306513879.73.0.395293346318.issue12042@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file22141/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 18:45:37 2011 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 27 May 2011 16:45:37 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306514737.18.0.568822302015.issue12192@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: > Comment: This rule applies to special methods like __getitem__ > and __setitem__. 'lis.append(item)' is equivalent to > lis.__setitem__(len(lis):len(lis), item), so it should not be so > surprising that it has the same return. It's not true for all special methods. __iadd__ and __imul__ return the list itself. That's a minor nitpick though. +1 on adding "and return None" to the docstrings of methods that often trip people up. Not everyone will read them, but some people will. ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 27 20:58:59 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 May 2011 18:58:59 +0000 Subject: [docs] [issue12192] Doc that collection mutation methods return item or None In-Reply-To: <1306445590.95.0.898960015708.issue12192@psf.upfronthosting.co.za> Message-ID: <1306522739.17.0.625385897423.issue12192@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Darn, I knew there might be an exception I was overlooking ;-). Anyway, I considered the general statements to be drafts, to be rewritten after comments. As to the footnote (9) suggestion: the set and dict sections list each method separately with normal entries, so there is not no problem with adding 'and returns None' to those that need it. The mutable sequence section is unique in instead putting all the methods in a condensed table. 'return None' could be added to some lines in the table, but not others. ---------- _______________________________________ Python tracker _______________________________________ From chisophugis at gmail.com Wed May 25 20:36:56 2011 From: chisophugis at gmail.com (Sean Silva) Date: Wed, 25 May 2011 11:36:56 -0700 Subject: [docs] RegexObject findall, finditer docs misleading Message-ID: http://docs.python.org/library/re.html#re.RegexObject.findall On RegexObjects, finditer returns an iterator over MatchObjects, whereas findall returns a list of *strings*. This isn't mentioned anywhere in their documentation, but it is a pretty big distinction. To my knowledge, they are interconnected by this equivalence: re_obj.findall(string, pos, endpos) <=> [m.group(0) for m in re_obj.finditer(string, pos, endpos)] Hopefully that can be clarified, because it tripped me up, and I'm sure I'm not the only one! --Sean Silva -------------- next part -------------- An HTML attachment was scrubbed... URL: From s1n4 at live.com Wed May 25 20:41:36 2011 From: s1n4 at live.com (s1n4 c0der) Date: Wed, 25 May 2011 23:11:36 +0430 Subject: [docs] I find a bug in python 2.7 Message-ID: I find a bug in python 2.7 please check these print 'A\b' * 10000000L -------------- next part -------------- An HTML attachment was scrubbed... URL: From tekberg at u.washington.edu Thu May 26 00:04:21 2011 From: tekberg at u.washington.edu (Tom Ekberg) Date: Wed, 25 May 2011 15:04:21 -0700 (PDT) Subject: [docs] argparse count action missing Message-ID: In the page http://docs.python.org/library/argparse.html#action section 15.4.3.2 lists the actions. I was looking at someone elses code which used action='count' which I couldn't find in the above document. I ended up looking at the code to find out about it (use the source Luke). Please consider adding something like the following to describe this action: * 'count' - This counts the number of time the argument is present. This is useful for specifying a level of detail. Example usage: >>> parser = argparse.ArgumentParser() >>> parser.add_argument('-v', '--verbose', dest='verbosity', ... action='count', default=0, ... help="Be more verbose. Specify -vv or -vvv for even more") >>> parser.parse_args(['-vvvv']) Namespace(verbosity=4) Tom Ekberg Senior Computer Specialist, Lab Medicine University of Washington Medical Center 1959 NE Pacific St, MS 357110 Seattle WA 98195 phone: (206) 598-8544 email: tekberg at u.washington.edu From jortmann at tulane.edu Thu May 26 21:20:04 2011 From: jortmann at tulane.edu (Ortmann, John E) Date: Thu, 26 May 2011 19:20:04 +0000 Subject: [docs] Tutorial Message-ID: Hello, I have been going through one of the tutorials on the Python website and I have come across a code that does not seem to generate any output when I use it in my Python interpreter. The second example under "4.2 for Statements" on the page http://docs.python.org/tutorial/controlflow.html does not return anything. Thank you. John "Elliott" Ortmann, Jr. Tulane University School of Science and Engineering Class of 2013 Double Major of Physics and Math -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat May 28 11:04:11 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 May 2011 09:04:11 +0000 Subject: [docs] [issue12188] PEP 7, C style: add ++ policy and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1306573451.53.0.567328542281.issue12188@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure it's worth adding this to the PEP 7. The PEP is about conventions and style not idioms. PEP 8 has a section about "Programming Recommendations" that contains a few idioms, but since PEP 7 doesn't have an equivalent section, I think that explaining this idiom (and not others) will look out of place. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 12:01:20 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 May 2011 10:01:20 +0000 Subject: [docs] [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1306576880.38.0.5729662648.issue9382@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 12:05:53 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 May 2011 10:05:53 +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: <1306577153.9.0.342493571175.issue10224@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 12:09:02 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 May 2011 10:09:02 +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: <1306577342.73.0.571962608044.issue10225@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 14:16:07 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 28 May 2011 12:16:07 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306584967.67.0.268026650427.issue12185@psf.upfronthosting.co.za> Ezio Melotti added the comment: Note that usually 'self' is not included in the arguments of methods. The 3.3 doc correctly uses e.g. copy_sign(other). A 'd.' could also be added so that the end result looks like: d.copy_sign(other) but it's not mandatory (if done, all the other methods should be updated as well). ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 14:48:41 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sat, 28 May 2011 12:48:41 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306586921.04.0.360003150897.issue12185@psf.upfronthosting.co.za> Changes by Adam Woodbeck : ---------- nosy: +adam.woodbeck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 14:49:13 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sat, 28 May 2011 12:49:13 +0000 Subject: [docs] [issue11699] Doc for optparse.OptionParser.get_option_group is wrong In-Reply-To: <1301301829.71.0.0713641718569.issue11699@psf.upfronthosting.co.za> Message-ID: <1306586953.82.0.904998200916.issue11699@psf.upfronthosting.co.za> Changes by Adam Woodbeck : ---------- nosy: +adam.woodbeck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 15:12:15 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sat, 28 May 2011 13:12:15 +0000 Subject: [docs] =?utf-8?q?=5Bissue11644=5D_Cross-link_2to3_documentation?= =?utf-8?q?=2C_what=E2=80=99s_new_and_pyporting_howto?= In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1306588335.9.0.296122157332.issue11644@psf.upfronthosting.co.za> Changes by Adam Woodbeck : ---------- nosy: +adam.woodbeck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 15:17:23 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sat, 28 May 2011 13:17:23 +0000 Subject: [docs] [issue11203] gzip doc is behind In-Reply-To: <1297539632.81.0.320134391105.issue11203@psf.upfronthosting.co.za> Message-ID: <1306588643.61.0.915039096887.issue11203@psf.upfronthosting.co.za> Changes by Adam Woodbeck : ---------- nosy: +adam.woodbeck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 15:59:31 2011 From: report at bugs.python.org (Jonas H.) Date: Sat, 28 May 2011 13:59:31 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306591169.5.0.0401911691777.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: Does that look good to you? If it does, I'll go on using the script (http://paste.pocoo.org/show/396661/) on the 3.x docs. ---------- keywords: +patch Added file: http://bugs.python.org/file22164/p1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 16:39:21 2011 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 28 May 2011 14:39:21 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306593560.93.0.196165005371.issue12185@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm not talking about the method itself but rather the descriptive text. For example: copy_sign(other) Return a copy of the first operand with the sign set to be the same as the sign of the second operand. There is no second operand, unless you consider "self" the first and "other" the second. Which of course is true inside the method, but it reads oddly as a description of the method from the outside. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 19:05:21 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 May 2011 17:05:21 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306602321.68.0.0442822966899.issue12185@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 21:42:09 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 28 May 2011 19:42:09 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306611729.68.0.107395742186.issue12134@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >From just reading the docs, it appears that json.dump(obj,fp) == fp.write(json.dumps(obj)) and it is easy to wonder why .dump even exists, as it seems a trivial abbreviation (and why not .dump and .dumpf instead). Since, '_one_shot' and 'c_make_encoder' are not mentioned in the doc, there is no hint from these either. So I think a doc addition is needed. The benchmark is not completely fair as the .dumps timing omits the write call. For the benchmark, that would be trivial. But in real use on multitasking systems with slow (compared to cpu speed) output channels, the write time might dominate. I can even imagine .dump sometimes winning by getting chunks into a socket buffer and possibly out on the wire, almost immediately, instead of waiting to compute the entire output, possibly interrupted by task swaps. So I presume *this* is at least part of the reason for the incremental .dump. I changed 'pass' to 'print(bug)' in class writable and verified that .dump is *very* incremental. Even '[' and ']' are separate outputs. DOC suggestion: (limited to CPython since spec does not prohibit naive implementation of .dump given above) After current .dumps line, add "In CPython, json.dumps(o), by itself, is faster than json.dump(o,f), at the expense of using more space, because it creates the entire string at once, instead of incrementally writing each piece of o to f. However, f.write(json.dumps(o)) may not be faster." ---------- keywords: +patch nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 21:55:49 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sat, 28 May 2011 19:55:49 +0000 Subject: [docs] [issue11785] email subpackages documentation problems In-Reply-To: <1302105466.45.0.930997240631.issue11785@psf.upfronthosting.co.za> Message-ID: <1306612549.58.0.881035335336.issue11785@psf.upfronthosting.co.za> Changes by Adam Woodbeck : ---------- nosy: +adam.woodbeck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 22:38:16 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 28 May 2011 20:38:16 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306615096.2.0.700504575494.issue12148@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The basic fix is to replace the fake verb 'to or', conjugated not really properly as "or's" or "or'ing", with the real noun 'bitwise-or'. help(doctest.testmod) ... Optional keyword arg "optionflags" or's together module constants, and defaults to 0. This is new in 2.3. Possible values (see the docs for details): Eliminate 'this is new...' here and above. Suggested replacement: Optional keyword arg "optionflags" (default 0) is the bitwise-or of the following module constants (see the docs for details): help(doctest.testfile) ... Optional keyword arg "optionflags" or's together module constants, and defaults to 0. Possible values (see the docs for details): Same replacement (whatever we decide on). Lib 25.2.4. Basic API doctest.testfile entry: ... Optional argument optionflags or?s together option flags. See section Option Flags and Directives. -> Optional argument optionflags is the bitwise-or of options flags. See section Option Flags and Directives. doctest.testmode entry refers back to above. 25.2.3.5. Option Flags and Directives doctest.COMPARISON_FLAGS A bitmask or?ing together all the comparison flags above. doctest.REPORTING_FLAGS A bitmask or?ing together all the reporting flags above. A bitmask that is the bitwise-or of all the comparison flags above. ditto with 'reporting' instead. -or- A bitmask -- the bitwise-or of ... I think this is all. Searching on "or'" does not work because sphinx nicely replaces "'" with a non-ascii unicode char ;-). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 22:55:19 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 28 May 2011 20:55:19 +0000 Subject: [docs] [issue12155] queue example doesn't stop worker threads In-Reply-To: <1306146151.16.0.671326557503.issue12155@psf.upfronthosting.co.za> Message-ID: <1306616119.25.0.160537874438.issue12155@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The proposed change adds about 7 lines to show the 'trick' of putting num-worker Nones on the queue. I think that is worth it. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 28 23:59:27 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 28 May 2011 21:59:27 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306619967.54.0.339467441473.issue12162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The doc consistently does NOT quote re's in the text. Rather, they are shaded gray, both in Windows help version and html version. So this one should not be treated differently. Most of the confusion reported is due to not reading the intro paragraphs. I almost suggested closing this without action. However, after saying to use the r prefix, the doc omits them from examples when not absolutely needed. In particular, >>> m = re.search('(?<=-)\w+', 'spam-egg') Why does \w work without being doubled or protected (and it does, I checked), while \1 does not? Hell if I know. So even though that example works, it should be changed. The doc should teach the rule "if strings contains '\', prefix with 'r'" rather than "test and add 'r' if it fails", or "learn the exact list of when needed", which is not given and unknown to me and most any beginner. I advocate the same practice in the RE How To, which also has at least one example with '\' but without 'r': >>> p = re.compile('\d+') I do not think we need another example other than those in the text. ---------- keywords: +patch nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 00:06:18 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 28 May 2011 22:06:18 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306620378.37.0.375666358245.issue12185@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Return a copy of *self* with the sign set to be the same as the sign of *other*. seems clearer to me. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 00:27:27 2011 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 May 2011 22:27:27 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306621647.79.0.975921378931.issue12162@psf.upfronthosting.co.za> R. David Murray added the comment: Why it works is due to a quirk in the handling of python strings: if an apparent escape sequence doesn't "mean anything", it is retained verbatim, including the '\' character. This is documented in http://docs.python.org/reference/lexical_analysis.html#string-literals: "Unlike Standard C, all unrecognized escape sequences are left in the string unchanged, i.e., the backslash is left in the string. (This behavior is useful when debugging: if an escape sequence is mistyped, the resulting output is more easily recognized as broken.)" It is *very* unwise to depend on this behavior for anything except debugging, therefore those examples which do are, in my opinion, wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 03:44:41 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 May 2011 01:44:41 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306633481.21.0.985439396062.issue12185@psf.upfronthosting.co.za> Ezio Melotti added the comment: In this case using: d.copy_sign(other) and then refer to 'd' and 'other' might be clearer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 04:01:01 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 May 2011 02:01:01 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306634461.46.0.478749165188.issue12162@psf.upfronthosting.co.za> Ezio Melotti added the comment: The regex sets (\d\w\s\D\W\S) don't match any Python escape sequence, so even if some suggest to always use r'' regardless, I don't find it necessary, especially for simple regexs. The two conflicting escape sequences to keep in mind are \b (backspace for Python, word boundary for re) and \number (octal escape for Python, reference to a group for re). There are also other regex escape sequences that are rarely used (\B\A\Z), but these don't need to be escaped either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 04:07:34 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 May 2011 02:07:34 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306634854.34.0.407245781647.issue12134@psf.upfronthosting.co.za> Ezio Melotti added the comment: The name dump and dumps exist to match the same API provided by pickle and marshal. I agree that a note marked as CPython implementation detail should be added. ---------- keywords: +easy -patch stage: -> needs patch versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 04:13:13 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 May 2011 02:13:13 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306635193.13.0.273646712154.issue11975@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +georg.brandl stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 09:20:05 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 29 May 2011 07:20:05 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306653605.52.0.774106384452.issue12134@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please don't add notes of this sort to the docs. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 09:29:51 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 May 2011 07:29:51 +0000 Subject: [docs] [issue12134] json.dump much slower than dumps In-Reply-To: <1305985086.83.0.259963774289.issue12134@psf.upfronthosting.co.za> Message-ID: <1306654191.66.0.562149933235.issue12134@psf.upfronthosting.co.za> Ezio Melotti added the comment: Are you against the proposed wording or the note itself? Stating that in CPython json.dump doesn't use the C accelerations is a reasonable thing to do imho. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 12:47:00 2011 From: report at bugs.python.org (Martin Ponweiser) Date: Sun, 29 May 2011 10:47:00 +0000 Subject: [docs] [issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) In-Reply-To: <1306666020.34.0.114942173152.issue12206@psf.upfronthosting.co.za> Message-ID: <1306666020.34.0.114942173152.issue12206@psf.upfronthosting.co.za> New submission from Martin Ponweiser : I hope the title is self-explanatory. ---------- assignee: docs at python components: Documentation messages: 137178 nosy: docs at python, mponweiser priority: normal severity: normal status: open title: Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 14:57:01 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sun, 29 May 2011 12:57:01 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306673821.18.0.727494201757.issue12185@psf.upfronthosting.co.za> Adam Woodbeck added the comment: I propose: object.copy_sign(other) Return a copy of *object* with the sign set to be the same as the sign of *other*. This format is most familiar to me. But like Ezio wrote, all other methods referring to first and second operands would need to updated to refer to *object* and *other*, respectively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 15:11:29 2011 From: report at bugs.python.org (Xuanji Li) Date: Sun, 29 May 2011 13:11:29 +0000 Subject: [docs] [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1306674689.14.0.270664713577.issue9938@psf.upfronthosting.co.za> Xuanji Li added the comment: Updated previous patch with test cases and renamed exit_on_argument_error flag to exit_on_error. ---------- Added file: http://bugs.python.org/file22172/issue9938_with_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 15:43:04 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sun, 29 May 2011 13:43:04 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306676584.54.0.403682370151.issue12185@psf.upfronthosting.co.za> Adam Woodbeck added the comment: Or rather: object.copy_sign(other) Return a copy of *object* with the sign set to be that of *other*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 16:58:05 2011 From: report at bugs.python.org (Adam Woodbeck) Date: Sun, 29 May 2011 14:58:05 +0000 Subject: [docs] [issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other" In-Reply-To: <1306411163.06.0.644918639795.issue12185@psf.upfronthosting.co.za> Message-ID: <1306681084.95.0.299706140584.issue12185@psf.upfronthosting.co.za> Adam Woodbeck added the comment: Sorry guys. I'm new at this. After reviewing this thread, Terry's suggestion makes the most sense to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:00:15 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 May 2011 16:00:15 +0000 Subject: [docs] [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset db60dee0019b by ?ric Araujo in branch '2.7': Backport doc improvements for distutils.cmd.Command (#9223). http://hg.python.org/cpython/rev/db60dee0019b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:22:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 16:22:53 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: <1306686173.07.0.374398794371.issue10454@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi David, I made this patch to port the improvements you made to 2.7. The new usage message looks like this: usage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [-i list] [directory|file ...] arguments: zero or more file and directory names to compile; if no arguments given, defaults to the equivalent of -l sys.path options: -l: don't recurse into subdirectories -f: force rebuild even if timestamps are up-to-date -q: output only error messages -d destdir: directory to prepend to file paths for use in compile-time tracebacks and in runtime tracebacks in cases where the source file is unavailable -x regexp: skip files matching the regular expression regexp; the regexp is searched for in the full path of each file considered for compilation -i file: add all the files and directories listed in file to the list considered for compilation; if "-", names are read from stdin I noticed some minor style issues, so I (IMO) improved them in my 2.7 patch and made a 3.x patch with the same minor touch-ups. ---------- Added file: http://bugs.python.org/file22173/compileall-help-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:23:13 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 16:23:13 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: <1306686193.72.0.485559939973.issue10454@psf.upfronthosting.co.za> Changes by ?ric Araujo : Added file: http://bugs.python.org/file22174/compileall-help-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:36:53 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 May 2011 16:36:53 +0000 Subject: [docs] [issue12162] Documentation about re \number In-Reply-To: <1306195657.59.0.977782679394.issue12162@psf.upfronthosting.co.za> Message-ID: <1306687013.42.0.792033249986.issue12162@psf.upfronthosting.co.za> R. David Murray added the comment: The fact that you have carefully think about which are escapes and which aren't tells you that you should not be depending on the non-escapes not being escapes. What if we added one? The doc says preserving the \s is a debugging aid, and that is all it should be used for, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:44:08 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 May 2011 16:44:08 +0000 Subject: [docs] [issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) In-Reply-To: <1306666020.34.0.114942173152.issue12206@psf.upfronthosting.co.za> Message-ID: <1306687448.06.0.801759371971.issue12206@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:46:17 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 16:46:17 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306687577.88.0.151782237593.issue12148@psf.upfronthosting.co.za> ?ric Araujo added the comment: I found ?bitwise OR-ed? in library/fcntl.rst library/functions.rst library/os.rst library/winsound.rst (using grep, not Sphinx :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 18:48:51 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 16:48:51 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306687731.11.0.628009216966.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: Again, changing the role :func: to :class: adds zero value to the tools or the human readers. What?s needed are class *directives* that will provide a target for those links, e.g.: .. class:: list .. method:: append Then :func:`list` and :meth:`list.append` would generate links to his part of the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 19:23:50 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 17:23:50 +0000 Subject: [docs] [issue12207] Document ast.PyCF_ONLY_AST In-Reply-To: <1306689830.34.0.885575322408.issue12207@psf.upfronthosting.co.za> Message-ID: <1306689830.34.0.885575322408.issue12207@psf.upfronthosting.co.za> New submission from ?ric Araujo : Title says it all. ---------- assignee: docs at python components: Documentation files: document-pycf-only-ast.diff keywords: needs review, patch messages: 137203 nosy: docs at python, eric.araujo priority: normal severity: normal stage: patch review status: open title: Document ast.PyCF_ONLY_AST versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22175/document-pycf-only-ast.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 19:25:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 17:25:45 +0000 Subject: [docs] [issue12208] Glitches in email.policy docs In-Reply-To: <1306689945.7.0.42467338004.issue12208@psf.upfronthosting.co.za> Message-ID: <1306689945.7.0.42467338004.issue12208@psf.upfronthosting.co.za> New submission from ?ric Araujo : I found a bug in email.policy.rst (Msg instead of msg) and did other touch-ups in the file. Please review. ---------- assignee: docs at python components: Documentation files: email.policy-markup-glitches.diff keywords: patch messages: 137204 nosy: docs at python, eric.araujo, r.david.murray priority: normal severity: normal stage: patch review status: open title: Glitches in email.policy docs versions: Python 3.3 Added file: http://bugs.python.org/file22176/email.policy-markup-glitches.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 19:29:11 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 29 May 2011 17:29:11 +0000 Subject: [docs] [issue12207] Document ast.PyCF_ONLY_AST In-Reply-To: <1306689830.34.0.885575322408.issue12207@psf.upfronthosting.co.za> Message-ID: <1306690151.67.0.770238388892.issue12207@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Use of PyCF_ONLY_AST be superseded by ast.parse. ---------- nosy: +benjamin.peterson priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 19:30:03 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 17:30:03 +0000 Subject: [docs] [issue12209] Minor edits to faulthandler doc In-Reply-To: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> Message-ID: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> New submission from ?ric Araujo : I made some grammar fixes in faulthandler.rst and tweaked the example to better show what the module does. I?d like to fix the synopsis too: ?dump the Python traceback? is not very clear to me. It is the traceback or the stack trace? Why is it called ?the? traceback? Something like ?dumping the stack trace on CPython crashes? would be better IMO. ---------- assignee: docs at python components: Documentation files: faulthandler-doc.diff keywords: needs review, patch messages: 137206 nosy: docs at python, eric.araujo, haypo priority: normal severity: normal stage: patch review status: open title: Minor edits to faulthandler doc versions: Python 3.3 Added file: http://bugs.python.org/file22177/faulthandler-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 19:31:22 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 29 May 2011 17:31:22 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1306690282.06.0.626249641954.issue11964@psf.upfronthosting.co.za> ?ric Araujo added the comment: This is my current patch, FYI. ---------- keywords: +patch Added file: http://bugs.python.org/file22178/versionadded-3.2-json-indent-str.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 20:12:48 2011 From: report at bugs.python.org (Marc Sibson) Date: Sun, 29 May 2011 18:12:48 +0000 Subject: [docs] [issue10772] Several actions for argparse arguments missing from docs In-Reply-To: <1293327184.11.0.454888760887.issue10772@psf.upfronthosting.co.za> Message-ID: <1306692768.22.0.135452399679.issue10772@psf.upfronthosting.co.za> Marc Sibson added the comment: issue10772.patch: add help, count and parsers to Doc/library/argparse.rst ---------- keywords: +patch nosy: +marcs Added file: http://bugs.python.org/file22179/issue10772.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 21:01:31 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 29 May 2011 19:01:31 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306695691.44.0.536476012935.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: Linking a class using a function directive is counter-intuitive. That's why we need to make use of class directives rather than function directives here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 29 21:17:38 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 29 May 2011 19:17:38 +0000 Subject: [docs] [issue12148] Clarify "or-ing together" doctest option flags In-Reply-To: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> Message-ID: <1306696658.88.0.52496966231.issue12148@psf.upfronthosting.co.za> R. David Murray added the comment: I like bitwise-or better than bitwise OR because 'bitwise-or' is a distinct operation from 'or', and making it hyphenated emphasizes that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 02:23:36 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 May 2011 00:23:36 +0000 Subject: [docs] [issue12209] Minor edits to faulthandler doc In-Reply-To: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> Message-ID: <1306715016.35.0.971142062232.issue12209@psf.upfronthosting.co.za> STINNER Victor added the comment: What do you call a "stack trace"? I use this term in the C language, especially when using the "where" command of gdb. In Python, the stack trace is called a "traceback". Anyway, faulthandler prints the Python trace, not the C trace, so I prefer to call it a "traceback" than "stack trace". faulthandler.dump_traceback() output is similar to: try: raise ValueError() except: exctype, value, tb = sys.exc_info() traceback.print_tb(tb) faulthandler doesn't print the line from the script, only the function name, file name and line number; and the first line is different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 07:22:21 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 May 2011 05:22:21 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306732941.65.0.0799661721734.issue11975@psf.upfronthosting.co.za> R. David Murray added the comment: You are confusing directives and roles. As was already pointed out, there is currently no target for list.append to point to. That's what needs to be added. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 10:10:15 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 30 May 2011 08:10:15 +0000 Subject: [docs] [issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) In-Reply-To: <1306666020.34.0.114942173152.issue12206@psf.upfronthosting.co.za> Message-ID: <1306743015.45.0.0970451753993.issue12206@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The name of the "level" parameter to LogRecord constructor is correct in the documentation (I checked the code). The only inconsitency that I see is that the corresponding attribute name of LogRecord is "levelno". ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 10:28:30 2011 From: report at bugs.python.org (Martin Ponweiser) Date: Mon, 30 May 2011 08:28:30 +0000 Subject: [docs] [issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) In-Reply-To: <1306743015.45.0.0970451753993.issue12206@psf.upfronthosting.co.za> Message-ID: Martin Ponweiser added the comment: You are right, I should have looked closer -- sorry to all involved. Nevertheless this caused some confusion here. I guess mentioning the inconsistency in the documentation is out of the question. On Mon, May 30, 2011 at 10:10 AM, Petri Lehtinen wrote: > > Petri Lehtinen added the comment: > > The name of the "level" parameter to LogRecord constructor is correct in > the documentation (I checked the code). The only inconsitency that I see is > that the corresponding attribute name of LogRecord is "levelno". > > ---------- > nosy: +petri.lehtinen > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file22187/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- You are right, I should have looked closer -- sorry to all involved. Nevertheless this caused some confusion here. I guess mentioning the inconsistency in the documentation is out of the question.

On Mon, May 30, 2011 at 10:10 AM, Petri Lehtinen <report at bugs.python.org> wrote:

Petri Lehtinen <petri at digip.org> added the comment:

The name of the "level" parameter to LogRecord constructor is correct in the documentation (I checked the code). The only inconsitency that I see is that the corresponding attribute name of LogRecord is "levelno".

----------
nosy: +petri.lehtinen

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12206>
_______________________________________



--
Martin Ponweiser
Frauengasse 4/8, 2700 Wr. Neustadt, Austria
cell phone: 0043 650-68 27 949 (no SMS inbox)
From report at bugs.python.org Mon May 30 10:33:18 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 30 May 2011 08:33:18 +0000 Subject: [docs] [issue12206] Documentation Std. Library 15.7.5 "LogRecord objects": Parameters: level(currently wrong) -> levelno (correct) In-Reply-To: Message-ID: <20110530083316.GD24535@colossus> Petri Lehtinen added the comment: Martin Ponweiser wrote: > I guess mentioning the inconsistency in the documentation is out of > the question. No, not at all. If you have a good wording in your mind, please share it :) Or even better, write a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 12:38:53 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 30 May 2011 10:38:53 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306751933.07.0.250319995675.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: I'm not. My patch doesn't address the problem of unlinkable methods but wrong type declarations (read, wrong usage of ".. function::" directives) for builtins like int, float, bool, list etc. Because the directives change, the roles used to link to them (":func:`list`") have to be changed accordingly. That's what this patch does. I want to address `list` method documentation in the next step. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:26:29 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:26:29 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306761989.56.0.740527255815.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you make an effort to accept our word that using :class: instead of :func: would bring zero value to the indexing system nor to human readers? ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:28:00 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:28:00 +0000 Subject: [docs] [issue12209] Minor edits to faulthandler doc In-Reply-To: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> Message-ID: <1306762080.47.0.171850145377.issue12209@psf.upfronthosting.co.za> ?ric Araujo added the comment: > faulthandler prints the Python trace, not the C trace, so I prefer to > call it a "traceback" than "stack trace". Okay. What do you think about this synopsis then: dumping the traceback on CPython crashes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:31:51 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 30 May 2011 13:31:51 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306762311.87.0.123249828901.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: > Could you make an effort to accept our word that using :class: instead of :func: would bring zero value to the indexing system nor to human readers? I'm already doing; but I don't see anyone having made a good point against my preference of using ".. class::" to document classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:32:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:32:32 +0000 Subject: [docs] [issue10772] Several actions for argparse arguments missing from docs In-Reply-To: <1293327184.11.0.454888760887.issue10772@psf.upfronthosting.co.za> Message-ID: <1306762352.26.0.509096448876.issue10772@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would not document 'parsers'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:32:57 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:32:57 +0000 Subject: [docs] [issue12207] Document ast.PyCF_ONLY_AST In-Reply-To: <1306689830.34.0.885575322408.issue12207@psf.upfronthosting.co.za> Message-ID: <1306762377.59.0.235193549623.issue12207@psf.upfronthosting.co.za> ?ric Araujo added the comment: Okay. I?ll make another patch to remove mentions of this flag then. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:37:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:37:38 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306762658.78.0.853819955109.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I'm already doing; Thanks. > but I don't see anyone having made a good point against my preference > of using ".. class::" to document classes. We have agreed it is needed (I think it?s on another bug report, maybe a duplicate). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:39:28 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 30 May 2011 13:39:28 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306762768.18.0.199146525484.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: What's wrong with the changes I propose with the patch, then? Sorry, I really don't get it, no matter how hard I try. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:51:36 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:51:36 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306763496.03.0.558943602936.issue11975@psf.upfronthosting.co.za> ?ric Araujo added the comment: Due to implementation details and history of CPython, it is not ?more correct? to say that int is a function and a class. You could argue either. The question is however moot; when you mark up something with a mod, func, class or meth role, Sphinx will find the target without paying attention to its type. So changing :func: to :class: does not bring anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:52:08 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 May 2011 13:52:08 +0000 Subject: [docs] [issue12209] Minor edits to faulthandler doc In-Reply-To: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> Message-ID: <1306763528.71.0.828631335819.issue12209@psf.upfronthosting.co.za> STINNER Victor added the comment: > dumping the traceback on CPython crashes? faulthandler is no more specific to crashes: you can dump the tracebacks while Python is running using a signal or an explicit call to faulthandler.dump_traceback(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 15:54:29 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 13:54:29 +0000 Subject: [docs] [issue12209] Minor edits to faulthandler doc In-Reply-To: <1306690203.86.0.276499968085.issue12209@psf.upfronthosting.co.za> Message-ID: <1306763669.83.0.989959199777.issue12209@psf.upfronthosting.co.za> ?ric Araujo added the comment: Okay, I understand now that the traceback always exists, not only during exceptions. The module gives control over the display of that traceback. Am I right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 16:38:41 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 30 May 2011 14:38:41 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306766321.5.0.223828807458.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: > when you mark up something with a mod, func, class or meth role, Sphinx will find the target without paying attention to its type. So changing :func: to :class: does not bring anything. >From a quick test this seems to hold true for links within one project but not for Sphinx' intersphinx extension, which actually cares about types. So the question is whether we keep CPython implementation details (many builtins being both a class and a function) out of the documentation or we get the Sphinx developers to change intersphinx behaviour. I guess you'd suggest the latter, right? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 17:12:04 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 30 May 2011 15:12:04 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306768324.76.0.103937827449.issue11975@psf.upfronthosting.co.za> R. David Murray added the comment: It should certainly be reported to the sphinx tracker where the right people to make the decision for sphinx itself will see it. Then if the decision is that type matters, python can decide how we want to handle that fact. Since the core of sphinx does not care about type, I suspect this will be viewed as a bug in InterSphinx, but I could well be wrong. Note that not using :func: does change the generated text. With :func: you get () after the name, with :class: you don't. So changing :func: to :class: for these is a decision that would need some discussion. Also note that I'm guessing that there will be people who will object to expanding the description of the sequence types into full class/method docs. So this, too, is a change that needs to be discussed with a wider audience. I think I'm +0 on it myself; it makes the docs less concise and leads to redundant text, but it also make it easier to look up the method set of individual sequence types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 17:17:27 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 May 2011 15:17:27 +0000 Subject: [docs] [issue12188] PEP 7, C style: add ++ policy and explanation In-Reply-To: <1306433972.91.0.882585972593.issue12188@psf.upfronthosting.co.za> Message-ID: <1306768647.88.0.907253625784.issue12188@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 17:22:16 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 May 2011 15:22:16 +0000 Subject: [docs] [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1306768936.07.0.714812479723.issue9382@psf.upfronthosting.co.za> STINNER Victor added the comment: > Its documentation in both 2.6 and 2.7 notes: > > Deprecated since version 2.6: This function is obsolete. > Use the subprocess module. The deprecation should be removed from Python 2.7: os.popen() will not be removed from Python 2 because 2.7 is the last major version of the 2.x branch. And os.popen() will stay in Python 3: see #6490 and the Guido's message http://bugs.python.org/issue6490#msg90572 > If it was decided to keep os.popen alive, it *should* be > documented in 3.x Yes, os.popen() must be documented in Python 3. Do you want to write a patch to restore the doc? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 17:29:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 15:29:53 +0000 Subject: [docs] [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1306769393.4.0.525569669856.issue9382@psf.upfronthosting.co.za> ?ric Araujo added the comment: I suggest we move the discussion to #6490. ---------- nosy: +eric.araujo resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> os.popen documentation in 2.6 is probably wrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 17:45:13 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 30 May 2011 15:45:13 +0000 Subject: [docs] [issue12217] Cross-link docs for faulthandler, traceback and pdb In-Reply-To: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> Message-ID: <1306770313.4.0.799430970978.issue12217@psf.upfronthosting.co.za> New submission from ?ric Araujo : haypo suggested linking between traceback.print_tb and faulthandler.dump_traceback(). See also links between pdb and faulthandler could also be nice, if they explain briefly how the modules differ. ---------- assignee: docs at python components: Documentation keywords: easy messages: 137298 nosy: docs at python, eric.araujo, haypo priority: normal severity: normal stage: needs patch status: open title: Cross-link docs for faulthandler, traceback and pdb versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 19:37:39 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 30 May 2011 17:37:39 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306777059.44.0.510762881042.issue11975@psf.upfronthosting.co.za> Georg Brandl added the comment: Well (speaking as the Sphinx developer here), I view it as legacy behavior that type does not matter for non-intersphinx linking. So the intersphinx behavior is the "correct" one, but we can't change the other now because of compatibility. But (speaking as a Python doc person), I am -0 on changing :func: to :class: when we change these types to be documented as classes: it adds no value at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 19:55:04 2011 From: report at bugs.python.org (Marc Sibson) Date: Mon, 30 May 2011 17:55:04 +0000 Subject: [docs] [issue10772] Several actions for argparse arguments missing from docs In-Reply-To: <1293327184.11.0.454888760887.issue10772@psf.upfronthosting.co.za> Message-ID: <1306778104.57.0.151194615022.issue10772@psf.upfronthosting.co.za> Marc Sibson added the comment: issue10772.patch2: document help and count actions in Doc/library/argparse.rst ---------- Added file: http://bugs.python.org/file22198/issue10772.patch2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 21:27:39 2011 From: report at bugs.python.org (Jonas H.) Date: Mon, 30 May 2011 19:27:39 +0000 Subject: [docs] [issue11975] Fix referencing of built-in types (list, int, ...) In-Reply-To: <1304281262.53.0.265979216697.issue11975@psf.upfronthosting.co.za> Message-ID: <1306783659.52.0.031615680466.issue11975@psf.upfronthosting.co.za> Jonas H. added the comment: > So the intersphinx behavior is the "correct" one, but we can't change the other now because of compatibility. Could you be convinced to use that legacy behaviour for intersphinx, too? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 23:04:23 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 May 2011 21:04:23 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc or make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 5548197d1f22 by Victor Stinner in branch 'default': Close #12028: Make threading._get_ident() public, rename it to http://hg.python.org/cpython/rev/5548197d1f22 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 23:13:24 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 30 May 2011 21:13:24 +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: <1306790003.88.0.717420337332.issue9738@psf.upfronthosting.co.za> STINNER Victor added the comment: > Here is an interesting case for your collection: PyDict_GetItemString. It's easier to guess the encoding of such function: Python 3 always use UTF-8, but yes, the encoding should be documented. I documented many functions, directly in the header files, and sometimes also in the reST documentation. I close this issue because I consider it as done. If you would like to document the encoding of some specific functions, please open new issues. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 30 23:23:59 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 May 2011 21:23:59 +0000 Subject: [docs] [issue12028] threading._get_ident(): remove it in the doc or make it public In-Reply-To: <1304763885.69.0.0673307272.issue12028@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6387aa6b496d by Victor Stinner in branch 'default': Issue #12028: fix NEWS entry http://hg.python.org/cpython/rev/6387aa6b496d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 31 11:42:55 2011 From: report at bugs.python.org (Vladimir M.) Date: Tue, 31 May 2011 09:42:55 +0000 Subject: [docs] [issue12223] Datamodel documentation page: 'operator' where 'operand' should be In-Reply-To: <1306834975.07.0.689179229064.issue12223@psf.upfronthosting.co.za> Message-ID: <1306834975.07.0.689179229064.issue12223@psf.upfronthosting.co.za> New submission from Vladimir M. : The page at (http://docs.python.org/reference/datamodel.html) says: "In x * y, if one operator is a sequence that implements sequence repetition". Obviuosly, it should be changed to: "In x * y, if one operand is a sequence that implements sequence repetition". ---------- assignee: docs at python components: Documentation messages: 137352 nosy: Vladimir.M., docs at python priority: normal severity: normal status: open title: Datamodel documentation page: 'operator' where 'operand' should be versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 31 11:45:42 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 31 May 2011 09:45:42 +0000 Subject: [docs] [issue12164] str.translate docstring doesn't mention that 'table' can be None In-Reply-To: <1306214084.99.0.386690557918.issue12164@psf.upfronthosting.co.za> Message-ID: <1306835142.55.0.706736219486.issue12164@psf.upfronthosting.co.za> Petri Lehtinen added the comment: I added a patch a few days ago. How does it look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 31 13:01:37 2011 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 31 May 2011 11:01:37 +0000 Subject: [docs] [issue12164] str.translate docstring doesn't mention that 'table' can be None In-Reply-To: <1306214084.99.0.386690557918.issue12164@psf.upfronthosting.co.za> Message-ID: <1306839697.01.0.0286192053896.issue12164@psf.upfronthosting.co.za> Petri Lehtinen added the comment: After discussing with Ezio Melotti, I attached another patch with a different wording. Mark: As a native English speaker, which one you prefer? ---------- Added file: http://bugs.python.org/file22206/str_translate_docstring_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 31 18:19:02 2011 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 31 May 2011 16:19:02 +0000 Subject: [docs] [issue12223] Datamodel documentation page: 'operator' where 'operand' should be In-Reply-To: <1306834975.07.0.689179229064.issue12223@psf.upfronthosting.co.za> Message-ID: <1306858742.07.0.452644031196.issue12223@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue May 31 19:19:00 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 19:19:00 +0200 Subject: [docs] I find a bug in python 2.7 In-Reply-To: References: Message-ID: Hello, 2011/5/25 s1n4 c0der > > I find a bug in python 2.7 > > please check these > > print 'A\b' * 10000000L Could you please describe the nature of what you think it's a bug? I tried on Debian python 2.6 and 2.7 and also on a freshly built 2.7 (from hg) and the all behave the same: a 10 million loop that prints 'A' and then goes back one char. Please also note that this is not a bug reporting list, you should probably contact: http://mail.python.org/mailman/listinfo/python-list Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 31 19:23:27 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 19:23:27 +0200 Subject: [docs] Tutorial In-Reply-To: References: Message-ID: Hello John, On Thu, May 26, 2011 at 21:20, Ortmann, John E wrote: > Hello, > > I have been going through one of the tutorials on the Python website and I > have come across a code that does not seem to generate any output when I use > it in my Python interpreter.? The second example under "4.2 for Statements" > on the page http://docs.python.org/tutorial/controlflow.html does not return > anything. just to be sure I understand your request, after the for loop: >>> for x in a[:]: ... if len(x) > 6: a.insert(0, x) ... did you also entered 'a' and pressed ENTER: >>> a ['defenestrate', 'cat', 'window', 'defenestrate'] ? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue May 31 20:01:42 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 31 May 2011 18:01:42 +0000 Subject: [docs] [issue12228] Stat doc - fix swap of UF_OPAQUE and UF_NOUNLINK description In-Reply-To: <1306864902.26.0.858229152162.issue12228@psf.upfronthosting.co.za> Message-ID: <1306864902.26.0.858229152162.issue12228@psf.upfronthosting.co.za> New submission from Sandro Tosi : Following http://mail.python.org/pipermail/docs/2011-May/004429.html, here's a patch that fix the swap of those 2 flags description; it applies cleanly (except for some offset) on 2.7, 3.1, 3.2 and default. ---------- assignee: docs at python components: Documentation files: doc_stat_uf_opaque_nounlink-py27.patch keywords: patch messages: 137377 nosy: docs at python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Stat doc - fix swap of UF_OPAQUE and UF_NOUNLINK description versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22212/doc_stat_uf_opaque_nounlink-py27.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue May 31 20:02:32 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 20:02:32 +0200 Subject: [docs] documentation bug report: stat.UF_OPAQUE In-Reply-To: <4DD2ED6B.6080204@slac.stanford.edu> References: <4DD2ED6B.6080204@slac.stanford.edu> Message-ID: Hello Christopher On Tue, May 17, 2011 at 23:49, Christopher Ford wrote: > Hi, > > It looks like the description of stat.UF_OPAQUE and stat.UF_NOUNLINK are > swapped in the Python v2.7.1 documentation: > ?http://docs.python.org/library/stat.html > >> stat.UF_OPAQUE >> ? ?The file may not be renamed or deleted. >> >> stat.UF_NOUNLINK >> ? ?The directory is opaque when viewed through a union stack. you're right, they were swapped: I opened http://bugs.python.org/issue12228 to track the fix. JFTR I used http://fuse4bsd.creo.hu/localcgi/man-cgi.cgi?chflags+2 as reference. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 31 21:45:28 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 21:45:28 +0200 Subject: [docs] I find a bug in python 2.7 In-Reply-To: References: Message-ID: Hello, please keep the list in the loop, so everyone else is up to date. 2011/5/31 s1n4 c0der : >> Could you please describe the nature of what you think it's a bug? I >> tried on Debian python 2.6 and 2.7 and also on a freshly built 2.7 >> (from hg) and the all behave the same: a 10 million loop that prints >> 'A' and then goes back one char. >> > I know what is BUG but, i sent an image at my test. but your image is not visible, as you can check here: http://mail.python.org/pipermail/docs/2011-May/004474.html > Please review this in python IDLE (on windows): > >>>> print 'A\b' * 10 > A A A A A A A A A A That may, or may not, be the expected behaviour, >> Please also note that this is not a bug reporting list, you should >> probably contact: http://mail.python.org/mailman/listinfo/python-list and to study deeper I encourage to write to the above mailing list. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 31 22:05:33 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 22:05:33 +0200 Subject: [docs] Num Lock key in IDLE In-Reply-To: References: Message-ID: Hello Juan, On Thu, May 19, 2011 at 02:00, Juan Benavente Ponce wrote: > ?Hello! I think it would be a nice addition to IDLE's documentation if it > was mentioned that if you toggle "Num Lock" on, "Home" key behavior changes: > pressing it while in the Python Shell window makes the cursor to be carried > to the start of text on the line, skipping whitespace or the prompt > characters; instead of to the absolute start of the line. I think I don't understand your description or I'm unable to replicate it. Could you please tell us what operating system you're using, what version of python/idle you're using and the detailed list of steps to replicate this behavior? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue May 31 23:02:58 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 31 May 2011 21:02:58 +0000 Subject: [docs] [issue10772] Several actions for argparse arguments missing from docs In-Reply-To: <1293327184.11.0.454888760887.issue10772@psf.upfronthosting.co.za> Message-ID: <1306875778.04.0.631561565281.issue10772@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue May 31 23:02:52 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 23:02:52 +0200 Subject: [docs] argparse count action missing In-Reply-To: References: Message-ID: Hi Tom, On Thu, May 26, 2011 at 00:04, Tom Ekberg wrote: > In the page > > ?http://docs.python.org/library/argparse.html#action > > section 15.4.3.2 lists the actions. I was looking at someone elses code which used action='count' which I couldn't find in the above document. I ended up looking at the code to find out about it (use the source Luke). Please consider adding something like the following to describe this action: This is tracked at: http://bugs.python.org/issue10772 Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 31 23:25:31 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 23:25:31 +0200 Subject: [docs] Found an ambiguity in the documentation In-Reply-To: <7e6d46b1.7fda40ae.4dd66c93.5154d@o2.pl> References: <7e6d46b1.7fda40ae.4dd66c93.5154d@o2.pl> Message-ID: Hello Pawe?, On Fri, May 20, 2011 at 15:28, pawel_s1 wrote: > Hello, > In the programming FAQ: http://docs.python.org/faq/programming.html > by the question ?How can I have modules that mutually import each other?? there is a statement: > ?Guido van Rossum recommends avoiding all uses of from import ..., and placing all code inside functions.? > So, does that mean ?avoiding all uses of (?) and avoiding placing all code inside functions?, or ?avoiding all uses of (?) and instead placing all code inside functions?? the next phrase on that paragraph should explain: "Initializations of global variables and class variables should use constants or built-in functions only" so "Guido (...) recommends avoiding (...), and placing (....)". Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue May 31 23:52:43 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 31 May 2011 23:52:43 +0200 Subject: [docs] The function pkgutil.iter_modules is not flagged as new In-Reply-To: <5E25C96030E66B44B9CFAA95D3DE5919351310A7A4@EX-MB08.ohsu.edu> References: <5E25C96030E66B44B9CFAA95D3DE5919351310A7A4@EX-MB08.ohsu.edu> Message-ID: Hello Brendan, On Wed, Apr 27, 2011 at 21:04, Brendan Moloney wrote: > Hello, > > The funtion pkgutil.iter_modules was added sometime between Python 2.4 and Python 2.6 but this is not noted in the documentation. If I did my homework fine, it should have been introduced between Alpha1 and Alpha2 of 2.5. Given so long has passed, and the fact we don't have a consistent policy (if there's any at all) for marking old functions (but we do for new functions) introduction release, I don't see much value in adding this info now. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From kekelo1603 at gmail.com Tue May 31 10:31:39 2011 From: kekelo1603 at gmail.com (kk6) Date: Tue, 31 May 2011 17:31:39 +0900 Subject: [docs] I found misdescription Message-ID: Dear Python documentation Team. I am Japanese Python user. I found misdescription in following url. http://docs.python.org/py3k/library/collections.html#collections.OrderedDict The missdescription is in this page's "move_to_end" method's example. ---------------------------------------------------------------------- >>> d = OrderedDict.fromkeys('abcde') >>> d.move_to_end('b') >>> ''.join(d.keys) 'acdeb' >>> d.move_to_end('b', last=False) >>> ''.join(d.keys) 'bacde' ---------------------------------------------------------------------- Above the example's line3 and line6, "d.keys" is lack of parentheses of callable. It raise TypeError in this case to carry along. Respectfully, Hiro Ashiya @kk6 (in twitter)