From report at bugs.python.org Tue May 1 22:27:03 2012 From: report at bugs.python.org (James Hutchison) Date: Tue, 01 May 2012 20:27:03 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1335904023.66.0.586151516086.issue10376@psf.upfronthosting.co.za> James Hutchison added the comment: See attached, which will open a zipfile that contains one file and reads it a bunch of times using unbuffered and buffered idioms. This was tested on windows using python 3.2 You're in charge of coming up with a file to test it on. Sorry. Example output: Enter filename: test.zip Timing unbuffered read, 5 bytes at a time. 10 loops took 6.671999931335449 Timing buffered read, 5 bytes at a time (4000 byte buffer). 10 loops took 0.7350001335144043 ---------- Added file: http://bugs.python.org/file25432/zipfiletest.py _______________________________________ Python tracker _______________________________________ From ashok.sekharan at gmail.com Tue May 1 10:06:18 2012 From: ashok.sekharan at gmail.com (ashok sekharan) Date: Tue, 1 May 2012 13:36:18 +0530 Subject: [docs] Need Clarification Python 2.7 Message-ID: There is a file in python which models lock: acquire and release. One of the above variables is coded. Why should both not be coded as 1 and 0 as per electronics. Is it available in a newer version. If so, which? Thanks and Regards, ASHOK -------------------------------------------------- Ashok Sekharan MY address is - #201, Cosmos Villa, 2nd B Cross, Banaswadi-Ramamurthy Nagar Main Road, Near MSR Swimming Facility, Banaswadi, Bangalore - 560033 Engineer (EE) -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashok.sekharan at gmail.com Wed May 2 11:00:20 2012 From: ashok.sekharan at gmail.com (ashok sekharan) Date: Wed, 2 May 2012 14:30:20 +0530 Subject: [docs] Fwd: Need Clarification Python 2.7 (continuation to previous mail) Message-ID: in file import.h in include/python2.7 (as part of django installation) #define _PyImport_AcquireLock() #define _PyImport_ReleaseLock() 1 Should this be hardcoded as 0 and 1 for each of the above statements. Thanks and Regards, Ashok ---------- Forwarded message ---------- From: ashok sekharan Date: Tue, May 1, 2012 at 1:36 PM Subject: Need Clarification Python 2.7 To: docs at python.org There is a file in python which models lock: acquire and release. One of the above variables is coded. Why should both not be coded as 1 and 0 as per electronics. Is it available in a newer version. If so, which? Thanks and Regards, ASHOK -------------------------------------------------- Ashok Sekharan MY address is - #201, Cosmos Villa, 2nd B Cross, Banaswadi-Ramamurthy Nagar Main Road, Near MSR Swimming Facility, Banaswadi, Bangalore - 560033 Engineer (EE) -------------------------------------------------- -- -------------------------------------------------- Ashok Sekharan MY address is - #201, Cosmos Villa, 2nd B Cross, Banaswadi-Ramamurthy Nagar Main Road, Near MSR Swimming Facility, Banaswadi, Bangalore - 560033 Engineer (EE) -------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From morrison.sotelo at gmail.com Thu May 3 09:50:29 2012 From: morrison.sotelo at gmail.com (Juan Bocadillo) Date: Thu, 3 May 2012 08:50:29 +0100 Subject: [docs] Minor error in the trigonometry documentation Section 9.2 Message-ID: Hello there, This is a very minor issue, however I felt that I should point it out. On this page the sine, cosine, tangent are listed as being in radians. This is strictly untrue since the result of these functions is a pure number ratio between two sides, not an angle. Kind Regards, Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ruben.nielsen at mosek.com Thu May 3 10:16:59 2012 From: ruben.nielsen at mosek.com (Ruben Nielsen) Date: Thu, 3 May 2012 10:16:59 +0200 Subject: [docs] trouble with os.system Message-ID: Hello, I've been trying to build a python module that needs to call an external script. I have tried both with os.system() and subprocess.call() Trouble is, both of them return value 0 meaning 'they succesfully ran the script', however, the script isn't run properly. os.system('/var/www/lmcrypt -i '+lic_out_loc+licfilename+' -o '+lic_out_loc+licfilename+'final') call([/var/www/lmcrypt,'-i',lic_out_loc+licfilename,'-o',lic_out_loc+licfilename+'final']) when the script lmcrypt is run from any user through the terminal, the output file is generated successfully, but when the call is invoked through python, only empty files are generated. With what i've checked, it looks like it must be a problem within python. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Thu May 3 23:58:54 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 3 May 2012 23:58:54 +0200 Subject: [docs] Fwd: Need Clarification Python 2.7 (continuation to previous mail) In-Reply-To: References: Message-ID: Hello ashok, this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. I'd suggest to contact a user support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Wed, May 2, 2012 at 11:00 AM, ashok sekharan wrote: > in file import.h in include/python2.7 (as part of django installation) > > #define _PyImport_AcquireLock() > #define _PyImport_ReleaseLock() 1 > > Should this be hardcoded as 0 and 1 for each of the above statements. > > Thanks and Regards, > Ashok > > ---------- Forwarded message ---------- > From: ashok sekharan > Date: Tue, May 1, 2012 at 1:36 PM > Subject: Need Clarification Python 2.7 > To: docs at python.org > > > > There is a file in python which models lock: acquire and release. > > One of the above variables is coded. Why should both not be coded as 1 and 0 > as per electronics. > > Is it available in a newer version. If so, which? > > Thanks and Regards, > ASHOK > -------------------------------------------------- > Ashok Sekharan > MY address is - > #201, Cosmos Villa, 2nd B Cross, Banaswadi-Ramamurthy Nagar Main Road, > Near MSR Swimming Facility, Banaswadi, Bangalore - 560033 > Engineer (EE) > -------------------------------------------------- > > > > > -- > -------------------------------------------------- > Ashok Sekharan > MY address is - > #201, Cosmos Villa, 2nd B Cross, Banaswadi-Ramamurthy Nagar Main Road, > Near MSR Swimming Facility, Banaswadi, Bangalore - 560033 > Engineer (EE) > -------------------------------------------------- > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- 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 4 00:00:37 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 4 May 2012 00:00:37 +0200 Subject: [docs] trouble with os.system In-Reply-To: References: Message-ID: Hello Ruben, this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. I'd suggest to contact a user support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Thu, May 3, 2012 at 10:16 AM, Ruben Nielsen wrote: > Hello, I've been trying to build a python module that needs to call an > external script. > > I have tried both with os.system() and subprocess.call() > Trouble is, both of them return value 0 meaning 'they succesfully ran the > script', however, the script isn't run properly. > > os.system('/var/www/lmcrypt -i '+lic_out_loc+licfilename+' -o > '+lic_out_loc+licfilename+'final') > call([/var/www/lmcrypt,'-i',lic_out_loc+licfilename,'-o',lic_out_loc+licfilename+'final']) > > when the script lmcrypt is run from any user through the terminal, the > output file is generated successfully, but when the call is invoked through > python, only empty files are generated. With what i've checked, it looks > like it must be a problem within python. > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- 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 4 00:18:35 2012 From: report at bugs.python.org (py.user) Date: Thu, 03 May 2012 22:18:35 +0000 Subject: [docs] [issue14717] In generator's .close() docstring there is one argument Message-ID: <1336083515.09.0.187983865633.issue14717@psf.upfronthosting.co.za> New submission from py.user : >>> g >>> print(g.close.__doc__) close(arg) -> raise GeneratorExit inside generator. >>> g.close(1) Traceback (most recent call last): File "", line 1, in TypeError: close() takes no arguments (1 given) >>> ---------- assignee: docs at python components: Documentation messages: 159882 nosy: docs at python, py.user priority: normal severity: normal status: open title: In generator's .close() docstring there is one argument versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 00:44:40 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 May 2012 22:44:40 +0000 Subject: [docs] [issue14717] In generator's .close() docstring there is one argument In-Reply-To: <1336083515.09.0.187983865633.issue14717@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset b8c1cabcd115 by Benjamin Peterson in branch '3.2': close() doesn't take any args (closes #14717) http://hg.python.org/cpython/rev/b8c1cabcd115 New changeset b2031eb95dd9 by Benjamin Peterson in branch '2.7': close() doesn't take any args (closes #14717) http://hg.python.org/cpython/rev/b2031eb95dd9 New changeset da12cb2461d1 by Benjamin Peterson in branch 'default': merge 3.2 (#14717) http://hg.python.org/cpython/rev/da12cb2461d1 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 20:06:52 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 May 2012 18:06:52 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1336154812.78.0.3609535199.issue14692@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: json.joads parse_constant callback not working anymore -> json.loads parse_constant callback not working anymore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 4 20:29:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 May 2012 18:29:11 +0000 Subject: [docs] [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1336156151.05.0.396613130667.issue13790@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sat May 5 20:31:45 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 5 May 2012 20:31:45 +0200 Subject: [docs] doctest directives not displayed in online documentation for 2.7.3 In-Reply-To: References: Message-ID: Hello Hobson, On Thu, Apr 26, 2012 at 7:00 AM, Hobson Lane wrote: > The doctest directive example code blocks on the doctest documentation > page?do not contain the described directives > (http://docs.python.org/library/doctest.html) ,?approximately 1/3 of the way > down the page. > > Perhaps sphinx or??is hiding all python doctest string comments and > processing the doctest directives rather than displaying the raw code block? Yep the problem is that sphinx is currently ignoring doctest directives[1]; it was fixed in the upcoming sphinx 1.1[2]. I think we will have to update the sphinx versions we're using to fix it - it will be a slow process but we'll get to it :) [1] https://bitbucket.org/birkenfeld/sphinx/issue/169/strip-doctest-comments-in-rendered-output [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef 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 Sun May 6 15:55:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 May 2012 13:55:27 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 48385618525b by Ezio Melotti in branch '2.7': #14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/48385618525b New changeset 11703cb2a2f3 by Ezio Melotti in branch '3.2': #14034: added the argparse tutorial. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/11703cb2a2f3 New changeset 645969f4193b by Ezio Melotti in branch 'default': #14034: merge argparse tutorial from 3.2. http://hg.python.org/cpython/rev/645969f4193b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 16:06:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 May 2012 14:06:01 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 549aa1460811 by Ezio Melotti in branch '2.7': #14034: adapt to Python 2 and fix indentation. http://hg.python.org/cpython/rev/549aa1460811 New changeset d5b7be0629c0 by Ezio Melotti in branch '3.2': #14034: fix indentation. http://hg.python.org/cpython/rev/d5b7be0629c0 New changeset e14c860f6eee by Ezio Melotti in branch 'default': #14034: merge indentation fixes from 3.2. http://hg.python.org/cpython/rev/e14c860f6eee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 16:10:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 May 2012 14:10:35 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za> Message-ID: <1336313435.91.0.579168451592.issue14034@psf.upfronthosting.co.za> Ezio Melotti added the comment: Committed, thanks for the patch! (Note that the example with "TypeError: unorderable types: NoneType() >= int()" works fine in Python 2 (by accident), and that I left it unchanged. Some error messages are also different on Python 2, but I left the ones from Python 3.) ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 16:17:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 May 2012 14:17:07 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1336313827.24.0.274496462879.issue14674@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 18:22:50 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Sun, 06 May 2012 16:22:50 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1336321370.05.0.63653582892.issue14674@psf.upfronthosting.co.za> Nurhusien Hasen added the comment: find python truste .net all serves ---------- nosy: +Nurhusien.Hasen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 19:19:30 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Sun, 06 May 2012 17:19:30 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1336321370.05.0.63653582892.issue14674@psf.upfronthosting.co.za> Message-ID: Nurhusien Hasen added the comment: find python .org public all serves On 5/6/12, Nurhusien Hasen wrote: > > Nurhusien Hasen added the comment: > > find python truste .net all serves > > ---------- > nosy: +Nurhusien.Hasen > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 19:26:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 May 2012 17:26:14 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1336325174.05.0.829814324691.issue14674@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg160089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 19:26:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 May 2012 17:26:19 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1336325179.41.0.906884832984.issue14674@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg160098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 6 19:26:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 May 2012 17:26:46 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1336325206.51.0.840839279749.issue14674@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: -Nurhusien.Hasen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 10:03:14 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 07 May 2012 08:03:14 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1336313435.91.0.579168451592.issue14034@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: thanks so much for your rime in reviewing and committing ---------- _______________________________________ Python tracker _______________________________________ From hobsonlane at gmail.com Sun May 6 02:59:22 2012 From: hobsonlane at gmail.com (Hobson Lane) Date: Sun, 6 May 2012 08:59:22 +0800 Subject: [docs] doctest directives not displayed in online documentation for 2.7.3 In-Reply-To: References: Message-ID: thanks On Sun, May 6, 2012 at 2:31 AM, Sandro Tosi wrote: > Hello Hobson, > > On Thu, Apr 26, 2012 at 7:00 AM, Hobson Lane wrote: > > The doctest directive example code blocks on the doctest documentation > > page do not contain the described directives > > (http://docs.python.org/library/doctest.html) , approximately 1/3 of > the way > > down the page. > > > > Perhaps sphinx or is hiding all python doctest string comments and > > processing the doctest directives rather than displaying the raw code > block? > > Yep the problem is that sphinx is currently ignoring doctest > directives[1]; it was fixed in the upcoming sphinx 1.1[2]. I think we > will have to update the sphinx versions we're using to fix it - it > will be a slow process but we'll get to it :) > > [1] > https://bitbucket.org/birkenfeld/sphinx/issue/169/strip-doctest-comments-in-rendered-output > [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef > > Regards, > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pnorvig at google.com Mon May 7 10:24:41 2012 From: pnorvig at google.com (Peter Norvig) Date: Mon, 7 May 2012 01:24:41 -0700 Subject: [docs] bug in the destination of repr() in functions table Message-ID: On page http://docs.python.org/library/functions.html , there is a table, "Built-in Functions" at the top. The entry for *repr()* links to http://docs.python.org/library/repr.html#module-repr This is incorrect; it should link to http://docs.python.org/library/functions.html#repr -------------- next part -------------- An HTML attachment was scrubbed... URL: From killianditch at gmail.com Sat May 5 00:51:23 2012 From: killianditch at gmail.com (Killian Ditch) Date: Fri, 4 May 2012 17:51:23 -0500 Subject: [docs] Documentation/Tutorial Update Message-ID: Hello, I just wanted to point out that the tutorial is still using a previous version of Python, and there are various places where a newbie could be thrown, e.g., telling one to use "print" vs "print(x)". An update would be awesome :-). -Killian Ditch -------------- next part -------------- An HTML attachment was scrubbed... URL: From teejahkirton at live.com Sat May 5 23:38:38 2012 From: teejahkirton at live.com (e.kirton) Date: Sat, 5 May 2012 17:38:38 -0400 Subject: [docs] python bug i thinkso Message-ID: This is my code: print('#1') one = input () one = int (one) print('#2') two = input () two = int (two) ans = (one)+(two) print ('answer') + repr (ans) then i get this message when working the sum: Traceback (most recent call last): File "C:\Python32\my.py", line 8, in print ('answer') + repr (ans) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' Is it a bug or is it justme -------------- next part -------------- An HTML attachment was scrubbed... URL: From tguinard at gmail.com Mon May 7 06:32:44 2012 From: tguinard at gmail.com (Theresa Guinard) Date: Sun, 6 May 2012 22:32:44 -0600 Subject: [docs] Typo in help menu Message-ID: Hello, In the python 2.7 interpreter's help option, the message says, "Welcome to Python 2.7!" Please, never put an exclamation point after a number when you don't mean factorial. Even if that number is not an integer. Thank you, Theresa -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Mon May 7 13:17:49 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 7 May 2012 13:17:49 +0200 Subject: [docs] Typo in help menu In-Reply-To: References: Message-ID: Hello Theresa, On Mon, May 7, 2012 at 6:32 AM, Theresa Guinard wrote: > Hello, > In the python 2.7 interpreter's help option, the message says, "Welcome to > Python 2.7!" ?Please, never put an exclamation point after a number when you > don't mean factorial. ?Even if that number is not an integer. I'm sorry but I fail to see how that would cause any problem: it's quite unlikely anyone will think about it as a factorial (actually it would require the gamma function, not exactly known to many) instead of something related to python. 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 Mon May 7 13:18:58 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 7 May 2012 13:18:58 +0200 Subject: [docs] python bug i thinkso In-Reply-To: References: Message-ID: Hello, this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. I'd suggest to contact a user support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Sat, May 5, 2012 at 11:38 PM, e.kirton wrote: > This is my code: print('#1') > > one = input () > > one = int (one) > > print('#2') > > two = input () > > two = int (two) > > ans = (one)+(two) > > print ('answer') + repr (ans) > > then i get this message when working the sum: Traceback (most recent call > last): > > ? File "C:\Python32\my.py", line 8, in > > ??? print ('answer') + repr (ans) > > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > Is it a bug or is it justme > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- 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 Mon May 7 13:36:26 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 7 May 2012 13:36:26 +0200 Subject: [docs] Documentation/Tutorial Update In-Reply-To: References: Message-ID: Hello Killian, On Sat, May 5, 2012 at 12:51 AM, Killian Ditch wrote: > I just wanted to point out that the tutorial is still using a previous > version of Python, and there are various places where a newbie could be > thrown, e.g., telling one to use "print" vs "print(x)".? An update would be > awesome :-). Could you please provide a direct link to the resources you're referring to? 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 Mon May 7 22:00:01 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 7 May 2012 22:00:01 +0200 Subject: [docs] bug in the destination of repr() in functions table In-Reply-To: References: Message-ID: Hello Peter, thanks for you're email (it's actually an honor replying to you ;) ) On Mon, May 7, 2012 at 10:24 AM, Peter Norvig wrote: > On page?http://docs.python.org/library/functions.html , there is a table, > "Built-in Functions" at the top. ?The entry for repr()?links to > http://docs.python.org/library/repr.html#module-repr This is incorrect; it > should link to?http://docs.python.org/library/functions.html#repr Thanks for spotting it: it has just been fixed in http://hg.python.org/cpython/rev/07b3fc67bf45 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 7 23:32:41 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 May 2012 21:32:41 +0000 Subject: [docs] [issue12298] Sphinx glitch in library/functions In-Reply-To: <1307635612.57.0.782200385704.issue12298@psf.upfronthosting.co.za> Message-ID: <1336426361.12.0.854722455054.issue12298@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sandro ported to 2.7 in 07b3fc67bf45. Thanks! If I may make two remarks: - Please duplicate commit messages from 3.2 and 2.7: it makes it easier to understand what a changeset is about without having to hunt. (This does not apply to 3.3 as the changeset with the full commit message is a direct parent and thus easily found.) - I?m not retired yet :) ---------- nosy: +sandro.tosi resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 23:41:59 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 07 May 2012 21:41:59 +0000 Subject: [docs] [issue12298] Sphinx glitch in library/functions In-Reply-To: <1307635612.57.0.782200385704.issue12298@psf.upfronthosting.co.za> Message-ID: <1336426918.99.0.195642677784.issue12298@psf.upfronthosting.co.za> Sandro Tosi added the comment: Oh sorry ?ric, I completely oversaw there was an issue associated with the cset - i'll pay more attention next time! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 7 23:43:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 May 2012 21:43:11 +0000 Subject: [docs] [issue12298] Sphinx glitch in library/functions In-Reply-To: <1307635612.57.0.782200385704.issue12298@psf.upfronthosting.co.za> Message-ID: <1336426991.07.0.457727229909.issue12298@psf.upfronthosting.co.za> ?ric Araujo added the comment: No problem, what counts is that our documentation and code get better for our users, not my ego :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 03:08:20 2012 From: report at bugs.python.org (Jeff Laing) Date: Wed, 09 May 2012 01:08:20 +0000 Subject: [docs] [issue14759] Berkeley DB License conditions are onerous (and poorly documented) Message-ID: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> New submission from Jeff Laing : As part of an audit of license compliance, I was looking at the terms in the LICENSE.txt that describe the Berkeley DB product. I had thought this would be under the standard Berkeley license, but Oracle have added their own zinger. * 3. Redistributions in any form must be accompanied by information on * how to obtain complete source code for the DB software and any * accompanying software that uses the DB software. The source code * must either be included in the distribution or be available for no * more than the cost of distribution plus a nominal fee, and must be * freely redistributable under reasonable conditions. So, my application, which embeds Python (rather than running it as python.exe) and includes the standard runtime library, must distribute my source code. This page: http://mail.python.org/pipermail/python-dev/2008-September/082316.html suggests that this is not the case for regular Python, but it makes no statement about "embedding". Sadly the Oracle page it links to suggesting this is not an issue, does not exist. The general "License" page on the Python websites makes no reference whatsoever to Berkeley DB license obligations. I note that there are other modules mentioned on the Licenses webpage that are not in the LICENSES.txt file, and vice versa. I have no idea whether this is deliberate, or an oversight. ---------- assignee: docs at python components: Documentation messages: 160238 nosy: Jeff.Laing, docs at python priority: normal severity: normal status: open title: Berkeley DB License conditions are onerous (and poorly documented) type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 03:19:51 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 May 2012 01:19:51 +0000 Subject: [docs] [issue14759] Berkeley DB License conditions are onerous (and poorly documented) In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336526391.87.0.737354617878.issue14759@psf.upfronthosting.co.za> R. David Murray added the comment: Berkeley DB is no longer part of Python3, so I'm doubtful that this is going to be addressed. If it is addressed, it would have to be by the PSF rather than the developers, since the PSF is responsible for licensing issues. If you wish to pursue this I suggest emailing psf at python.org. I'm going to close this ticket since there is nothing the developers can do about it. ---------- nosy: +r.david.murray stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 04:06:21 2012 From: report at bugs.python.org (Jeff Laing) Date: Wed, 09 May 2012 02:06:21 +0000 Subject: [docs] [issue14759] Berkeley DB License conditions are onerous (and poorly documented) In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336529181.09.0.842581998436.issue14759@psf.upfronthosting.co.za> Jeff Laing added the comment: With all due respect, I think that the 2.7.3 License Page is still being actively used by people as a reference, and it should be accurate. I agree that the code developers can't do anything, but the documentation for all releases, particularly in such a sensitive area as licensing, should be as up to date as possible. Similarly, the 3.0 License page talks about a "_random" module which presumably is going ahead. It has a license agreement displayed on the web page but I did not see that text copied into the regular LICENSE.txt that is part of the Python3 distribution, and that I assume meets the "supporting documentation" clause that all the module licenses seem to demand. Ditto socket. Ditto asyncore and asynchat. Ditto Cookie. Ditto trace. Ditto xmlrpclib. etcetera. I agree this is all a documentation exercise - perhaps there is another bug tracker I should be reporting it in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 09:24:48 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 May 2012 07:24:48 +0000 Subject: [docs] [issue14245] float rounding examples in FAQ are outdated In-Reply-To: <1331372112.92.0.532785259032.issue14245@psf.upfronthosting.co.za> Message-ID: <1336548288.95.0.798361633293.issue14245@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: docs at python -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 13:30:37 2012 From: report at bugs.python.org (Fj) Date: Wed, 09 May 2012 11:30:37 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly Message-ID: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> New submission from Fj : string.split documentation says: > The optional third argument maxsplit defaults to 0. If it is nonzero, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements). It lies! If you give it maxsplit=0 it doesn't do any splits at all! It should say: > The optional third argument maxsplit defaults to **-1**. If it is **nonnegative**, at most maxsplit number of splits occur, ... Additionally, it could specify default values in the function signature explicitly, like re.split does: string.split(s, sep=None, maxsplit=-1) instead of string.split(s, [sep, [maxsplit]]) It seems that the inconsistency stems from the time long forgotten (certainly before 2.5) when string.split used the implementation in stropmodule.c (obsolete), which does indeed uses maxsplit=0 (and on which the re.split convention was based, regrettably). Currently string.split just calls str.split, and that uses maxsplit=-1 to mean unlimited splits. >From searching "maxsplit" in the bug tracker I understand that split functions have had a rather difficult history and some quirks preserved for the sake of backward compatibility, and not documented for the sake of brevity. In this case, however, the documentation does try to document the particular behaviour, but is wrong, which is really confusing. Also, maybe an even better fix would be to change the str.split documentation to use the proper signature (`str.split(sep=None, maxsplit=-1)`), and simply say that string.split(s, sep=None, maxsplit=-1) calls s.split(sep, maxsplit) here? Because that's what it does, while having _two_ different, incomplete, partially wrong explanations of the same thing is confusing! ---------- assignee: docs at python components: Documentation messages: 160273 nosy: Fj, docs at python priority: normal severity: normal status: open title: string.split maxsplit documented incorrectly versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 13:59:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 May 2012 11:59:34 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly In-Reply-To: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset d3ddbad31b3e by Ezio Melotti in branch '2.7': #14763: fix documentation for string.split/rsplit. http://hg.python.org/cpython/rev/d3ddbad31b3e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 14:03:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 May 2012 12:03:27 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly In-Reply-To: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> Message-ID: <1336565007.58.0.26475678381.issue14763@psf.upfronthosting.co.za> Ezio Melotti added the comment: I fixed the doc for string.split/rsplit. I didn't change the signature because all the other functions use the old signature convention (the one with []). These functions are anyway deprecated, so I don't think it's worth spending more time improving their docs (as long as they are not wrong). ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 14:07:06 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 May 2012 12:07:06 +0000 Subject: [docs] [issue14759] Is LICENSES.txt up to date? In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336565226.72.0.817852639425.issue14759@psf.upfronthosting.co.za> R. David Murray added the comment: The LICENSE.txt file is "just" the Python license, which has a rather convoluted history. Newer contributions are all under an Apache-style license from the individual contributors. My understanding (but I'm not a lawyer) is that everything in the distribution has been vetted as available for use under the LISCENSE.txt, which includes commercial use. If you believe that the language either in that file or on the web site does not convey that legally, then psf at python.org is who you need to contact. On the development side, the most we can do is update a license if someone figures out that it is appropriate to do so. For the website text, there's a mailing list listed on the mail.python.org page. There's a project ongoing to make updating the web site easier, but currently there aren't very many developers who do web site updates, and such updates are not tracked on this tracker, just on that mailing list. (Yes, this is not ideal, but it is where we are at right now.) I've added one of those devs as nosy, perhaps he will have additional comments. ---------- nosy: +michael.foord title: Berkeley DB License conditions are onerous (and poorly documented) -> Is LICENSES.txt up to date? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 14:14:11 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 09 May 2012 12:14:11 +0000 Subject: [docs] [issue14759] Is LICENSES.txt up to date? In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336565650.97.0.271891719348.issue14759@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am the maintainer of Berkeley DB python bindings, "pybsddb": http://www.jcea.es/programacion/pybsddb.htm If I recall correctly, Berkeley DB license is something like this: 1. Your code must be open source, if you distribute the programs to others. You can write a program for your business, for instance, and don't care about licensing, if it used internally only. OR 2. You have to pay a license to Oracle. Choose one. I could be mistaken... ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 14:16:06 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 09 May 2012 12:16:06 +0000 Subject: [docs] [issue14759] Is LICENSES.txt up to date? In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336565766.22.0.125574432334.issue14759@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Could be useful if you directly talk to Oracle about this and communicate what you learned. It could even influence pybsddb licensing/documentation :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 14:18:53 2012 From: report at bugs.python.org (Fj) Date: Wed, 09 May 2012 12:18:53 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly In-Reply-To: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> Message-ID: <1336565933.46.0.553379980584.issue14763@psf.upfronthosting.co.za> Fj added the comment: Thank you. > These functions are anyway deprecated Well, yes, but it's the only place you can get information about the default value of maxsplit, short of looking in the source. Which is kind of wrong. Maybe you can also fix str.split docstring to say "If maxsplit is not specified *or negative*, then there is no limit on the number of splits"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 15:51:52 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 09 May 2012 13:51:52 +0000 Subject: [docs] [issue14765] the struct example should give consistent results across different hardware platforms Message-ID: <1336571512.12.0.453082723156.issue14765@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe : This example [1] assumes you are using a specific platform to check it out. I am using amd64, and I get different results. To fix, I prefix the format string with '>': before: pack('hhl', 1, 2, 3) after: pack('>hhl', 1, 2, 3) 1: http://hg.python.org/cpython/file/d3ddbad31b3e/Doc/library/struct.rst#l299 ---------- assignee: docs at python components: Documentation messages: 160291 nosy: docs at python, mark.dickinson, meador.inge, tshepang priority: normal severity: normal status: open title: the struct example should give consistent results across different hardware platforms type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:07:15 2012 From: report at bugs.python.org (Meador Inge) Date: Wed, 09 May 2012 14:07:15 +0000 Subject: [docs] [issue14765] the struct example should give consistent results across different hardware platforms In-Reply-To: <1336571512.12.0.453082723156.issue14765@psf.upfronthosting.co.za> Message-ID: <1336572435.21.0.782296752859.issue14765@psf.upfronthosting.co.za> Meador Inge added the comment: And the examples make an explicit note of that: """ .. note:: All examples assume a native byte order, size, and alignment with a big-endian machine. """ AMD64 is little-endian; the examples are noted to be in big-endian. Is that note not sufficient? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:11:21 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 09 May 2012 14:11:21 +0000 Subject: [docs] [issue14765] the struct example should give consistent results across different hardware platforms In-Reply-To: <1336572435.21.0.782296752859.issue14765@psf.upfronthosting.co.za> Message-ID: <1336572833.25343.1.camel@tshepang> Tshepang Lekhonkhobe added the comment: Sadly, I noticed it only after submitting this report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 16:15:14 2012 From: report at bugs.python.org (Meador Inge) Date: Wed, 09 May 2012 14:15:14 +0000 Subject: [docs] [issue14765] the struct example should give consistent results across different hardware platforms In-Reply-To: <1336571512.12.0.453082723156.issue14765@psf.upfronthosting.co.za> Message-ID: <1336572914.4.0.0376876266131.issue14765@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:38:48 2012 From: report at bugs.python.org (Maxim Doucet) Date: Wed, 09 May 2012 15:38:48 +0000 Subject: [docs] [issue8617] Better document user site-packages in site module doc In-Reply-To: <1273017080.78.0.24275979751.issue8617@psf.upfronthosting.co.za> Message-ID: <1336577928.24.0.96951593026.issue8617@psf.upfronthosting.co.za> Maxim Doucet added the comment: Shouldn't there be an update of the 2.6 documentation too? After your patch, the 2.7 reflects the existence of the "--user" option (see http://docs.python.org/release/2.7.3/install/index.html#alternate-installation-the-user-scheme) but not the 2.6 documentation (http://docs.python.org/release/2.6.8/install/index.html#alternate-installation). In my personal experience, I used the "--home" option with python 2.6 to mimic what "--user" does and it took me 2 weeks to, by chance, stumble upon http://www.python.org/dev/peps/pep-0370/ which informed me that the "--user" option was originally available for python 2.6. If it had been on the 2.6 documentation, it would have been easier and more coherent IMHO. ---------- nosy: +maximd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:40:17 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 May 2012 15:40:17 +0000 Subject: [docs] [issue8617] Better document user site-packages in site module doc In-Reply-To: <1273017080.78.0.24275979751.issue8617@psf.upfronthosting.co.za> Message-ID: <1336578017.53.0.583504028009.issue8617@psf.upfronthosting.co.za> ?ric Araujo added the comment: 2.6 only gets security fixes now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:44:06 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 May 2012 15:44:06 +0000 Subject: [docs] [issue8617] Better document user site-packages in site module doc In-Reply-To: <1273017080.78.0.24275979751.issue8617@psf.upfronthosting.co.za> Message-ID: <1336578245.96.0.454695455145.issue8617@psf.upfronthosting.co.za> ?ric Araujo added the comment: BTW it appears that many people use the most recent 2.7 documentation even if they are using 2.6, because the doc is better and there are notes which tell you if something was changed or added in 2.7. For PEP 370 there are notes in the doc of the site module and the environment variables but I forgot to add one to the distutils doc; I will do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 17:45:50 2012 From: report at bugs.python.org (Maxim Doucet) Date: Wed, 09 May 2012 15:45:50 +0000 Subject: [docs] [issue8617] Better document user site-packages in site module doc In-Reply-To: <1273017080.78.0.24275979751.issue8617@psf.upfronthosting.co.za> Message-ID: <1336578350.75.0.666516792248.issue8617@psf.upfronthosting.co.za> Maxim Doucet added the comment: Fair enough, thank you for the information. As a side note, my original question was in fact more suited for issue10745 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 9 18:30:24 2012 From: report at bugs.python.org (Pierre Quentel) Date: Wed, 09 May 2012 16:30:24 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1336581023.48.0.134673587487.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: Hi, I started working on a revised version of the whole cgi documentation. I mostly changed paragraphs 2 & 3 ("Using the CGI module" and "Higher level interface") and replaced them by a paragraph still called "Using the CGI module" + 2 other paragraphs for special cases : "Multiple fields with the same name" and "File uploads" The content is basically the same but the new presentation is hopefully more clear The patch is attached as file cgi-doc.patch ---------- Added file: http://bugs.python.org/file25512/cgi-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 02:29:07 2012 From: report at bugs.python.org (Jeff Laing) Date: Thu, 10 May 2012 00:29:07 +0000 Subject: [docs] [issue14759] Is LICENSES.txt up to date? In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336609747.18.0.128691955039.issue14759@psf.upfronthosting.co.za> Jeff Laing added the comment: @Jes?s, as has been pointed out already, the Berkeley DB stuff is not part of Python 3 so I don't see any point in discussing this with Oracle. We don't actually use or need the bsddb module, it's just part of the standard runtime library that we ship. We will be removing the bsddb module from our distribution of the runtime library, while our app is embedding the 2.7 interpreter. Once we go to 3.0, the problem becomes moot. When discussing issues related to licensing, a visible audit trail is essential to show that one followed a genuine process in a timely fashion. When the lawyers come howling to our door, I want to be able to point at archived documentation that showed we were not knowingly continuing to violate a license condition once we became aware of it. With respect to mail.python.org mailing lists, the http://docs.python.org/bugs.html page explicitly says "if you want a more persistent record of your issue, you can use the issue tracker for documentation bugs as well". That suggested to me that there were more than just "developers" listening here. I feel like it's getting a bit meta if I raise an issue here requesting that the website be clarified to note that the documentors don't really look at issues here. :-) Thanks to all, my immediate problem is resolved, and I now know that I need to dig a lot deeper into all the documentation each time we upgrade, rather than assume that it's all consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 03:39:07 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 May 2012 01:39:07 +0000 Subject: [docs] [issue14759] BSDDB license missing from liscense page in 2.7. In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336613947.59.0.86008302784.issue14759@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. No, the docs are correct, I'm the one who was mistaken. I thought the license page was on www.python.org, rather than docs.python.org. Developers *do* have full and easy access to docs.python.org, and we do track doc bugs here. As with the rest of our documentation, the license documentation page is "more complete" than the source version. (It's actually not in theory, it's just that it is collected all in one place...but the docs are shipped in the release tarballs, so the info is included in the distribution regardless). The license docs, unlike most of the rest of the docs, don't have 'version added' and 'deprecated' tags, so you have to refer to license page that relates to the specific version of python you are looking at. However, it is not clear to me (given your BSDDB example) that this is in fact the case. So I'm re-opening the issue hoping someone will be willing to do an audit. But as you say, for due diligence you do have to look at the source as well as the docs, even if we fix this. ---------- stage: committed/rejected -> needs patch status: closed -> open title: Is LICENSES.txt up to date? -> BSDDB license missing from liscense page in 2.7. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 04:33:12 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 10 May 2012 02:33:12 +0000 Subject: [docs] [issue14759] BSDDB license missing from liscense page in 2.7. In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336617192.24.0.699126918071.issue14759@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: If your program is not using Berkeley DB in any way, you don't need to worry about its license. The situation is similar to Berkeley DB being included in you linux distribution: if you don't use it, you don't have to worry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:07:57 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 10 May 2012 07:07:57 +0000 Subject: [docs] [issue14187] add "annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336633677.64.0.903795144816.issue14187@psf.upfronthosting.co.za> Chris Rebert added the comment: Any reactions to the strawman wording for the entry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 09:31:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 May 2012 07:31:25 +0000 Subject: [docs] [issue14245] float rounding examples in FAQ are outdated In-Reply-To: <1331372112.92.0.532785259032.issue14245@psf.upfronthosting.co.za> Message-ID: <1336635085.21.0.00561429095376.issue14245@psf.upfronthosting.co.za> Mark Dickinson added the comment: Zbyszek, have you signed a contributor agreement form? [1] If not, please could you do so? Then I can apply this doc contribution. Thanks! [1] http://www.python.org/psf/contrib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 12:11:47 2012 From: report at bugs.python.org (Zbyszek Szmek) Date: Thu, 10 May 2012 10:11:47 +0000 Subject: [docs] [issue14245] float rounding examples in FAQ are outdated In-Reply-To: <1336635085.21.0.00561429095376.issue14245@psf.upfronthosting.co.za> Message-ID: <4FAB945B.5010306@in.waw.pl> Zbyszek Szmek added the comment: Done now. Thanks, Zbyszek ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 13:01:24 2012 From: report at bugs.python.org (Michael Foord) Date: Thu, 10 May 2012 11:01:24 +0000 Subject: [docs] [issue14770] Minor documentation fixes Message-ID: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> New submission from Michael Foord : A bunch of minor fixes for the documentation suggested by Kurt Robinson to the webmaster email address: Below, you will find 15 snippets from the Python 2.7.2 Library and Extension FAQ (http://docs.python.org/faq/library.html), categorized by problem type, accompanied by changes I would suggest or by questions I would have for the author. ********** Wrong word or missing word ********** (1) CURRENT TEXT: "Eventually you'll learn what's in the standard library and will able to skip this step." SUGGESTION: Change "will able" to "will be able". (2) CURRENT TEXT: "The location of the sendmail program varies between systems; sometimes it is /usr/lib/sendmail, sometime /usr/sbin/sendmail." SUGGESTION: Replace "sometime" with "sometimes". (3) CURRENT TEXT: "The Python parent can of course explicitly flush the data it sends to the child before it reads any output, but if the child is a naive C program it may have been written to never explicitly flush its output, even if it is interactive, since flushing is normally automatic." QUESTION: Is "naive C program" the intended wording or should it be "native C program"? (4) CURRENT TEXT: "[HTMLgen is] used when you are writing in Python and wish to synthesize HTML pages for generating a web or for CGI forms, etc." QUESTION: I believe "web" should be "webpage". Correct? (5) CURRENT TEXT: "The default format used by the pickle module is a slow one that results in readable pickles. Making it the default, but it would break backward compatibility." QUESTION: It looks like some words have been left out of the second sentence. What is the intended meaning there? ********** Punctuation issues ********** (6) CURRENT TEXT: "The standard Python source distribution comes with a curses module in the Modules/ subdirectory, though it's not compiled by default (note that this is not available in the Windows distribution - there is no curses module for Windows)." SUGGESTIONS: I believe the major style guides are in agreement that a complete-sentence parenthetical note falling at the end of another sentence should be punctuated as a separate sentence. I also think a semicolon would be more comfortable doing what that dash is doing, but I suppose that's a judgment call. Here's my suggested rewrite for the end of the sentence: ".though it's not compiled by default. (Note that this is not available in the Windows distribution; there is no curses module for Windows)." (7) CURRENT TEXT: "Thus, to read n bytes from a pipe p created with os.popen(), you need to use p.read(n)." SUGGESTION: Put commas before and after "p", or remove the "a" in front of "pipe". (8) CURRENT TEXT: 'For example to send name= "Guy Steele, Jr." .' SUGGESTIONS: Though it won't be apparent in this email, the quotation mark before "Guy" is a close-quote symbol (”). It should be an open-quote symbol (“). I would also put a comma after "for example". (9) CURRENT TEXT: "For example loading a half megabyte of data may take less than a third of a second." SUGGESTION: Insert a comma after "For example". ********** Ambiguity (or at least a momentary miscue) ********** (10) CURRENT TEXT: "For testing, it helps to write the program so that it may be easily tested by using good modular design." SUGGESTION: Though it will be clear for most readers that "by using good modular design" describes the writing process and not the testing process, a rewrite could avoid the miscue and improve the flow: "To get the most out of testing, you should use good modular design in your program." (11) CURRENT TEXT: "A test suite can be associated with each module which automates a sequence of tests." SUGGESTION: Though we can figure out that it's the test suite and not the module which automates a sequence of tests, a rewrite could avoid the miscue and improve readability: "A test suite that automates a sequence of tests can be associated with each module." (12) CURRENT TEXT: "Instead of trying to guess how long a time.sleep() delay will be enough, it's better to use some kind of semaphore mechanism." SUGGESTION: Insert "of" after "how long" to avoid leading to the reader down the path of "how long a time.sleep() delay will last." (13) CURRENT TEXT: "The Queue class maintains a list of objects with .put(obj) to add an item to the queue and .get() to return an item." SUGGESTIONS: Again, we can figure out that those are methods on the class not methods on the objects, but rephrasing the sentence so that it says that unambiguously makes for easier reading: "The Queue class maintains a list of objects and has a .put(obj) method, which adds items to the queue, and .get() method, which returns an item. Shifting momentarily to "content perspective", I think it could be helpful to be more specific about what .get() does. I would suggest changing "returns an item" to something like "returns the item which has been in the queue the longest". ********** Miscellaneous ********** (14) CURRENT TEXT: "This can be caused because the parent expects the child to output more text than it does, or it can be caused by data being stuck in stdio buffers due to lack of flushing." SUGGESTION: "Caused because" strikes my ear as slightly redundant and awkward, but perhaps that's just me. In any case, I think the sentence would read better if it had a more parallel structure: "This can be caused by the parent expecting the child to output more text than it does or by data being stuck in stdio buffers due to lack of flushing." (15) CURRENT TEXT: "The atexit module provides a register function that is similar to C's onexit." SUGGESTION: Change "onexit" to "onexit()". ---------- assignee: docs at python components: Documentation messages: 160333 nosy: docs at python, michael.foord priority: normal severity: normal stage: needs patch status: open title: Minor documentation fixes versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:33:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 May 2012 12:33:22 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly In-Reply-To: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 0415ecd7b0e3 by Ezio Melotti in branch '2.7': #14763: document default maxsplit value for str.split. http://hg.python.org/cpython/rev/0415ecd7b0e3 New changeset 62659067f5b6 by Ezio Melotti in branch '3.2': #14763: document default maxsplit value for str.split. http://hg.python.org/cpython/rev/62659067f5b6 New changeset bcc964092437 by Ezio Melotti in branch 'default': #14763: merge with 3.2. http://hg.python.org/cpython/rev/bcc964092437 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:36:39 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 May 2012 12:36:39 +0000 Subject: [docs] [issue14763] string.split maxsplit documented incorrectly In-Reply-To: <1336563037.57.0.851636000616.issue14763@psf.upfronthosting.co.za> Message-ID: <1336653399.01.0.792234092173.issue14763@psf.upfronthosting.co.za> Ezio Melotti added the comment: I now documented it in the documentation of str.split too. I left the docstrings alone since they don't need to be as exhaustive as the official documentation, and there's normally no reason to use -1 directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 14:44:16 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 May 2012 12:44:16 +0000 Subject: [docs] [issue14759] BSDDB license missing from liscense page in 2.7. In-Reply-To: <1336525700.66.0.626657341837.issue14759@psf.upfronthosting.co.za> Message-ID: <1336653856.09.0.454508391332.issue14759@psf.upfronthosting.co.za> R. David Murray added the comment: Given the way Oracle is currently behaving, I personally think he is wise to delete it. It's optional at build-time anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 15:13:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 May 2012 13:13:16 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: <1336655595.4.0.451658883378.issue14770@psf.upfronthosting.co.za> Ezio Melotti added the comment: Attached a patch that addresses these problems: 1) done; 2) done; 3) I think "naive" is correct here (i.e. a naive program won't take care of flushing); 4) I remove the list of modules and left the link to the wiki page; 5) In the rst source there's a note that says "update this, default protocol is 2/3", but the pickle doc says "If a protocol is not specified, protocol 0 is used.". I left this unchanged for now; 6) done, but the dash seems ok to me, so I left it; 7) the comma sounds wrong to me, but I turned p to italic; 8) I think this is a Sphinx glitch (there might be already an issue for this somewhere). I added the comma; 9) done; 10) I rephrased the sentence; 11) done; 12) I rephrased the sentence; 13) I rephrased the sentence; 14) done; 15) done; ---------- assignee: docs at python -> ezio.melotti keywords: +patch nosy: +eric.araujo, ezio.melotti, r.david.murray, sandro.tosi stage: needs patch -> patch review type: -> enhancement Added file: http://bugs.python.org/file25518/issue14770.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 16:34:12 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 10 May 2012 14:34:12 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: <1336660452.43.0.556527055858.issue14770@psf.upfronthosting.co.za> Georg Brandl added the comment: Re 5: the sentence needs to be rephrased in any case, because it's ungrammatical Re 8: it's not text, it's code, so it needs to go in code markup ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 17:01:31 2012 From: report at bugs.python.org (Pierre Quentel) Date: Thu, 10 May 2012 15:01:31 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1336662090.17.0.404446431927.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: I attach a new version after sharing thought with Glenn CGI scripts are still unable to define which encoding to use to print the strings received from the user agent. A patch was proposed #11066 but the issue is still pending. The new version documents this issue ---------- Added file: http://bugs.python.org/file25519/cgi-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 17:04:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 May 2012 15:04:10 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: <1336662250.09.0.47928903237.issue14770@psf.upfronthosting.co.za> Ezio Melotti added the comment: Addressed 5) and 8). ---------- Added file: http://bugs.python.org/file25520/issue14770-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 17:37:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 10 May 2012 15:37:20 +0000 Subject: [docs] [issue14187] add "annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336664240.53.0.00728299220111.issue14187@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me, with the proviso that it should be ?function annotation?. ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 10 20:11:29 2012 From: report at bugs.python.org (Tom Pinckney) Date: Thu, 10 May 2012 18:11:29 +0000 Subject: [docs] [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1336673489.73.0.0266622139109.issue6696@psf.upfronthosting.co.za> Tom Pinckney added the comment: Looking at the current docs for 3.3, it looks like there are a bunch of other ways that the docs could be clarified: 1) Proper documentation of the complete profile.Profile() and cProfile.Profile() interfaces. 2) Adding other examples to the quick start section at the top for how to process the resulting stats without printing them to stdout or writing them to a file. I'll take a stab at this. ---------- nosy: +thomaspinckney3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 00:24:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 May 2012 22:24:07 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1336688646.86.0.522953899714.issue10376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not because zipfile module is unbuffered. This is the difference between expensive function call and cheap bytes slicing. Replace `zf.open(namelist [0])` to `io.BufferedReader(zf.open(namelist [0]))` to see the effect of a good buffering. In 3.2 zipfile read() implemented not optimal, so it slower (twice), but in 3.3 it will be almost as fast as using io.BufferedReader. It is still several times more slowly than bytes slicing, but there's nothing you can do with it. Here is a patch, which is speeds up (+20%) the reading from a zip file by small chunks. Microbenchmark: ./python -m zipfile -c test.zip python ./python -m timeit -n 1 -s "import zipfile;zf=zipfile.ZipFile('test.zip')" "with zf.open('python') as f:" " while f.read(1):pass" Python 3.3 (vanilla): 1 loops, best of 3: 36.4 sec per loop Python 3.3 (patched): 1 loops, best of 3: 30.1 sec per loop Python 3.3 (with io.BufferedReader): 1 loops, best of 3: 30.2 sec per loop And, for comparison, Python 3.2: 1 loops, best of 3: 74.5 sec per loop ---------- components: -Documentation keywords: +patch versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file25530/zipfile_optimize_read.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 00:26:06 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 May 2012 22:26:06 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1336688766.95.0.350506055085.issue10376@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 01:42:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 10 May 2012 23:42:05 +0000 Subject: [docs] [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1336693325.86.0.261339374718.issue6696@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 02:06:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 May 2012 00:06:32 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: <1336694792.08.0.171455145923.issue14770@psf.upfronthosting.co.za> ?ric Araujo added the comment: A lot of good editions! +``$PATH``:: Would it be worth using :envvar:`PATH` here? Python-specific envvars (e.g. PYTHONPATH) are documented and can be linked to, maybe a small entry to explain common envvars like HOME and PATH would be a useful addition for novice programmers. +module in the :file:`Modules` subdirectory, You can also use :source:`Modules` to generate a link to the repo; for people who don?t know how to get a Python clone or source distribution (or don?t want to), a link is better than just a file name. +When run, this will produce the following output:: Using ?.. code-block:: none? here would avoid misleading colorization. -Thus, to read n bytes from a pipe p created with :func:`os.popen`, you need to +Thus, to read n bytes from a pipe *p* created with :func:`os.popen`, you need to I?d mark up *n* too. +varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes That?s a program name too, so for consistency you could use :program:, although I?m not sure that role is worth using. +By default :mod:`pickle` uses a relatively old and slow format for backward +compatibility. I trust you will update that comment for the 3.x version. ---------- _______________________________________ Python tracker _______________________________________ From jortiz at alma.cl Tue May 8 17:51:37 2012 From: jortiz at alma.cl (Jose Ortiz) Date: Tue, 08 May 2012 11:51:37 -0400 Subject: [docs] Bug in Errors and Exceptions tutorial Message-ID: <4FA94109.3090407@alma.cl> Dear Python staff: Please take a look at: http://docs.python.org/tutorial/errors.html In section 8.3. Handling Exceptions, first paragraph, it says: "(...)Look at the following example(...) note that a user-generated interruption is signalled by raising the KeyboardInterrupt exception." The "following example" does not contain any reference to the KeyboardInterrupt exception. Thanks! Regards, Jos? Ortiz ALMA (Atacama Large Millimeter/Submillimeter Array) ADE Electrical Engineer Phone: +56-2-4676244 Mobile: +56-9-93201194 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: faecdfgj.png Type: image/png Size: 19198 bytes Desc: not available URL: From leland.hulbert at solutionset.com Tue May 8 16:53:12 2012 From: leland.hulbert at solutionset.com (Leland Hulbert) Date: Tue, 8 May 2012 10:53:12 -0400 Subject: [docs] Documentation bug in 7.1.3.1. Format Specification Mini-Language Message-ID: On this page: http://docs.python.org/library/string.html#formatspec There are two conflicting definitions for "fill" the block of definitions lists this: fill ::= while the text says this: The fill character can be any character other than '{' or '}'. The question is then, is a fill character of '{' allowed? If so, the text needs to change. If not, the definition block needs to change. Thanks, Lee Hulbert -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri May 11 19:42:10 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 11 May 2012 17:42:10 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1336758130.75.0.263005275211.issue14783@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 11 23:50:46 2012 From: report at bugs.python.org (Chris Rebert) Date: Fri, 11 May 2012 21:50:46 +0000 Subject: [docs] [issue14187] add "annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336773046.16.0.222613366565.issue14187@psf.upfronthosting.co.za> Chris Rebert added the comment: Here's an actual patch. ---------- keywords: +patch Added file: http://bugs.python.org/file25544/func_annotation.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 00:33:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 May 2012 22:33:07 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336775587.72.0.41839149582.issue14187@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, LGTM. ---------- title: add "annotation" entry to Glossary -> add "function annotation" entry to Glossary _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 00:47:25 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 May 2012 22:47:25 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336776445.03.0.90814619419.issue14187@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The third paragraph should be dropped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 17:04:04 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 12 May 2012 15:04:04 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336835044.75.0.784447287723.issue14187@psf.upfronthosting.co.za> Sandro Tosi added the comment: I agree with Raymond that last paragraph should be removed; +1 for the remaining part ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 17:16:58 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 12 May 2012 15:16:58 +0000 Subject: [docs] [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1336835818.07.0.744431194732.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: I still need requires example - here. http://docs.python.org/distutils/setupscript.html#relationships-between-distributions-and-packages - after "Dependencies.." paragraph. =) setup(..., requires=["somepackage (>1.0, !=1.5)"], provides=["mypkg (1.1)"] ) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 12 23:53:07 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 12 May 2012 21:53:07 +0000 Subject: [docs] [issue14793] broken grammar in Built-in Types doc Message-ID: <1336859587.25.0.426714731972.issue14793@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- assignee: docs at python components: Documentation files: grammar.diff keywords: patch nosy: docs at python, tshepang priority: normal severity: normal status: open title: broken grammar in Built-in Types doc versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25554/grammar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 00:25:38 2012 From: report at bugs.python.org (Tom Pinckney) Date: Sat, 12 May 2012 22:25:38 +0000 Subject: [docs] [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1336861537.77.0.651670043068.issue6696@psf.upfronthosting.co.za> Tom Pinckney added the comment: I took a stab at updating the docs based on the current profiler source. See attached patch for a first draft. This is my first doc patch so would appreciate any feedback on style and substance of my changes. I tried to document more of the modules (for example the internal Profile object), logically arrange things a better better IMHO, and generally be more precise about what is happening. ---------- keywords: +patch Added file: http://bugs.python.org/file25555/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 11:04:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 May 2012 09:04:01 +0000 Subject: [docs] [issue14793] broken grammar in Built-in Types doc Message-ID: New submission from Roundup Robot : New changeset e0dcd732055f by Sandro Tosi in branch '3.2': Issue #14793: fix grammar in bytes object paragraph; patch by Tshepang Lekhonkhobe http://hg.python.org/cpython/rev/e0dcd732055f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 11:05:51 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sun, 13 May 2012 09:05:51 +0000 Subject: [docs] [issue14793] broken grammar in Built-in Types doc In-Reply-To: Message-ID: <1336899951.71.0.536383324421.issue14793@psf.upfronthosting.co.za> Sandro Tosi added the comment: Committed, thanks for the patch. For next times, please invest even a small amount of time describing why you opened the issue and what the patch fixes: it's definitely nicer not having to infer it from the diff. ---------- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun May 13 18:24:28 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 13 May 2012 18:24:28 +0200 Subject: [docs] Lambda Forms error In-Reply-To: References: Message-ID: Hello Cosmin, thanks for your email. On Thu, Apr 26, 2012 at 8:58 AM, Cosmin Parvulescu wrote: > Greetings, > > While skimming through the tutorial I came across this line "Here?s a > function that returns the sum of its two arguments:?lambda?a,?b:?a+b" > followed by this example >> >> def make_incrementor(n): >> return lambda x: x + n > > I believe it is a mistake and the example should be changed to something > along the lines of > > f = lambda a, b:a + b Mh I don't think so: the first in-line example wants just to show how the lambda syntax. In fact. >>> f = lambda a, b: a + b >>> f(3, 4) 7 While the second example wants to show that you can define a "half-defined" function (make_incrementor) which then you can instantiate and call. 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 Sun May 13 19:18:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 May 2012 17:18:17 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 9d2a1f35421d by Ezio Melotti in branch '2.7': #14770: improve the library FAQ. http://hg.python.org/cpython/rev/9d2a1f35421d New changeset 7a046f1ddd07 by Ezio Melotti in branch '3.2': #14770: improve the library FAQ. http://hg.python.org/cpython/rev/7a046f1ddd07 New changeset 59fd56c1be0d by Ezio Melotti in branch 'default': #14770: merge with 3.2. http://hg.python.org/cpython/rev/59fd56c1be0d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 19:19:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 May 2012 17:19:50 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset bf3cb58dcfe7 by Ezio Melotti in branch '2.7': #14770: backport a couple of changes from 3.x. http://hg.python.org/cpython/rev/bf3cb58dcfe7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 19:23:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 May 2012 17:23:43 +0000 Subject: [docs] [issue14770] Minor documentation fixes In-Reply-To: <1336647684.02.0.112519558227.issue14770@psf.upfronthosting.co.za> Message-ID: <1336929823.41.0.733293379633.issue14770@psf.upfronthosting.co.za> Ezio Melotti added the comment: I addressed ?ric comments and committed the patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:32:05 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 13 May 2012 18:32:05 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1336933925.02.0.0239270833244.issue10376@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Added file: http://bugs.python.org/file25565/zipfile_optimize_read.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 20:36:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 May 2012 18:36:02 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1336934162.37.0.659722681158.issue10376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Martin, now I understood why not work Rietveld review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 22:04:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 May 2012 20:04:27 +0000 Subject: [docs] [issue14245] float rounding examples in FAQ are outdated In-Reply-To: <1331372112.92.0.532785259032.issue14245@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 2b2a7861255d by Mark Dickinson in branch '3.2': Issue #14245: Improve floating-point entry in FAQ. Thanks Zbyszek J?drzejewski-Szmek for some of the wording. http://hg.python.org/cpython/rev/2b2a7861255d New changeset a79b07e05d0d by Mark Dickinson in branch 'default': Issue #14245: Merge changes from 3.2. http://hg.python.org/cpython/rev/a79b07e05d0d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 13 22:10:44 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 13 May 2012 20:10:44 +0000 Subject: [docs] [issue14245] float rounding examples in FAQ are outdated In-Reply-To: <1331372112.92.0.532785259032.issue14245@psf.upfronthosting.co.za> Message-ID: <1336939844.44.0.31161792086.issue14245@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for all the feedback. I made another round of minor edits to the latest version and committed the result. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 01:42:05 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 13 May 2012 23:42:05 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336952525.51.0.806159673911.issue14187@psf.upfronthosting.co.za> Chris Rebert added the comment: Right, I can see how the 3rd paragraph has become tangential given the refined scope of the entry. What do people think about a separate entry: "annotation" Can refer to either a `function annotation` or some uses of `decorator`s. ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 01:45:42 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 13 May 2012 23:45:42 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336952742.74.0.0709011953932.issue14187@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file25568/function_annotation_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 02:14:13 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 14 May 2012 00:14:13 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1336954452.59.0.243768509748.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: Patch to mention shlex.quote() in the `subprocess` module's "Frequently Used Arguments" Warning box. Could perhaps be a separate Note, but that could be clutter-y. ---------- keywords: +patch Added file: http://bugs.python.org/file25570/subprocess_shlex_quote.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 02:59:09 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 May 2012 00:59:09 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1336957149.41.0.436382010395.issue14187@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks fine. ?ric, please apply the v2 patch when you get a chance. ---------- assignee: rhettinger -> eric.araujo priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 09:34:23 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 14 May 2012 07:34:23 +0000 Subject: [docs] [issue14793] broken grammar in Built-in Types doc In-Reply-To: Message-ID: <1336980863.71.0.281722145767.issue14793@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: I thought the title was enough? Is it fine to merely repeat it in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 09:38:03 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 14 May 2012 07:38:03 +0000 Subject: [docs] [issue14793] broken grammar in Built-in Types doc In-Reply-To: Message-ID: <1336981083.2.0.988305923356.issue14793@psf.upfronthosting.co.za> Sandro Tosi added the comment: I think that something on the line "Hey, it looks like this phrase misses some words, and I've just fixed it" would have been nicer - IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:46:59 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 14 May 2012 09:46:59 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs Message-ID: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> New submission from Hynek Schlawack : After having been called out on wrong default arg notation in one of my patches (eg. function:: copyfile(src, dst[, symlinks=False])), I've done a "grep -RPi "\[\w+=" Doc/library" and fixed the cases I've found ? many of them sadly from myself (all the symlinks=False ones). ;) The patch is against tip, I'd back port it to 3.2 if the contents is okay (and do it for 2.7 too, there's a lot of this errors there, I suppose docs fixes are okay for 2.7?). ---------- assignee: docs at python components: Documentation files: doc-default-args.diff keywords: patch messages: 160599 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, hynek priority: low severity: normal stage: patch review status: open title: Wrong defaults args notation in docs type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25573/doc-default-args.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 11:56:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 May 2012 09:56:45 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1336989405.71.0.627898627518.issue14804@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch looks good to me, however in -.. method:: epoll.poll([timeout=-1[, maxevents=-1]]) +.. method:: epoll.poll(timeout=-1, maxevents=-1) it seems that maxevents can be passed only if timeout is specified, and this information is now lost in the signature. If this is indeed true, it should be written down in the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:13:03 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 14 May 2012 10:13:03 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1336990383.3.0.370252307692.issue14804@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Looking at the code of epoll.poll(), it seems that epoll.poll(timeout=-1, maxevents=-1) is correct and the old epoll.poll([timeout=-1[, maxevents=-1]]) is wrong, as there's no dependency between timeout and maxevents. ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:32:40 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 May 2012 10:32:40 +0000 Subject: [docs] [issue14405] Some "Other Resources" in the sidebar are hopelessly out of date In-Reply-To: <1332696210.48.0.175266420412.issue14405@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 855a6796312b by Ezio Melotti in branch '2.7': #14405: remove outdated/broken/duplicate links. http://hg.python.org/cpython/rev/855a6796312b New changeset b50d4ae6aaa3 by Ezio Melotti in branch '3.2': #14405: remove outdated/broken/duplicate links. http://hg.python.org/cpython/rev/b50d4ae6aaa3 New changeset 8a8120ee1202 by Ezio Melotti in branch 'default': #14405: merge with 3.2. http://hg.python.org/cpython/rev/8a8120ee1202 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 12:33:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 May 2012 10:33:13 +0000 Subject: [docs] [issue14405] Some "Other Resources" in the sidebar are hopelessly out of date In-Reply-To: <1332696210.48.0.175266420412.issue14405@psf.upfronthosting.co.za> Message-ID: <1336991593.6.0.34295371467.issue14405@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 13:37:59 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 14 May 2012 11:37:59 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1336995478.85.0.893941747864.issue14804@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I had to expand the patch a bit by default args that weren't caught before. So here is still against default. It applies also against 3.2, only missing stuff fails AFAICT. (and yes, I checked the mknod device arg). 2.7 is in the works. ---------- Added file: http://bugs.python.org/file25574/doc-default-args-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 14:59:24 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 14 May 2012 12:59:24 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337000363.71.0.659111155657.issue14804@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Here's against 2.7 which proved to be a can of worms. I tried to be as unobstructive as possible. Please have a look at it, I'm sure I forgot some parenthesis somewhere. ---------- Added file: http://bugs.python.org/file25576/doc-default-args-v2-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:47:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 14 May 2012 13:47:21 +0000 Subject: [docs] [issue14187] add "function annotation" entry to Glossary In-Reply-To: <1330805957.18.0.748865462478.issue14187@psf.upfronthosting.co.za> Message-ID: <1337003241.53.0.207262036186.issue14187@psf.upfronthosting.co.za> ?ric Araujo added the comment: Will do. Chris, I don?t think another entry for ?annotation? is needed, given Raymond?s previous rejection of the paragraph talking about other languages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 14 15:58:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 14 May 2012 13:58:11 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337003891.59.0.063208094107.issue14804@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think there?s already one report for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 04:34:46 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 02:34:46 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337049286.48.0.229557970359.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Draft docs patch. More cross-referencing. Analysis of deviations from RFC based on previous docs & the RFC. Don't know if there are relevant, more precise implementation limitations that need to be mentioned. If backported to 2.x, will need to cover encodings slightly more. ---------- keywords: +patch nosy: +cvrebert Added file: http://bugs.python.org/file25591/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 05:06:39 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 03:06:39 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337051199.22.0.397659149715.issue14674@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file25592/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:03:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 May 2012 07:03:11 +0000 Subject: [docs] [issue8996] Add a default role to allow writing bare `len` instead of :func:`len` In-Reply-To: <1276528152.92.0.60611534239.issue8996@psf.upfronthosting.co.za> Message-ID: <1337065391.88.0.116426883661.issue8996@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:05:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 May 2012 07:05:28 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337065528.53.0.837926747017.issue14804@psf.upfronthosting.co.za> Ezio Melotti added the comment: Are you referring to #8350? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 09:52:22 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 07:52:22 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337068342.95.0.361891249262.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: New revision per ?ric's Rietveld feedback. Sidenote: Is there any way to get notified of these reviews? I only saw it because I happened to click the "review" link on a lark. ---------- Added file: http://bugs.python.org/file25594/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:22:12 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 08:22:12 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337070132.23.0.208141198139.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: The "import json"s were left for uniformity with the other code samples in the module's docs. Also, here's what the pedantically-strict recipes might look like: def _reject_inf_nan(string): if string in {'-Infinity', 'Infinity', 'NaN'}: raise ValueError("JSON does not allow infinite or NaN number values") def _reject_dupe_keys(pairs): obj = {} for key, value in pairs: if key in pairs: raise ValueError("Name %s repeated in an object" % repr(key)) obj[key] = value return obj def strict_loads(string): result = loads(string, parse_constant=_reject_inf_nan, object_pairs_hook=_reject_dupe_keys) if not isinstance(result, (dict, list)): raise ValueError("The top-level entity of the JSON text was not an object or an array") return result def strict_dumps(obj): if not isinstance(obj, (dict, list)): raise TypeError("The top-level object of a JSON text must be a dict or a list") return dumps(obj, allow_nan=False) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:26:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 May 2012 08:26:30 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337070390.92.0.205403793137.issue14674@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch, I left more comments on the review page. IMHO it would be better to list the differences in a bullet list and expand later, rather than having a section for the parser and one for the generator. AFAIU the differences are: * top-level scalar values are accepted/generated; * inf and nan are accepted/generated; * unicode strings (rather than utf-8) are produced/consumed; * duplicate keys are accepted, and the only the last one is used; You can then add examples and explain "workarounds", either inline or after the list (I don't think it's necessary to add the snippets you posted in the last message though). > Sidenote: Is there any way to get notified of these reviews? In theory you should get notifications, in practice it doesn't always work. We are still working on make it better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:33:03 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 08:33:03 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337070783.45.0.504231830974.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Further copyediting. ---------- Added file: http://bugs.python.org/file25595/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 10:40:34 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 08:40:34 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337071234.27.0.555731532885.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Reflect broader scope ---------- title: Add link to RFC 4627 from json documentation -> Link to & explain deviations from RFC 4627 in json module docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:16:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2012 09:16:37 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1337070132.23.0.208141198139.issue14674@psf.upfronthosting.co.za> Message-ID: <1337073553.7941.15.camel@raxxla> Serhiy Storchaka added the comment: > for key, value in pairs: > if key in pairs: "if key in obj:"? ---------- title: Link to & explain deviations from RFC 4627 in json module docs -> Add link to RFC 4627 from json documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 11:29:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 May 2012 09:29:11 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1337070390.92.0.205403793137.issue14674@psf.upfronthosting.co.za> Message-ID: <1337074310.7941.22.camel@raxxla> Serhiy Storchaka added the comment: IMHO, it would be sufficient to have a simple bullet list of differences and notes or warnings in places where Python can generate non-standard JSON (top-level scalars, inf and nan, non-utf8 encoded strings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:21:32 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 May 2012 13:21:32 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337088092.85.0.826335134158.issue14804@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes. Close as duplicate? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:24:07 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 15 May 2012 13:24:07 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337088247.1.0.346446903017.issue14804@psf.upfronthosting.co.za> Petri Lehtinen added the comment: This issue is about documentation style of function signatures, not about missing keyword arguments in C functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 15:24:50 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 15 May 2012 13:24:50 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't In-Reply-To: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> Message-ID: <1337088290.26.0.376554235468.issue14494@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 16:05:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 15 May 2012 14:05:22 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337090722.27.0.41825437557.issue14804@psf.upfronthosting.co.za> Ezio Melotti added the comment: Indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 20:55:02 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 15 May 2012 18:55:02 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337108102.02.0.0337922105723.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: >> for key, value in pairs: >> if key in pairs: > > "if key in obj:"? Yes, obviously. :-) It wrote those very late at night. @Ezio: These were per ?ric's feedback but would be for a separate bug/patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 15 21:59:46 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 15 May 2012 19:59:46 +0000 Subject: [docs] [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1337111986.41.0.237007406405.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: It doesn't seem that requires parameter is honored by pip. Should we document install_requires instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:24:53 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 16 May 2012 00:24:53 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337127892.85.0.559744136603.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Notification of any future Rietveld comments would be appreciated. ---------- Added file: http://bugs.python.org/file25603/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 02:49:17 2012 From: report at bugs.python.org (Q) Date: Wed, 16 May 2012 00:49:17 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description Message-ID: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> New submission from Q : Hi there, I suggest to improve the description of Lock.acquire() [ http://docs.python.org/library/threading.html#threading.Lock.acquire ] in the following way: >>>>> current version >>>>> Lock.acquire([blocking]) Acquire a lock, blocking or non-blocking. When invoked without arguments, block until the lock is unlocked, then set it to locked, and return true. When invoked with the *blocking* argument set to true, do the same thing as when called without arguments, and return true. When invoked with the *blocking* argument set to false, do not block. If a call without an argument would block, return false immediately; otherwise, do the same thing as when called without arguments, and return true. <<<<< current version <<<<< >>>>> suggested version >>>>> Lock.acquire([blocking]) Acquire a lock, blocking or non-blocking. When invoked with the *blocking* argument set to true (the default), block until the lock is unlocked, then set it to locked, and return true. When invoked with the *blocking* argument set to false, do not block. If a call without an argument would block, return false immediately; otherwise, set the lock to locked, and return true. <<<<< suggested version <<<<< The idea is to simplify the structure of the explanation: get rid of an unnecessary "goto" -- "do the same thing as" as well as the extra branching ("when invoked without arguments" ... "when invoked with *blocking* argument set to true") . The suggested patch for the text version of the documentation ( http://docs.python.org/download.html -> http://docs.python.org/archives/python-2.7.3-docs-text.tar.bz2 ) is attached. PS. I did not dare to capitalize the boolean variables ("true" -> "True") to adhere to the general style of the document (obviously inherited from Java). For the same reason I didn't either change the argument signature from "[blocking]" to "[blocking=True]". ---------- assignee: docs at python components: Documentation files: threading.txt.patch keywords: patch messages: 160786 nosy: docs at python, thread13 priority: normal severity: normal status: open title: Simplify threading.Lock.acquire() description versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file25604/threading.txt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 03:02:47 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 May 2012 01:02:47 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: <1337130167.18.0.798121208604.issue14823@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the suggestion and the patch. The 'true' isn't inherited from java. The actual value can be either an integer or True/False. (If it were a function written in Python it would be any value that evaluates as true, but because it is written in C it is actually restricted to an integer...this is a bit of a wart, actually). In the Python3 docs it is indeed documented as 'blocking=True'. The Python2 docs use an older signature style that we didn't bother to fix up. ---------- nosy: +r.david.murray stage: -> commit review type: -> behavior versions: +Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 06:39:48 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 16 May 2012 04:39:48 +0000 Subject: [docs] [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1337143188.19.0.66778215076.issue1635217@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry, I have to reject this again. 1) The distutils doc only gets bug fixes now. It is more useful to spend time on distutils2. 2) requires is unusable and unused, because it contains module names, not PyPI project names. Documenting it would cause more harm than good. Right now people use setuptools? install_requires, which were the inspiration for the PEP 345 fields, which is implemented in distutils2. ---------- assignee: tarek -> eric.araujo status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 07:52:24 2012 From: report at bugs.python.org (Jasper St. Pierre) Date: Wed, 16 May 2012 05:52:24 +0000 Subject: [docs] [issue14824] reprlib documentation references string module Message-ID: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> New submission from Jasper St. Pierre : http://docs.python.org/dev/library/reprlib.html """ Formatting methods for specific types are implemented as methods with a name based on the type name. In the method name, TYPE is replaced by string.join(string.split(type(obj).__name__, '_')). Dispatch to these methods is handled by repr1(). Type-specific methods which need to recursively format a value should call self.repr1(subobj, level - 1). """ Outstanding. ---------- assignee: docs at python components: Documentation messages: 160805 nosy: docs at python, magcius priority: normal severity: normal status: open title: reprlib documentation references string module versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:53:44 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 16 May 2012 07:53:44 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337154824.28.0.600822378778.issue14674@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file25606/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:53:57 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 16 May 2012 07:53:57 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337154837.36.0.966355340697.issue14674@psf.upfronthosting.co.za> Changes by Chris Rebert : Removed file: http://bugs.python.org/file25591/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 09:55:00 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 16 May 2012 07:55:00 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337154900.74.0.0333258644906.issue14674@psf.upfronthosting.co.za> Changes by Chris Rebert : Removed file: http://bugs.python.org/file25592/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 10:07:21 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 16 May 2012 08:07:21 +0000 Subject: [docs] [issue14824] reprlib documentation references string module In-Reply-To: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> Message-ID: <1337155641.49.0.255574501984.issue14824@psf.upfronthosting.co.za> Chris Rebert added the comment: Patch. Though I ponder whether the expression in question might be equivalent to simply: type(obj).__name__.replace('_', ' ') ---------- keywords: +patch nosy: +cvrebert Added file: http://bugs.python.org/file25607/reprlib.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:15:43 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 16 May 2012 12:15:43 +0000 Subject: [docs] [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1337170543.2.0.993529294627.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: You've nailed it. I think it is important to know that `requires` is unused. Still this parameter is already present in documentation and causes a lot of trouble (at first I thought there is a bug with pip). Can we still have proper comment explaining the situation with a pointer to `install_requires` without any reference to setuptools, so that the latest documentation could actually be useful? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 14:25:11 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 16 May 2012 12:25:11 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1337171111.46.0.283205627104.issue14692@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I'm afraid I have to close this one as rejected. It works as documented and it's unlikely we'll decide to change it back. I'm sorry. ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 15:44:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 May 2012 13:44:05 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1337171111.46.0.283205627104.issue14692@psf.upfronthosting.co.za> Message-ID: <1337176004.4561.2.camel@raxxla> Serhiy Storchaka added the comment: > I'm afraid I have to close this one as rejected. It works as documented and it's unlikely we'll decide to change it back. I'm sorry. It does not work as documented. The proposed patch fixes the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:18:24 2012 From: report at bugs.python.org (Jasper St. Pierre) Date: Wed, 16 May 2012 14:18:24 +0000 Subject: [docs] [issue14824] reprlib documentation references string module In-Reply-To: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> Message-ID: <1337177904.02.0.0383084052377.issue14824@psf.upfronthosting.co.za> Jasper St. Pierre added the comment: Yes. Yes it would. In my opinion, it really shouldn't do this sort of name mangling, as it's a terrible idea, but whatever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 16:18:52 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 16 May 2012 14:18:52 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1337177932.1.0.915456973657.issue14692@psf.upfronthosting.co.za> Hynek Schlawack added the comment: You're right, I was referring to the doc string. ---------- resolution: rejected -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 19:10:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 16 May 2012 17:10:37 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 30d16d1e5175 by Hynek Schlawack in branch '2.7': #14692 Fix json docs to reflect changes in json.load http://hg.python.org/cpython/rev/30d16d1e5175 New changeset 4f27c4dc34ed by Hynek Schlawack in branch '3.2': #14692 Fix json docs to reflect changes in json.load http://hg.python.org/cpython/rev/4f27c4dc34ed New changeset 0f6a6f59b002 by Hynek Schlawack in branch 'default': #14692 Fix json docs to reflect changes in json.load http://hg.python.org/cpython/rev/0f6a6f59b002 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 19:11:58 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Wed, 16 May 2012 17:11:58 +0000 Subject: [docs] [issue14692] json.loads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1337188318.12.0.570350713629.issue14692@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Thanks Serhiy! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 20:17:12 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 16 May 2012 18:17:12 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1337192232.44.0.97198996531.issue1635217@psf.upfronthosting.co.za> ?ric Araujo added the comment: It may be good to document that requires/provides/obsoletes are effectively unused. It is not appropriate for stdlib doc to talk about install_requires, which is specific to setuptools, and it?s better to talk about the new standard fields from PEP 345 anyway. ---------- components: -Distutils2 keywords: +easy resolution: out of date -> stage: committed/rejected -> needs patch status: closed -> open title: Add example of distutils setup() with "requires" argument -> Warn against using requires/provides/obsoletes in setup.py versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 21:18:46 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 16 May 2012 19:18:46 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1337195926.01.0.924531281202.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: PEP 345 completely misses practical side. I need to specify dependencies for my package, so that people who checked out the source code could run `pip install .` in virtualenv and get everything fetched. People reading the docs are more practical. What is the alternative if `requires` doesn't work and `install_requires` is not official? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 16 23:07:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 16 May 2012 21:07:38 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1337202458.48.0.368705321283.issue14783@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 00:41:30 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 May 2012 22:41:30 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. Message-ID: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> New submission from Terry J. Reedy : There have been several requests for a set.get() (no args) or set.pick() method to get an item without deleting it as .pop() does. Probably the best answer is to use the simple generic composition next(iter(s)). The counter response is that it is hardly obvious and needs to be documented. Suggesion: after the current "pop() Remove and return an arbitrary element from the set. Raises KeyError if the set is empty." add "Use next(iter(s)) to return an arbitrary element without removing it." Then change the following to match. "popitem() Remove and return an arbitrary (key, value) pair from the dictionary. popitem() is useful to destructively iterate over a dictionary, as often used in set algorithms. If the dictionary is empty, calling popitem() raises a KeyError." to "popitem() Remove and return an arbitrary (key, value) pair from the dictionary. Raises KeyError if the dict is empty. Use next(iter(d)) to return an arbitrary pair without removing it." The old comment about destructively iterating over a dict as a set belongs more with set.pop if it is not removed. The idiom works with all iterators, but there is no other place I can think of to put it, and it is not needed for sequences. ---------- assignee: docs at python components: Documentation keywords: patch messages: 160937 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Add next(iter(o)) to set.pop, dict.popitem entries. type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 01:15:39 2012 From: report at bugs.python.org (Ned Deily) Date: Wed, 16 May 2012 23:15:39 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337210139.38.0.0084289313384.issue14836@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 02:22:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 May 2012 00:22:40 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337214160.89.0.872667062284.issue14836@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Use next(iter(s)) to return an arbitrary element I would suggest s/return/get/ IIUC calling this twice in a row will get the same element; should the doc mention that? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 05:31:20 2012 From: report at bugs.python.org (Q) Date: Thu, 17 May 2012 03:31:20 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: <1337225479.95.0.413202586261.issue14823@psf.upfronthosting.co.za> Q added the comment: Well, as threading is a Python wrapper, this could easily be fixed. (I am not certain whether it *should* be fixed or not -- perhaps things are fine just as they are, at least with that particular detail. ) But this is good to know, thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 10:43:55 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Thu, 17 May 2012 08:43:55 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337244235.19.0.526927653271.issue14836@psf.upfronthosting.co.za> Nadeem Vawda added the comment: > "popitem() > Remove and return an arbitrary (key, value) pair from the dictionary. Raises KeyError if the dict is empty. Use next(iter(d)) to return an arbitrary pair without removing it." Actually, next(iter(d)) on a dict returns an arbitrary *key*; if you want a pair, you need next(iter(d.items())). ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:15:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 May 2012 13:15:18 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6ab4128acccc by R David Murray in branch '3.2': #14823: Simplify threading.Lock.acquire argument discussion. http://hg.python.org/cpython/rev/6ab4128acccc New changeset b5e95bb79ba3 by R David Murray in branch 'default': #14823: Simplify threading.Lock.acquire argument discussion. http://hg.python.org/cpython/rev/b5e95bb79ba3 New changeset 251463919f3c by R David Murray in branch '2.7': #14823: Simplify threading.Lock.acquire argument discussion. http://hg.python.org/cpython/rev/251463919f3c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 15:18:27 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 May 2012 13:18:27 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: <1337260707.37.0.126961367712.issue14823@psf.upfronthosting.co.za> R. David Murray added the comment: Instead I decided to go ahead and document the argument as True/False. That something else is accepted is a CPython implementation detail that shouldn't be depended on. By the way, I couldn't actually use your patch file, since it wasn't against the threading.rst file from the repository. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:23:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 May 2012 15:23:20 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: <1337268200.43.0.814004148387.issue14823@psf.upfronthosting.co.za> ?ric Araujo added the comment: I suspect the patch was made against the source files served by Sphinx with a txt extension. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 17:30:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 May 2012 15:30:38 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1337268638.73.0.741180936847.issue1635217@psf.upfronthosting.co.za> ?ric Araujo added the comment: Again, the stdlib docs do not document third-party projects. Use the pip doc if you use pip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 18:56:10 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 May 2012 16:56:10 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists Message-ID: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> New submission from Zachary Ware : I was looking through the documentation source files for things I might be able to fix, and stumbled across "XXX Add a bit on the difference between tuples and lists." in Doc\tutorial\datastructures.rst. So I took a stab at adding some prose to address that comment, reproduced here: """ Though tuples may seem very similar to lists, their immutability makes them ideal for fundamentally different usage. In typical usage, tuples are a heterogenous structure, whereas lists are a homogenous sequence. This tends to mean that, in general, tuples are used as a cohesive unit while lists are used one member at a time. """ Have I missed anything important (like the whole point) or is there anything I could phrase better? Should this be applied to the tutorials of previous versions? ---------- assignee: docs at python components: Documentation files: tuple vs list.patch keywords: patch messages: 160982 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Tutorial: Add a bit on the difference between tuples and lists type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25627/tuple vs list.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:13:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 17 May 2012 17:13:40 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337274820.02.0.601278302306.issue14840@psf.upfronthosting.co.za> Ezio Melotti added the comment: I personally like your suggested text, but there have been some discussion on the topic (on python-ideas iirc) and some people think that it's ok to use tuples like immutable lists, rather than just structures with heterogeneous elements similar to C's structs. ---------- nosy: +ezio.melotti stage: -> patch review versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:18:24 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 May 2012 17:18:24 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337275104.48.0.373064174694.issue14840@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think that the suggested text contradicts that. (Especially the wording "tends to".) So I think this might be a reasonable addition, but I can see that "some people" might get upset :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 19:20:59 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 17 May 2012 17:20:59 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337275259.24.0.132496052308.issue14840@psf.upfronthosting.co.za> Zachary Ware added the comment: Perhaps an added line at the end, something like 'Of course, should you need an immutable list, tuples are quite handy for that, too.'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 20:43:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 17 May 2012 18:43:25 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337280205.29.0.388407591808.issue14840@psf.upfronthosting.co.za> Ezio Melotti added the comment: Link to the discussion: https://groups.google.com/d/msg/python-ideas/P3lEYU9u0DU/H0gcuAAJvEgJ The actual discussion about tuples starts on https://groups.google.com/d/msg/python-ideas/P3lEYU9u0DU/JW2Lq3KYA4QJ and continues with the following posts. ---------- nosy: +eric.araujo, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:35:00 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 17 May 2012 19:35:00 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1337283300.16.0.212107002886.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: I am trying to get what's the proposed standard for users right now? How are you going to define dependencies in distutils2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 21:50:01 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 17 May 2012 19:50:01 +0000 Subject: [docs] [issue14842] Link to time.time() in the docs of time.localtime() is wrong Message-ID: <1337284201.48.0.167329102574.issue14842@psf.upfronthosting.co.za> New submission from Petri Lehtinen : The link currently points to the time module. It should point to the time.time() function. ---------- assignee: docs at python components: Documentation keywords: easy messages: 161010 nosy: docs at python, petri.lehtinen priority: normal severity: normal status: open title: Link to time.time() in the docs of time.localtime() is wrong versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 17 22:04:12 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 May 2012 20:04:12 +0000 Subject: [docs] [issue1635217] Warn against using requires/provides/obsoletes in setup.py Message-ID: <1337285052.16.0.524076367067.issue1635217@psf.upfronthosting.co.za> ?ric Araujo added the comment: Right now the standard (i.e. official) way is Requires, which is unusable; the de facto standard (but not blessed by any PEP) is setuptools? install_requires. The new standard is documented in d2 docs and there will be examples (http://bugs.python.org/issue1635217#msg112787). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 00:16:27 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 May 2012 22:16:27 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337292987.01.0.563041206904.issue14840@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Zachary, you are brave/foolhardy to take this on;) I agree that the XXX comment should be removed. One possible resolution is to do just that, replacing it with nothing. I would note that the fuss over tuples versus lists comes from a time before iterators became a common way to pass around and process sequences. This, in a sense, makes tuples and lists more similar that they were before in that iterators have mostly replaced one of the list uses that made lists different from tuples. We do not fuss over whether an iterator is 'homogeneous' or 'heterogeneous'. Each is, of course, mutable until exhausted. Another change is that now isinstance(x, object) is True for everything, so that one can now view all concrete collections as homogeneous at the Python level as well as at the C implementation level. Things were different before the unification of types and classes, completed in 3.0. As to the proposal: I am one of the 'some people'. 'Tends to' helps a lot. Now to be picky. I would say that tuples and list are similar to each other in being concrete sequences of objects (instances of class ). I would remove 'fundamentally'. The rest of the initial paragraph leaves out the usage of tuples as constant sequences (which is to say, immutable 'all the way down'). First is the hard-coded constant: consider >>> def f(): return (((1,2),(3,4)),((5,6),(7,8))) >>> dis(f) 1 0 LOAD_CONST 15 ((((1, 2), (3, 4)), ((5, 6), (7, 8)))) 3 RETURN_VALUE versus >>> def fl(): return[[[1,2],[3,4]],[[5,6],[7,8]]] >>> dis(fl) 1 0 LOAD_CONST 1 (1) 3 LOAD_CONST 2 (2) 6 BUILD_LIST 2 9 LOAD_CONST 3 (3) 12 LOAD_CONST 4 (4) 15 BUILD_LIST 2 18 BUILD_LIST 2 21 LOAD_CONST 5 (5) 24 LOAD_CONST 6 (6) 27 BUILD_LIST 2 30 LOAD_CONST 7 (7) 33 LOAD_CONST 8 (8) 36 BUILD_LIST 2 39 BUILD_LIST 2 42 BUILD_LIST 2 45 RETURN_VALUE Second are sequences used as keys, regardless of 'geneity. Third are the homogeneous sequences that the language syntax requires to be tuples, not lists: except, issubclass, isinstance. There are also the typically homogeneous tuples for *args and possibly homogeneous second argument to % interpolation. In other words, the language itself does not support the second sentence. On the other hand, if one has a heterogeneous list, perhaps from a list comprehension, that will not be hashed, there may be no need other than philosophical purity to convert it to a tuple. Im/mutability is part of the definition and operaton of the language. Homo/heter/geneity is not (that I can think of at the moment). I do not especially like the suggested add on sentence as is. 'Immutable list' is wrong; a tuple is an immutable sequence, and what one typically needs is a constant (hashable) sequence, and if one does, a tuple is essential, not just 'handy'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 01:15:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 17 May 2012 23:15:56 +0000 Subject: [docs] [issue14842] Link to time.time() in the docs of time.localtime() is wrong In-Reply-To: <1337284201.48.0.167329102574.issue14842@psf.upfronthosting.co.za> Message-ID: <1337296556.26.0.984569594978.issue14842@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:10:06 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 18 May 2012 18:10:06 +0000 Subject: [docs] [issue14842] Link to function time() in the docs point to the time module In-Reply-To: <1337284201.48.0.167329102574.issue14842@psf.upfronthosting.co.za> Message-ID: <1337364606.19.0.625729995455.issue14842@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Seems that at least all links to the time() function in the time module point to the module (top of the module page) instead of the function. All references use the :func: role, so this must be an issue in Sphinx. Georg: Do you have a clue about this? ---------- nosy: +georg.brandl title: Link to time.time() in the docs of time.localtime() is wrong -> Link to function time() in the docs point to the time module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:30:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 18 May 2012 18:30:23 +0000 Subject: [docs] [issue14842] Link to function time() in the docs point to the time module In-Reply-To: <1337284201.48.0.167329102574.issue14842@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 40900f791469 by Petri Lehtinen in branch '2.7': Fix time.time() references in the time module docs http://hg.python.org/cpython/rev/40900f791469 New changeset d15f01b0c1a0 by Petri Lehtinen in branch '3.2': Fix time.time() references in the time module docs http://hg.python.org/cpython/rev/d15f01b0c1a0 New changeset 6286dd856252 by Petri Lehtinen in branch 'default': Fix time.time() references in the time module docs http://hg.python.org/cpython/rev/6286dd856252 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 20:31:03 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Fri, 18 May 2012 18:31:03 +0000 Subject: [docs] [issue14842] Link to function time() in the docs point to the time module In-Reply-To: <1337284201.48.0.167329102574.issue14842@psf.upfronthosting.co.za> Message-ID: <1337365863.52.0.559048643666.issue14842@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Georg: Nevermind, I got help from #python-dev :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:34:51 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 May 2012 20:34:51 +0000 Subject: [docs] [issue14824] reprlib documentation references string module In-Reply-To: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> Message-ID: <1337373291.97.0.494611222792.issue14824@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.2, Python 3.3 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:39:12 2012 From: report at bugs.python.org (Jasper St. Pierre) Date: Fri, 18 May 2012 20:39:12 +0000 Subject: [docs] [issue14824] reprlib documentation references string module In-Reply-To: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> Message-ID: <1337373552.63.0.785304267853.issue14824@psf.upfronthosting.co.za> Jasper St. Pierre added the comment: The documentation is just flat out wrong, actually: if ' ' in typename: parts = typename.split() typename = '_'.join(parts) The documentation is claiming the inverse. I don't know why we would ever have a space in a typename, ever (and if someone does awful hacks to get to that state, he should probably also do awful hacks to make reprlib work properly). It would be for the best if we could just remove this brain damage, but whatever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 22:50:40 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 May 2012 20:50:40 +0000 Subject: [docs] [issue14845] list() != [] In-Reply-To: <1337294857.69.0.824992743087.issue14845@psf.upfronthosting.co.za> Message-ID: <1337374240.46.0.172716158034.issue14845@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It has been noted elsewhere (but I cannot find it) that 1) an uncaught StopIteration raised in an expression *within* a genexp is indistinguishable from the StopIteration raised *by* the genexp upon normal termination; and 2) this makes genexps different from otherwise equivalent comprehensions. The statement in PEP289 does not address this exceptional case. Raymond, do you want to revise your PEP to mention this? PEPs are, as their name says, proposals that express intention, not result, and especially not the result after continued patching. We do not usually usually go back and revise PEPs after they have been implemented. It would be an endless task. Hence, they are not current 'documentation' unless unless specifically referred from the docs. This one is not so referenced. Perhaps PEP 0 should say that " Finished PEPs (done, implemented in code repository)" are historical documents and not current documentation. I checked the entries for comprehensions and generator expressions and they do not claim equivalence, but do (briefly) describe the actual behavior. However, it is easy to miss that the entry in 5.2.8. Generator expressions implies the two facts above. Perhaps we should explicitly say something like: If *expression* raises StopIteration, it will not be distinguished from the StopIteration raised upon normal termination of the generator, and it will make the generator expression act differently from the otherwise equivalent comprehension. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, rhettinger, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 18 23:59:30 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 May 2012 21:59:30 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337378370.35.0.74874502796.issue14840@psf.upfronthosting.co.za> Zachary Ware added the comment: I'll go with foolhardy, or just "green" :P. I wasn't aware that this topic was quite as contentious as it seems to be. I agree that tuples and lists are similar. I was trying to keep my wording at "here's another way to look at things that you may not have thought of before" without discrediting other ways of thinking, but looking at it again today, there is definite room for improvement on that front. As for "fundamentally different," my intent was to condense "tuples can be used in a way that lists don't fit as well in, and that usage is much different than lists' usual usage" into as few words as I could; referring to the usages rather than the objects being fundamentally different. I'm guessing your main issue with the second sentence is "typical usage." I agree, that really isn't the best choice of words, especially when trying to stay away from "this is how to do it, don't deviate." I didn't leave out other tuples uses intentionally, but my purpose was really to point out another way of thinking. Not long ago, I was wondering what the difference between tuples and lists really was and went searching. When I found something about "heterogenous structure vs. homogenous sequence," it was like a light bulb turning on in my head. I hadn't seen anything like that anywhere in the tutorial or docs before, and it made a lot of things make more sense. Your dis() examples have done the same kind of thing for me, to a lesser extent; I'd never realized just how much less work it is for the interpreter to create a tuple than a list. It's my belief that the tutorial should pack as many "ah ha!" moments as it can into as little space as it can. So, here's another stab: """ It may seem that tuples are very similar to lists (and they are in many ways), but their immutability makes them ideal for some cases that lists don't fit quite as well. Though hetero- or homogeneity is in no way a programmed property of anything in Python's syntax or the standard library, it can be helpful to think of tuples as heterogenous structures, and lists as homogenous sequences. When used in this way, tuples are used as a coherent unit while lists are used one member at a time. This is not to say tuples can only be used as a heterogenous structure. In fact, there are parts of Python's own syntax that require a tuple that happens to be a homogenous sequence, such as the :keyword:`except` clause of a ``try ... except`` statement, :func:`issubclass`, and :func:`isinstance`. """ ---------- Added file: http://bugs.python.org/file25633/tuple vs list.patch.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 04:21:55 2012 From: report at bugs.python.org (Q) Date: Sat, 19 May 2012 02:21:55 +0000 Subject: [docs] [issue14823] Simplify threading.Lock.acquire() description In-Reply-To: <1337129357.09.0.399271723054.issue14823@psf.upfronthosting.co.za> Message-ID: <1337394115.61.0.168908730768.issue14823@psf.upfronthosting.co.za> Q added the comment: My bad. That's indeed what I did. Won't repeat the mistake, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 06:26:05 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 May 2012 04:26:05 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337401565.72.0.779705915801.issue14836@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 12:49:13 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 19 May 2012 10:49:13 +0000 Subject: [docs] [issue14845] list() != [] In-Reply-To: <1337294857.69.0.824992743087.issue14845@psf.upfronthosting.co.za> Message-ID: <1337424553.08.0.843843306317.issue14845@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 16:48:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 May 2012 14:48:55 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337438935.28.0.968817112013.issue14840@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think I liked the first version more, possibly with a few minor changes: > Though tuples may seem very similar to lists, their immutability > makes them ideal for fundamentally different usage. I would drop the 'very', and I'm not sure that it's the immutability that enables this "fundamentally different" uses. > In typical usage, tuples are a heterogenous structure, > whereas lists are a homogenous sequence. Instead of "In typical usage" this could just be "Usually". > This tends to mean that, in general, tuples are used > as a cohesive unit while lists are used one member at a time. This could even be dropped IMHO, or something could be said about index access (or attribute access in case of namedtuples) vs iteration. Maybe something like this could work: """ Though tuples may seem similar to lists, they are often used in different situations and for different purposes. Tuples are immutable, and usually contain an heterogeneous sequence of elements that are accessed via tuple-unpacking or indexing (or by attribute in the case of namedtuples). [Sometimes tuples are also used as immutable lists.] Lists are mutable, and their elements are usually homogeneous and are accessed by iterating on the list. """ FWIW homogeneous tuples are ok too, but here "homogeneous" is just a special case of "heterogeneous". IMHO the main difference between lists and tuples is the way you access the elements (and homogeneous vs heterogeneous is just a side-effect of this); the fact that they are mutable or not is a secondary difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 17:41:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 May 2012 15:41:53 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't In-Reply-To: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset cc9e5ddd8220 by Petri Lehtinen in branch '2.7': #14494: Document that absolute imports became default in 3.0 instead of 2.7. http://hg.python.org/cpython/rev/cc9e5ddd8220 New changeset 7cdc1392173f by Petri Lehtinen in branch '3.2': #14494: Document that absolute imports became default in 3.0 instead of 2.7. http://hg.python.org/cpython/rev/7cdc1392173f New changeset 26661d9bbb36 by Petri Lehtinen in branch 'default': #14494: Document that absolute imports became default in 3.0 instead of 2.7. http://hg.python.org/cpython/rev/26661d9bbb36 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 17:47:51 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 19 May 2012 15:47:51 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't In-Reply-To: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> Message-ID: <1337442471.32.0.137979363471.issue14494@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Fixed, thanks for the patch. BTW, you should sign the PSF Contributor Agreement. See http://www.python.org/psf/contrib/. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 19:38:51 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 May 2012 17:38:51 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337449131.69.0.219925073352.issue14840@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am ok with Ezio's 3rd version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 20:49:56 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 19 May 2012 18:49:56 +0000 Subject: [docs] [issue12760] Add create mode to open() In-Reply-To: <1313502559.06.0.415498401391.issue12760@psf.upfronthosting.co.za> Message-ID: <1337453396.09.0.00261630553331.issue12760@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Shouldn't the documentation of builtin open() (in Doc/library/functions.rst) be updated too? ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 19 23:59:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 May 2012 21:59:20 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337464760.15.0.566494641338.issue14840@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch against 2.7. I changed a bit the previous paragraphs to make this fit better. ---------- assignee: docs at python -> ezio.melotti Added file: http://bugs.python.org/file25645/issue14840.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 09:14:03 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 May 2012 07:14:03 +0000 Subject: [docs] [issue14845] list() != [] In-Reply-To: <1337294857.69.0.824992743087.issue14845@psf.upfronthosting.co.za> Message-ID: <1337498043.76.0.678207377374.issue14845@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will be happy to clarify the PEP when I get a chance. ---------- assignee: docs at python -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 11:43:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 May 2012 09:43:37 +0000 Subject: [docs] [issue12760] Add create mode to open() In-Reply-To: <1313502559.06.0.415498401391.issue12760@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset ef406c4c6463 by Charles-Fran?ois Natali in branch 'default': Issue #12760: Add some mising documentation about the new `x` exclusive http://hg.python.org/cpython/rev/ef406c4c6463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 13:01:14 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sun, 20 May 2012 11:01:14 +0000 Subject: [docs] [issue13682] Documentation of os.fdopen() refers to non-existing bufsize argument of builtin open() In-Reply-To: <1325244968.02.0.142917484563.issue13682@psf.upfronthosting.co.za> Message-ID: <1337511674.06.0.112072042138.issue13682@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The documentation of os.fdopen() should be fixed as a whole, see #14863. ---------- resolution: -> invalid status: open -> closed superseder: -> Update docs of os.fdopen() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 15:39:38 2012 From: report at bugs.python.org (Guillaume) Date: Sun, 20 May 2012 13:39:38 +0000 Subject: [docs] [issue14864] Mention logging.disable(logging.NOTSET) to reset the command in logging module documentation Message-ID: <1337521178.31.0.00920557235265.issue14864@psf.upfronthosting.co.za> New submission from Guillaume : In the logging module documentation, nothing tells the user how to undo or reset a call to logging.disable(lvl). From reading the code (python 2.6 version) it seem the correct way to undo disable(lvl) is to call disable(0), but I think calling disable(NOTSET) would make more sense. The sentence I propose to add at the end of the paragraph about the disable() function is: To undo the effect of a call to logging.disable(lvl), call logging.disable(logging.NOTSET). (This is my first doc bug report, please feel free to tell me how to improve.) ---------- assignee: docs at python components: Documentation messages: 161206 nosy: docs at python, guibog priority: normal severity: normal status: open title: Mention logging.disable(logging.NOTSET) to reset the command in logging module documentation type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 15:54:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 May 2012 13:54:05 +0000 Subject: [docs] [issue14864] Mention logging.disable(logging.NOTSET) to reset the command in logging module documentation In-Reply-To: <1337521178.31.0.00920557235265.issue14864@psf.upfronthosting.co.za> Message-ID: <1337522045.63.0.342522807734.issue14864@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 16:37:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 20 May 2012 14:37:41 +0000 Subject: [docs] [issue14864] Mention logging.disable(logging.NOTSET) to reset the command in logging module documentation In-Reply-To: <1337521178.31.0.00920557235265.issue14864@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4973c90ce9e6 by Vinay Sajip in branch '2.7': Fixes #14864: Added documentation on how to undo the effects of a logging.disable() call. http://hg.python.org/cpython/rev/4973c90ce9e6 New changeset c30170a168b3 by Vinay Sajip in branch '3.2': Fixes #14864: Added documentation on how to undo the effects of a logging.disable() call. http://hg.python.org/cpython/rev/c30170a168b3 New changeset 76445d7e613f by Vinay Sajip in branch 'default': Closes #14864: Added documentation on how to undo the effects of a logging.disable() call. Thanks to user Guillaume for the suggestion. http://hg.python.org/cpython/rev/76445d7e613f ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 16:39:53 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 20 May 2012 14:39:53 +0000 Subject: [docs] [issue14864] Mention logging.disable(logging.NOTSET) to reset the command in logging module documentation In-Reply-To: <1337521178.31.0.00920557235265.issue14864@psf.upfronthosting.co.za> Message-ID: <1337524793.59.0.00489028775659.issue14864@psf.upfronthosting.co.za> Vinay Sajip added the comment: Guillaume, thank you, your wording was perfect! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 19:58:14 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 17:58:14 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples Message-ID: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In the doctest section, 25.2.3.5. Option Flags and Directives has examples of using #doctest: directives in the .rst source ''' An example's doctest directives modify doctest's behavior for that single example. Use ``+`` to enable the named behavior, or ``-`` to disable it. For example, this test passes:: >>> print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] ''' However, when converted to html or Window's help, the directive is removed. See for example http://docs.python.org/py3k/library/doctest.html#option-flags-and-directives This was reported on python-list for 2.7 and 3.? (.2 probably) by Steven D'Aprano and verified by me for 3.3.0 Win help. Vincent Vande Vyvre provided quote from 3.? .rst source and I verified it and several more following in 3.3.0. I presume the problem is that we now use the same directives to help doctest source examples for other modules and sphinx with our customizations does not know to leave these particular directives in the text after using them. I searched issues for '#doctest' and did not see anything about removal. ---------- assignee: docs at python components: Documentation messages: 161220 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, terry.reedy priority: normal severity: normal stage: needs patch status: open title: #doctest: directives removed from doctest chapter examples type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 20:14:01 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 18:14:01 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337537641.73.0.590803139803.issue14865@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a somewhat recent reversion. 3.1.5 (a month ago) http://docs.python.org/release/3.1.5/library/doctest.html#module-doctest >>> print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 3.2.0 http://docs.python.org/release/3.2/library/doctest.html#module-doctest >>> print(list(range(20))) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] In Py 2, the same change happened between 2.7.2, released June 2011 after 3.2.0, and 2.7.3. So some change was made for 3.2.0 but not ported to 2.7 until several months later, and never ported to 3.1 (or 2.6). I hope this helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 20:45:19 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sun, 20 May 2012 18:45:19 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337539519.8.0.365335512214.issue14865@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi Terry, the same problem recently came up on docs@ and digging into it, it turned out that sphinx is currently ignoring doctest directives[1], but that it was fixed in sphinx 1.1[2]. [1] https://bitbucket.org/birkenfeld/sphinx/issue/169/strip-doctest-csomments-in-rendered-output [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef It's likely the bug is visible on the active branches because recently they were updated to use the same sphinx version. We can probably plan to update the sphinx we use for the doc - what do you think about it? ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 21:28:10 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 19:28:10 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337542090.69.0.764551507534.issue14865@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To my mind, stripping is not ignoring ;-), but I understand what you mean, sphinx ignores as it pays attention and strips. [2] is the commit for [1], and both are from 3 years ago, long before 3.2.0. Does the true-by-default ``trim_doctest_flags`` config value work on a file by file basis, so that it can just be added to doctest.rst? I have no opinion of sphinx versions, which I am ignorant about. I just know that the mistaken stripping destroys the value of the examples, making the result very confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 21:35:44 2012 From: report at bugs.python.org (Devin Jeanpierre) Date: Sun, 20 May 2012 19:35:44 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337542544.0.0.744780687502.issue14865@psf.upfronthosting.co.za> Devin Jeanpierre added the comment: This is a duplicate of http://bugs.python.org/issue12947 ---------- nosy: +Devin Jeanpierre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 21:39:16 2012 From: report at bugs.python.org (Devin Jeanpierre) Date: Sun, 20 May 2012 19:39:16 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1337542756.26.0.189149924549.issue12947@psf.upfronthosting.co.za> Changes by Devin Jeanpierre : ---------- title: Examples in library/doctest.html lack the flags -> doctest directive examples in library/doctest.html lack the flags _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 21:51:04 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sun, 20 May 2012 19:51:04 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1337543464.97.0.873294547461.issue12947@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 23:10:47 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 21:10:47 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1337548247.33.0.496140801969.issue12947@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The directives should normally be stripped, but not when they are intentionally given to teach their existence, syntax, and use, as in the doctest doc on directives. I opened (and closed -- am trying to anyway) a duplicate, #14865. The problem of directive stripping started in 3.2.0 and subsequently 2.7.3 (after 2.7.2 in June 2011) and contiues in 3.3.0. Sandro Tosi noted [1] https://bitbucket.org/birkenfeld/sphinx/issue/169/strip-doctest-csomments-in-rendered-output [2] https://bitbucket.org/birkenfeld/sphinx/changeset/d91bf8e465ef Issue and commit from June 2009. My question is whether the added true-by-default ``trim_doctest_flags`` config value can just be added to doctest.rst? That would seem to be the point of having a settable config value, but I am ignorant of how sphinx works. I see that the patch does that, but also a lot more. In any case, this is a nasty regression in the docs and should be fixed somehow before the next releases. It makes the examples actively confusing. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 23:42:14 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 21:42:14 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337550134.45.0.419609797552.issue14865@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for discovering that. I did not search well enough. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 20 23:43:40 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 21:43:40 +0000 Subject: [docs] [issue14865] #doctest: directives removed from doctest chapter examples In-Reply-To: <1337536694.63.0.542931738001.issue14865@psf.upfronthosting.co.za> Message-ID: <1337550220.33.0.295611165246.issue14865@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- superseder: -> doctest directive examples in library/doctest.html lack the flags _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 00:50:04 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 20 May 2012 22:50:04 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337554203.9.0.30395019367.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: So, does the refactored patch need any further revising, or is it good to go? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 01:21:03 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 May 2012 23:21:03 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337556063.65.0.420088232866.issue14836@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think it is a good idea to expand to the pop/popitem docs this way. The text is not about what pop/popitem does, it is about what another hypothetical method might do. The text would be a distractor from the focused description of what pop/popitem actually do. Also, it would face discoverability problems (there is no reason to think that someone who wants a nonmutating getfirst() method would think to look in the docs for a mutating method). Also, the text talks about a general purpose programming technique (how to get the first element out of *any* iterable without removing it). That belongs in a tutorial entry or a summary of idioms. FWIW, the "several requests for set.get" haven't been serious requests accompanied by valid use cases. Instead, they have mostly been toy discussions about all the ways you could do it ("for x in s: break", "next(iter(s))", "x=s.pop(); s.add(x)"). The absence of get() or pick() in other language's set implementations suggest that there isn't a real need here. That said, I don't think there is much of a downside to adding a sentence to the set.pop() docs. It would be a waste though to also put it in dict.pop() and dict.popitem() where the question never seems to arise and where the docs already have issues with trying to over describe what can be done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 01:53:28 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 May 2012 23:53:28 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337558008.65.0.305583666756.issue14836@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond, I pretty much agree with your points and would be happy either with rejection or one simple sentence. This idiom really belongs in a hypothetical how-to, such as 'Python iterators and generators'. The real use case for it=iter() followed by next(it) it to treat the first item of a collection specially before scanning the rest in a for loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 02:12:41 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 May 2012 00:12:41 +0000 Subject: [docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries. In-Reply-To: <1337208090.37.0.632127020372.issue14836@psf.upfronthosting.co.za> Message-ID: <1337559161.43.0.607654429056.issue14836@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 08:22:07 2012 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Mon, 21 May 2012 06:22:07 +0000 Subject: [docs] [issue14867] chm link missing from 2.7 download page Message-ID: <1337581327.16.0.0447696908146.issue14867@psf.upfronthosting.co.za> New submission from Nacsa Krist?f : The link `http://python.org/ftp/python/2.7.3/python273.chm` is missing from `http://python.org/download/releases/2.7.3/` although the checksum is listed and the file exists. ---------- assignee: docs at python components: Documentation, Installation, Windows messages: 161248 nosy: Nacsa.Krist?f, docs at python priority: normal severity: normal status: open title: chm link missing from 2.7 download page versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 08:23:30 2012 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Mon, 21 May 2012 06:23:30 +0000 Subject: [docs] [issue14867] chm link missing from 2.7 download page In-Reply-To: <1337581327.16.0.0447696908146.issue14867@psf.upfronthosting.co.za> Message-ID: <1337581410.67.0.62831723439.issue14867@psf.upfronthosting.co.za> Changes by Nacsa Krist?f : ---------- components: -Installation, Windows type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:20:22 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 21 May 2012 08:20:22 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337588422.5.0.660904009534.issue14804@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Now we?re all on the same page ? any opinions on the patches themselves? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 10:26:09 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 21 May 2012 08:26:09 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337588769.59.0.923602122694.issue14804@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The 3.x patch looks good to me. What comes to the 2.7 patch, there's at least the problem with fmtparam in the csv module (should be **fmtparams instead of [, fmtparam]). And that's were I stopped reviewing, so there may also be other errors. Maybe the problem(s) should first be fixed on a case-by-case basis and then fix the style-only issues with one big patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 12:22:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 May 2012 10:22:22 +0000 Subject: [docs] [issue14469] Python 3 documentation links In-Reply-To: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> Message-ID: <1337595742.34.0.0736401607847.issue14469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: http://permalink.gmane.org/gmane.comp.python.devel/132675 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:43:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 May 2012 11:43:15 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset d13fdd97cc8e by Hynek Schlawack in branch '3.2': #14804: Remove [] around optional arguments with default values http://hg.python.org/cpython/rev/d13fdd97cc8e New changeset 2293eba03348 by Hynek Schlawack in branch 'default': #14804: Remove [] around optional arguments with default values http://hg.python.org/cpython/rev/2293eba03348 New changeset 8b7cb7e4ed8b by Hynek Schlawack in branch 'default': #14804: Remove [] around optional arguments with default values http://hg.python.org/cpython/rev/8b7cb7e4ed8b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:50:06 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 21 May 2012 11:50:06 +0000 Subject: [docs] [issue14870] os.utimensat's method description uses wrong notation Message-ID: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> New submission from Hynek Schlawack : It says: > os.utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, mtime_nsec), flags=0]) > Updates the timestamps of a file with nanosecond precision. The atime and mtime tuples default to None, which sets those values to the current time. It should be the other way around: atime=None, mtime=None in the signature and explain in the body how they look like. It looks like atime_sec and atime_nsec are some magic constants this way. ---------- assignee: docs at python components: Documentation keywords: easy messages: 161264 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, hynek priority: low severity: normal status: open title: os.utimensat's method description uses wrong notation versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:52:10 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 21 May 2012 11:52:10 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337601130.2.0.92112461553.issue14804@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I agree. I?ve committed the uncontroversial and mostly unrelated 3.x patch and will look at the special cases of 2.7 now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 13:56:03 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 21 May 2012 11:56:03 +0000 Subject: [docs] [issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation In-Reply-To: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> Message-ID: <1337601363.78.0.0305755045623.issue14870@psf.upfronthosting.co.za> Petri Lehtinen added the comment: os.utime() uses the same notation: os.utime(path[, times, *, ns=(atime_ns, mtime_ns)]) ---------- nosy: +petri.lehtinen title: os.utimensat's method description uses wrong notation -> Descriptions of os.utime() and os.utimensat() use wrong notation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 19:30:55 2012 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 May 2012 17:30:55 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1337621455.45.0.355812424958.issue14617@psf.upfronthosting.co.za> Ethan Furman added the comment: Are the changes good? Can they be commited? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 20:28:54 2012 From: report at bugs.python.org (Zachary Ware) Date: Mon, 21 May 2012 18:28:54 +0000 Subject: [docs] [issue14840] Tutorial: Add a bit on the difference between tuples and lists In-Reply-To: <1337273770.17.0.397614380243.issue14840@psf.upfronthosting.co.za> Message-ID: <1337624934.62.0.344063464936.issue14840@psf.upfronthosting.co.za> Zachary Ware added the comment: Ezio's version looks pretty good to me. About the only quibble I can think of is the removal of the example uses; they still apply and do help the point. Just tacking on "Classic examples of tuples include (x, y) coordinate pairs and database records." to the end of the paragraph would take care of that. Also a point of grammar; do we iterate *on* a list, or do we iterate *over* a list? I'm pretty sure I've seen both; 'on' does make sense to me but 'over' is the word my brain always seems to choose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 23:13:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 21 May 2012 21:13:30 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337634810.35.0.132561760655.issue14674@psf.upfronthosting.co.za> ?ric Araujo added the comment: A message should have been sent to pybugs at rebertia.com. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 21 23:14:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 21 May 2012 21:14:11 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337634851.68.0.681109589617.issue14674@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: needs patch -> commit review title: Add link to RFC 4627 from json documentation -> Link to & explain deviations from RFC 4627 in json module docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 03:00:15 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 22 May 2012 01:00:15 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1337648415.25.0.0699817378006.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Hopefully final revision. Thanks for the quick response ?ric! Changes: - Cover `ensure_ascii` parameter per latest review comment - Add enhanced "Character Encodings" section for 2.x backport -- Cover `encoding` parameter & restrictions -- Cover non-implementation of encoding detection feature - Hyperlink the JSON-RPC mention ---------- Added file: http://bugs.python.org/file25667/final-json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 06:54:53 2012 From: report at bugs.python.org (Stephen Lacy) Date: Tue, 22 May 2012 04:54:53 +0000 Subject: [docs] [issue14878] send statement from PEP342 is poorly documented. Message-ID: <1337662493.01.0.380911981252.issue14878@psf.upfronthosting.co.za> New submission from Stephen Lacy : There's reasonable documentation of the yield statement for most python versions under Section 6: Simple Statements, particularly 6.8 "The Yield Statement" (http://docs.python.org/release/2.7/reference/simple_stmts.html#the-yield-statement) But, there's no mention of the return value of the yield statement, or that the send statement even exists. It's mentioned in passing here under "PEP342 New Generator Features" (http://docs.python.org/whatsnew/2.5.html#pep-342-new-generator-features) but should be given fuller explanation and cross-linking from the yield statement documentation. It's also mentioned a bit here: http://docs.python.org/howto/functional.html#passing-values-into-a-generator but again, not under the language documentation itself. ---------- assignee: docs at python components: Documentation messages: 161320 nosy: Stephen.Lacy, docs at python priority: normal severity: normal status: open title: send statement from PEP342 is poorly documented. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 08:09:54 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 22 May 2012 06:09:54 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True Message-ID: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> New submission from anatoly techtonik : http://docs.python.org/library/subprocess.html#exceptions documentation is wrong at least for the case when shell=True on Linux. An attempt to execute a non-existent file with: process = subprocess.Popen("sdfsdf", shell=True, stdout=subprocess.PIPE, stderr=errpipe) out, err = process.communicate() print out Results in a message "/bin/sh: sfs: command not found" with no exceptions. Other statements may be invalid too. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 161329 nosy: docs at python, techtonik priority: normal severity: normal status: open title: invalid docs for subprocess exceptions with shell=True versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:07:36 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 22 May 2012 07:07:36 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs Message-ID: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> New submission from Hynek Schlawack : It says > csv.reader(csvfile[, dialect='excel'][, fmtparam]) > csv.writer(csvfile[, dialect='excel'][, fmtparam]) in 2.7. I presume it should be like in 3.x: > csv.reader(csvfile, dialect='excel', **fmtparams) > csv.writer(csvfile, dialect='excel', **fmtparams) Or am I missing something? (I found argument renaming to be too invasive for my default-args-notation ticket #14804) ---------- assignee: docs at python components: Documentation keywords: easy messages: 161332 nosy: docs at python, hynek priority: normal severity: normal status: open title: csv.reader and .writer use wrong kwargs notation in 2.7 docs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 09:12:22 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 22 May 2012 07:12:22 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1337670742.46.0.31230595895.issue14880@psf.upfronthosting.co.za> Petri Lehtinen added the comment: I verified from the source that it should be **fmtparams also in 2.7. Make sure you change the description texts, too, to s/fmtparam/fmtparams/. ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:34:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 May 2012 08:34:03 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset a36666c52115 by Hynek Schlawack in branch '2.7': #14804: Remove [] around optional arguments with default values http://hg.python.org/cpython/rev/a36666c52115 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 10:36:32 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 22 May 2012 08:36:32 +0000 Subject: [docs] [issue14804] Wrong defaults args notation in docs In-Reply-To: <1336988819.38.0.761185643873.issue14804@psf.upfronthosting.co.za> Message-ID: <1337675792.5.0.116479900609.issue14804@psf.upfronthosting.co.za> Hynek Schlawack added the comment: The problematic cases have been outsourced to Issue14880 & Issue14870. Closing this one. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:15:31 2012 From: report at bugs.python.org (Alex Garel) Date: Tue, 22 May 2012 14:15:31 +0000 Subject: [docs] [issue14883] html documentation does not show comments in code blocks Message-ID: <1337696131.0.0.436301420344.issue14883@psf.upfronthosting.co.za> New submission from Alex Garel : Just under http://docs.python.org/library/doctest.html#doctest.REPORTING_FLAGS documentation speaks about how Doctest directives maybe expressed as special Python comments. There are some example along with the narrative story, however comments which here are the important part, are not displayed in code snippet. Looking at the sphinx source for this page : http://docs.python.org/_sources/library/doctest.txt the comments are present. Eg. >>> print range(20) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] However in the generated html, they are not: print range (20) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, Note that this issue is not present in python 2.6.8?documentation http://docs.python.org/release/2.6.8/library/doctest.html#doctest.REPORTING_FLAGS and also 3.1.5 is ok. It appears versions at 3.2.1?and 2.7.3 ---------- assignee: docs at python components: Documentation messages: 161351 nosy: alexgarel, docs at python priority: normal severity: normal status: open title: html documentation does not show comments in code blocks type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 16:18:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 22 May 2012 14:18:23 +0000 Subject: [docs] [issue14883] html documentation does not show comments in code blocks In-Reply-To: <1337696131.0.0.436301420344.issue14883@psf.upfronthosting.co.za> Message-ID: <1337696303.87.0.333818433687.issue14883@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is a duplicate of #12947. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> doctest directive examples in library/doctest.html lack the flags _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 18:39:09 2012 From: report at bugs.python.org (Stephen Lacy) Date: Tue, 22 May 2012 16:39:09 +0000 Subject: [docs] [issue14878] send statement from PEP342 is poorly documented. In-Reply-To: <1337662493.01.0.380911981252.issue14878@psf.upfronthosting.co.za> Message-ID: <1337704749.36.0.829196637533.issue14878@psf.upfronthosting.co.za> Stephen Lacy added the comment: okay, found the documentation I was looking for here: http://docs.python.org/reference/expressions.html#yield-expressions which appears to be copied and pasted and modified version of the docs here: http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt At the very least these should cross-reference each other, but I would guess that the text should be unified, but I'm not sure where. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 23:00:23 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 22 May 2012 21:00:23 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1337720423.0.0.386767823477.issue14880@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 22 23:01:44 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 22 May 2012 21:01:44 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1337720504.38.0.85767840984.issue14617@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 00:07:15 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 22 May 2012 22:07:15 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True In-Reply-To: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> Message-ID: <1337724435.47.0.178767893607.issue14879@psf.upfronthosting.co.za> Chris Rebert added the comment: Eh, just needs clarification along the lines of: "Exceptions raised in the child ++Python++ process" "A ValueError will be raised if Popen is called with invalid arguments ++whose validity is not dependent upon the state of the environment++." ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 00:24:34 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 May 2012 22:24:34 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True In-Reply-To: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> Message-ID: <1337725474.4.0.425778552951.issue14879@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think that those additions make anything clearer, I'm afraid. "child python process" would seem to imply raised in the new python running in the child process, which is clearly not true. Hmm. I seem to remember having this discussion before. The current statement is in fact exactly correct. When shell=True the new program being run is 'sh' (or similar). So the error message is coming from the program being run successfully by subprocess. End of story. So, we could add a clarfication: "If shell=True, the 'new program' being run is the shell, which may generate its own errors based on the shell command passed to it (such as command not found). These will not result in exceptions." ---------- nosy: +r.david.murray versions: -Python 2.6, Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 07:04:59 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 23 May 2012 05:04:59 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True In-Reply-To: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> Message-ID: <1337749498.95.0.91929438037.issue14879@psf.upfronthosting.co.za> Chris Rebert added the comment: The term "invalid arguments" in "A ValueError will be raised if Popen is called with invalid arguments." is still vague. One could well argue that a nonexistent executable or bad command is "invalid". Anything resulting in an OSError can be considered "invalid" in a sense. The ValueError sentence should use a different descriptor or else include a qualifier. +1 on calling out the shell=True case. (My but how the `shell` argument complicates everything...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 14:34:36 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 May 2012 12:34:36 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True In-Reply-To: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> Message-ID: <1337776476.6.0.350107779607.issue14879@psf.upfronthosting.co.za> R. David Murray added the comment: Heh. Maybe what we ought to do is drop the shell argument and make everyone build their own shell invocations :) Actually, an API refactor where a shell call looks like this might be kind of cool: Popen(shell_cmd('echo magic')) where shell would return a list. As for the ValueError, yeah, it's vague, but I think that the only information that sentence is trying to convey is that ValueError is one of the exceptions you might get when calling Popen. Exactly what you get it for is pretty much an implementation detail. If someone wants to grovel through the code and figure out all the things that can raise ValueError, we could see if there's any sensible way to turn that into a sentence, but it might not be easy. Short of that, perhaps we could drop the existing qualifier and just say "Popen may also raise ValueError." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 23 21:42:35 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 23 May 2012 19:42:35 +0000 Subject: [docs] [issue14893] Tutorial: Add function annotation example to function tutorial Message-ID: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> New submission from Zachary Ware : A couple months ago, I had never before heard of function annotations and came across a function that had them (I don't remember where or what it was). I spent a fair bit of time searching fruitlessly to figure out what the heck that "->" in the function definition meant. Then finally, a week or two ago, I came across a mention of pep 3107 and function annotations, and figured out what it was that confused me so thoroughly. In an effort to save others from the same confusion, I've put together a small subsection to add to the tutorial about function definition. The text I'm proposing to add is as follows: """ :ref:`Function annotations ` are completely optional, arbitrary metadata information about user-defined functions. Python itself currently does not use annotations for anything, so this section is just for familiarity with the syntax. Annotations are stored in the :attr:`__annotations__` attribute of the function as a dictionary and have no effect on any other part of the function. Parameter annotations are defined by a colon after the parameter name, followed by an expression evaluating to the value of the annotation. Return annotations are defined by a literal ``->``, followed by an expression, between the parameter list and the colon denoting the end of the :keyword:`def` statement. The following example has a positional argument, a keyword argument, and the return value annotated with nonsense:: >>> def f(ham: 42, eggs: int = 'spam') -> "Nothing to see here": ... print("Annotations:", f.__annotations__) # print the function's own annotations ... print("Arguments:", ham, eggs) ... >>> f('wonderful') Annotations: {'eggs': , 'return': 'Nothing to see here', 'ham': 42} Arguments: wonderful spam """ I'd also like to see a link for "->" in the index, either to this note or to the relevant paragraph of compound_stmts.rst or both. The attached patch attempts to add such a link to this section, but I'm not certain that it's done properly. Thanks :) ---------- assignee: docs at python components: Documentation files: annotations_tutorial.patch keywords: patch messages: 161451 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Tutorial: Add function annotation example to function tutorial type: enhancement versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25684/annotations_tutorial.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 00:56:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 May 2012 22:56:57 +0000 Subject: [docs] [issue14469] Python 3 documentation links In-Reply-To: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> Message-ID: <1337813817.06.0.474734657593.issue14469@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:08:27 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 May 2012 23:08:27 +0000 Subject: [docs] [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1337814507.87.0.548890698935.issue14893@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks like a reasonable addition to the tutorial :-) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 01:13:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 May 2012 23:13:43 +0000 Subject: [docs] [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1337814823.45.0.360863870919.issue14893@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo, ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 05:17:02 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 May 2012 03:17:02 +0000 Subject: [docs] [issue11785] email subpackages documentation problems In-Reply-To: <1302105466.45.0.930997240631.issue11785@psf.upfronthosting.co.za> Message-ID: <1337829422.32.0.845697491283.issue11785@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: r.david.murray -> components: +email nosy: +barry type: -> behavior versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 14:42:06 2012 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Bryon?=) Date: Thu, 24 May 2012 12:42:06 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages Message-ID: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> New submission from Beno?t Bryon : Scope: * Python documentation lacks conventions, or at least guidelines, to choose a name for a package. * Python has tools to create and distribute packages. Not covered by this issue. * Python has tools to create namespace packages. Not covered by this issue. * Python has conventions about "syntax" of module names in PEP 8. Not covered by this issue. Goal: add guidelines+conventions about package names in Doc/packaging/ Discussion started at http://mail.python.org/pipermail/distutils-sig/2012-May/018551.html Jim Fulton said in http://mail.python.org/pipermail/distutils-sig/2012-May/018553.html: > +1 for an official document (or addition to an existinhg document) providing a rational for namespace packages and their naming Here is a ticket where proposals can be referenced. Contributions can be pushed on the "doc-package-naming-conventions" branch of https://bitbucket.org/benoitbryon/cpython ---------- assignee: docs at python components: Documentation hgrepos: 128 messages: 161502 nosy: benoitbryon, docs at python priority: normal severity: normal status: open title: Naming conventions and guidelines for packages and namespace packages type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:10:58 2012 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Bryon?=) Date: Thu, 24 May 2012 13:10:58 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1337865058.0.0.680383755114.issue14899@psf.upfronthosting.co.za> Beno?t Bryon added the comment: Use branch ""doc-package-names" (not only conventions) instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 24 15:16:23 2012 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Bryon?=) Date: Thu, 24 May 2012 13:16:23 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1337865383.06.0.577615859632.issue14899@psf.upfronthosting.co.za> Beno?t Bryon added the comment: See Martin Aspeli's article at http://www.martinaspeli.net/articles/the-naming-of-things-package-names-and-namespaces ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 00:29:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 24 May 2012 22:29:56 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337898596.11.0.262887011629.issue14901@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> docs at python components: +Documentation nosy: +brian.curtin, docs at python, ezio.melotti, tim.golden stage: -> needs patch type: -> enhancement versions: -Python 2.6, Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:32:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 05:32:26 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1337923946.94.0.868473186804.issue14899@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. You are confusing Python packages and the distributable things that are also called packages (not by most of the distutils docs though where they are named distributions). PEP 8 covers conventions for naming modules (including packages); PEP 345 defines project names (in a very open way though). I am not sure the docs need to do more; I will reply to the distutils-sig messages and read the link you provided. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:33:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 05:33:10 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1337923990.53.0.695371402058.issue14899@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +patch Added file: http://bugs.python.org/file25701/4b311ce6624b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:40:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 05:40:07 +0000 Subject: [docs] [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1337924407.23.0.66222726267.issue14893@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. I made some comments on the code review tool, which should have sent you a mail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 07:59:53 2012 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Bryon?=) Date: Fri, 25 May 2012 05:59:53 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1337925593.46.0.323267853762.issue14899@psf.upfronthosting.co.za> Beno?t Bryon added the comment: I didn't provided the patch because the work is still at early stage. I planned to provide a patch when the development branch is quite mature. I created the issue early so that other people can contribute. But I maybe I'd better read PEP 1 again... because it looks like a PEP (which may lead back to this ticket when it's time for implementation). I'm to post a proposal to python-list or python-ideas mailing lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 13:02:16 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 25 May 2012 11:02:16 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate Message-ID: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : the documentation for generator.throw() does not mention the fact that it has the same semantics for the three arguments as a "raise" expression has. The first two arguments can be: throw(exc_type, None) throw(exc_type, value) throw(exc_type, exc_instance) throw(exc_instance, None) ---------- assignee: docs at python components: Documentation messages: 161565 nosy: docs at python, kristjan.jonsson priority: normal severity: normal status: open title: generator.throw() documentation inaccurate versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 18:28:51 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 25 May 2012 16:28:51 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337963331.98.0.0200630543935.issue14901@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 18:35:13 2012 From: report at bugs.python.org (Ethan Furman) Date: Fri, 25 May 2012 16:35:13 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1337963713.62.0.271348662449.issue14617@psf.upfronthosting.co.za> Ethan Furman added the comment: Newest changes uploaded. ---------- Added file: http://bugs.python.org/file25707/__hash__3.diff _______________________________________ Python tracker _______________________________________ From zachary.ware at gmail.com Fri May 25 19:23:23 2012 From: zachary.ware at gmail.com (zachary.ware at gmail.com) Date: Fri, 25 May 2012 17:23:23 -0000 Subject: [docs] Tutorial: Add function annotation example to function tutorial (issue 14893) Message-ID: <20120525172323.17445.13525@psf.upfronthosting.co.za> Reviewers: eric.araujo, http://bugs.python.org/review/14893/diff/4990/Doc/tutorial/controlflow.rst File Doc/tutorial/controlflow.rst (right): http://bugs.python.org/review/14893/diff/4990/Doc/tutorial/controlflow.rst#newcode649 Doc/tutorial/controlflow.rst:649: :ref:`Function annotations ` are completely optional, On 2012/05/25 07:39:39, eric.araujo wrote: > The ref target looks wrong. Maybe you want a link to the glossary entry that > will be added soon? :term:`function annotations` I had the same thought initially, but then I figured that this first paragraph says roughly the same thing, and about all that the glossary entry mentions that this doesn't is the PEP that spawned it. The glossary entry also links to :ref:`function`, so I figured I'd just cut out the middle-man. The relevant part really doesn't go into much more detail, though, so maybe the grammar production list is the right thing to point to anyway? I'm happy to change it if we decide that way, though. As a side-note, should an example be added to the :ref:`function` section? http://bugs.python.org/review/14893/diff/4990/Doc/tutorial/controlflow.rst#newcode652 Doc/tutorial/controlflow.rst:652: familiarity with the syntax. On 2012/05/25 07:39:39, eric.araujo wrote: > Wording improvement suggestion: ?Python itself or the standard library don't use > function annotations in any way; this section just shows the syntax. > Third-party projects are free to leverage function annotations for > documentation, type checking and other uses.? Done, though I moved the negative and added a comma. http://bugs.python.org/review/14893/diff/4990/Doc/tutorial/controlflow.rst#newcode664 Doc/tutorial/controlflow.rst:664: ... print("Annotations:", f.__annotations__) # print the function's own annotations On 2012/05/25 07:39:39, eric.araujo wrote: > The comment seems to merely duplicate the code, which is clear enough in my > opinion. Good point. I think this was a holdover from a previous iteration of the patch before I submitted it. Removed. Please review this at http://bugs.python.org/review/14893/ Affected files: Doc/tutorial/controlflow.rst diff -r ab94ed2a8012 Doc/tutorial/controlflow.rst --- a/Doc/tutorial/controlflow.rst Wed May 23 11:22:44 2012 +0200 +++ b/Doc/tutorial/controlflow.rst Wed May 23 14:09:51 2012 -0500 @@ -636,6 +636,39 @@ No, really, it doesn't do anything. +.. _tut-annotations: + +Function Annotations +-------------------- + +.. sectionauthor:: Zachary Ware +.. index:: + pair: function; annotations + single: -> (return annotation assignment) + +:ref:`Function annotations ` are completely optional, +arbitrary metadata information about user-defined functions. Python itself +currently does not use annotations for anything, so this section is just for +familiarity with the syntax. + +Annotations are stored in the :attr:`__annotations__` attribute of the function +as a dictionary and have no effect on any other part of the function. Parameter +annotations are defined by a colon after the parameter name, followed by an +expression evaluating to the value of the annotation. Return annotations are +defined by a literal ``->``, followed by an expression, between the parameter +list and the colon denoting the end of the :keyword:`def` statement. The +following example has a positional argument, a keyword argument, and the return +value annotated with nonsense:: + + >>> def f(ham: 42, eggs: int = 'spam') -> "Nothing to see here": + ... print("Annotations:", f.__annotations__) # print the function's own annotations + ... print("Arguments:", ham, eggs) + ... + >>> f('wonderful') + Annotations: {'eggs': , 'return': 'Nothing to see here', 'ham': 42} + Arguments: wonderful spam + + .. _tut-codingstyle: Intermezzo: Coding Style From report at bugs.python.org Fri May 25 19:24:56 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 25 May 2012 17:24:56 +0000 Subject: [docs] [issue14893] Tutorial: Add function annotation example to function tutorial In-Reply-To: <1337802155.15.0.316800230533.issue14893@psf.upfronthosting.co.za> Message-ID: <1337966696.43.0.37637149542.issue14893@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the review :). Replied and here's the updated patch. ---------- Added file: http://bugs.python.org/file25708/annotations_tutorial.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:14:26 2012 From: report at bugs.python.org (Michael Driscoll) Date: Fri, 25 May 2012 18:14:26 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337969666.67.0.577081801617.issue14901@psf.upfronthosting.co.za> Michael Driscoll added the comment: Here are a few proposals that spring to mind: 1a) Update all Windows references to Windows 7 or Vista/7. We can include XP, but I think Microsoft is dropping support next year. 1b) Update all Python references to the current version instead of 2.2 and 2.3. I don't know why there's a mix of two different versions in the document anyway. 2) Drop the question "How do I make Python scripts executable?" Python files have been working on Windows for me since 2.5 just by double-clicking them. I don't see any reason to mention the command-file hack. 3) Drop the question "Why does Python sometimes take so long to start?" I personally haven't seen this happen except with some scripts that actually have a lot of stuff to load, like certain wxPython stuff I've written. 4) Change the question "Where is Freeze for Windows?" to the question "How do I make Python scripts into an executable?" and then drop all mention of ye olde "Freeze" and put some information in there pointing to PyInstaller, py2exe (last updated 2008, so maybe not?), cx_freeze, bb_freeze or whatever. 5) I don't see any mention of PyWin32 or comtypes in the FAQ. While ctypes has a brief mention in the os.kill() section, it's not really explained. We might want to mention those. 6) We might want to drop the os.popen() stuff since that was deprecated / removed in favor of subprocess, right? 7) Drop the questions about Windows 95/98 issues 8) I don't think the question "How do I extract the downloaded documentation on Windows?" is even applicable any more 9) Is the question "Missing cw3215mt.dll (or missing cw3215.dll)" still relevant? I've never experienced that on any machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:42:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 18:42:09 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1337971329.52.0.26485802525.issue14911@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> needs patch versions: -Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:43:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 18:43:14 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337971394.12.0.670155455007.issue14901@psf.upfronthosting.co.za> ?ric Araujo added the comment: The freeze script may have been moved in 3.2. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:46:23 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 18:46:23 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337971583.04.0.818617551959.issue14901@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the detailed remarks. Some of the proposed changes may not apply to the 2.7 and 3.2 versions, which for example support XP if I remember correctly. 1b: Sure, patch welcomed. 6: os.system is discouraged, but os.popen still exists in 3.x (it?s implemented on top of subprocess) I leave the rest to the people with more Windows knowledge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:48:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 18:48:10 +0000 Subject: [docs] [issue14879] invalid docs for subprocess exceptions with shell=True In-Reply-To: <1337666994.08.0.287605633225.issue14879@psf.upfronthosting.co.za> Message-ID: <1337971690.93.0.471271025471.issue14879@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 20:49:18 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 18:49:18 +0000 Subject: [docs] [issue14878] Improve documentation for generator.send method In-Reply-To: <1337662493.01.0.380911981252.issue14878@psf.upfronthosting.co.za> Message-ID: <1337971758.76.0.316020751163.issue14878@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Are you interested in making a patch? Guidelines are in the devguide. ---------- nosy: +eric.araujo stage: -> needs patch title: send statement from PEP342 is poorly documented. -> Improve documentation for generator.send method versions: -Python 2.6, Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:06:47 2012 From: report at bugs.python.org (Michael Driscoll) Date: Fri, 25 May 2012 19:06:47 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337972807.6.0.512047878804.issue14901@psf.upfronthosting.co.za> Michael Driscoll added the comment: I know Python 3.x still runs on XP too, but should we continue to mention it in our documentation? I don't know. Part of the reason I wrote up all that was to see if people had any well thought out arguments one way or the other on these things. As for this freeze module, I can't find it even in Python 2.4's Tools folder or any other folder either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:08:42 2012 From: report at bugs.python.org (Michael Driscoll) Date: Fri, 25 May 2012 19:08:42 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337972921.95.0.673681385209.issue14901@psf.upfronthosting.co.za> Michael Driscoll added the comment: Should the patch for 1b replace Python 2.2 with Python 2.7/3.2 or just Python 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:12:47 2012 From: report at bugs.python.org (Brian Curtin) Date: Fri, 25 May 2012 19:12:47 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337973167.29.0.960961165694.issue14901@psf.upfronthosting.co.za> Brian Curtin added the comment: I'd rather it tried to stay as version agnostic as could be, but favoring 3.x in general. I wouldn't tie it down to any particular version because we'll have to come back in several years and update Python 3.3 to Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:29:44 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 19:29:44 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337974184.04.0.683671741273.issue14901@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I know Python 3.x still runs on XP too, but should we continue to mention it in our documentation? I don't know. Part > of the reason I wrote up all that was to see if people had any well thought out arguments one way or the other on these things. In my opinion it is simple. PEP 11 defines when platforms are abandoned. If a stable version like 3.2 supports XP, then its doc should say so. > Should the patch for 1b replace Python 2.2 with Python 2.7/3.2 or just Python 3.2? One patch for 2.7 can modernize the code, but as Brian said there is no reason to use 2.7-only idioms; just remove the really old or inelegant things. (I haven?t looked at the FAQ to see what exactly is outdated.) The patch for 3.2 will have to use 3.x syntax. Note that you can make one of the two patches and let the committer port. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:43:29 2012 From: report at bugs.python.org (Michael Driscoll) Date: Fri, 25 May 2012 19:43:29 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337975009.26.0.193475027519.issue14901@psf.upfronthosting.co.za> Michael Driscoll added the comment: Could we say just Python and ignore the version number? Or would Python 2.7 work for the 2.7 branch patch since there isn't supposed to be a 2.8 and then for Python 3 we could go with 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 21:47:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 May 2012 19:47:40 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337975260.48.0.797180351606.issue14901@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not sure we understand each other. Can you give examples of the outdated code samples so that we can discuss something concrete? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 25 22:28:36 2012 From: report at bugs.python.org (Michael Driscoll) Date: Fri, 25 May 2012 20:28:36 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1337977716.18.0.621730148805.issue14901@psf.upfronthosting.co.za> Michael Driscoll added the comment: Okay. Here are a couple from http://docs.python.org/faq/windows.html#how-do-i-run-a-python-program-under-windows: "You may also find that you have a Start-menu entry such as Start ? Programs ? Python 2.2 ? Python (command line)" Then just a little farther down are several example paths with "c:\Python23\python" Then in http://docs.python.org/faq/windows.html#how-can-i-embed-python-into-a-windows-application there's the following line: "Do _not_ build Python into your .exe file directly. On Windows, Python must be a DLL to handle importing modules that are themselves DLL?s. (This is the first key undocumented fact.) Instead, link to pythonNN.dll; it is typically installed in C:\Windows\System. NN is the Python version, a number such as ?23? for Python 2.3." In http://docs.python.org/faq/windows.html#pyrun-simplefile-crashes-on-windows-but-not-on-unix-why there's this line: "The Python 1.5.* DLLs (python15.dll) are all compiled with MS VC++ 5.0 and with multithreading-DLL options (/MD)." I see fixed http://docs.python.org/faq/windows.html#how-do-i-emulate-os-kill-in-windows as it mentions BOTH Python 2.7 and 3.2 ---------- _______________________________________ Python tracker _______________________________________ From alexey.kosarev at mail.ru Sat May 26 17:55:31 2012 From: alexey.kosarev at mail.ru (=?UTF-8?B?QWxleGV5IEtvc2FyZXY=?=) Date: Sat, 26 May 2012 19:55:31 +0400 Subject: [docs] =?utf-8?q?proposal=3A_sigle-file_TXT_format_documentation?= Message-ID: Hi! I strongly propose to introduce single-file TXT documentation. Current plain text documentation is totally navigable, but it's not conveniet to use it on any reading device or search through it using less + grep. Hope you could consider creating a single-file TXT documentation. Thank you! From antlong at gmail.com Wed May 16 23:00:42 2012 From: antlong at gmail.com (Anthony Long) Date: Wed, 16 May 2012 17:00:42 -0400 Subject: [docs] Issues I found on python.org Message-ID: I put in tickets before I realized I should email. The issues are: http://bugs.python.org/issue14834 http://bugs.python.org/issue14833 -------------- next part -------------- An HTML attachment was scrubbed... URL: From corey at octayn.net Sun May 27 00:35:34 2012 From: corey at octayn.net (Corey Richardson) Date: Sat, 26 May 2012 18:35:34 -0400 Subject: [docs] platform.python_implementation() miswording Message-ID: <20120526183534.5e9df7ac@Ulysses> (http://docs.python.org/library/platform.html#platform.python_implementation) > Returns a string identifying the Python implementation. Possible > return values are: ?CPython?, ?IronPython?, ?Jython?, ?PyPy?. Should read: Returns a string identifying the Python implementation. Some potential return values are: ?Python?, ?IronPython?, ?Jython?, 'PyPy?. -- Corey Richardson From daniel at easetechnology.co.uk Fri May 18 15:57:06 2012 From: daniel at easetechnology.co.uk (Daniel Biddle) Date: Fri, 18 May 2012 14:57:06 +0100 Subject: [docs] Missing line break in What's New PEP 409 example Message-ID: <20120518135706.GA3437@bert.easetechnology.co.uk> Hi. In http://docs.python.org/dev/whatsnew/3.3.html#pep-409-suppressing-exception-context there's a line break missing after "from None" in the first example, making the following "..." prompt look like part of the new syntax. -- Daniel From jason at jason.gd Sat May 19 18:49:16 2012 From: jason at jason.gd (Jason) Date: Sat, 19 May 2012 18:49:16 +0200 Subject: [docs] Python faster factorial implementation Message-ID: <4FB7CF0C.1050905@jason.gd> Hello. I'd like you to change python math module factorial implementation. For numbers like 100 000 my implementation is pretty much faster: def fact( a, b ): c=0 if b == a: return a if b-a > 1: c=(b + a) >> 1; return (fact(a, c) * fact(c+1, b)) return a * b fact(1,100000) duration: 0:00:00.293773 If you use: import math math.factorial(100000) the duration is: 0:00:04.022968 !!! Is it possible or it's too much effort for Python developers? I'm looking forward for your reply ;) Regards, Jason. From john.osuchowski at gmail.com Wed May 23 17:52:56 2012 From: john.osuchowski at gmail.com (John Osuchowski) Date: Wed, 23 May 2012 16:52:56 +0100 Subject: [docs] Bug report Message-ID: <424C3B77-A5AF-4163-A144-18868E0B0039@googlemail.com> Hi I Adam using my iPad to read this and every time I scroll down the page it jumps back to the top of the page Love python though Regards johnO Sent from my iPad From kinnison.josh at gmail.com Thu May 17 15:18:17 2012 From: kinnison.josh at gmail.com (Josh Kinnison) Date: Thu, 17 May 2012 09:18:17 -0400 Subject: [docs] Threading CIL CPython In-Reply-To: References: Message-ID: http://docs.python.org/library/threading.html#module-threading The docs for threading present that CIL limitation in a poor way. "CPython implementation detail" as a title translates quickly into "not relevant", especially for readers unfamiliar with CPython (how many uses would incorrectly guess that they use "regular Python", not this "CPython thing"?). A stronger title like "Limitation for multiple cores" would help. Avoiding the term CPython or at least clarifying that this is the default Python would also help. The details of the limitation are interesting, but shouldn't be at the forefront of documentation. Thankfully, multiprocessing has the same API for the most part. So aside from the time spent wondering why the threads arent spreading to cover all their cores, it shouldn't be a big problem for most. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Sun May 27 17:20:52 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 27 May 2012 17:20:52 +0200 Subject: [docs] Bug report In-Reply-To: <424C3B77-A5AF-4163-A144-18868E0B0039@googlemail.com> References: <424C3B77-A5AF-4163-A144-18868E0B0039@googlemail.com> Message-ID: Hello John, On Wed, May 23, 2012 at 5:52 PM, John Osuchowski wrote: > Hi I Adam using my iPad to read this and every time I scroll down the page it jumps back to the top of the page Can you please specify what page are you referring to? Is it a webpage, one of the manuals you've downloaded? if so, which format? 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 Sun May 27 21:19:47 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 27 May 2012 21:19:47 +0200 Subject: [docs] Missing line break in What's New PEP 409 example In-Reply-To: <20120518135706.GA3437@bert.easetechnology.co.uk> References: <20120518135706.GA3437@bert.easetechnology.co.uk> Message-ID: Hello Daniel, thanks for your email. On Fri, May 18, 2012 at 3:57 PM, Daniel Biddle wrote: > Hi. In http://docs.python.org/dev/whatsnew/3.3.html#pep-409-suppressing-exception-context > there's a line break missing after "from None" in the first example, making > the following "..." prompt look like part of the new syntax. I think the problem lies in sphinx (in the source code the example is correctly formatted), so I opened a bug about it: https://bitbucket.org/birkenfeld/sphinx/issue/938/support-pep-409 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 Sun May 27 21:33:58 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 27 May 2012 21:33:58 +0200 Subject: [docs] Python faster factorial implementation In-Reply-To: <4FB7CF0C.1050905@jason.gd> References: <4FB7CF0C.1050905@jason.gd> Message-ID: Hello Jason, thanks for your email. On Sat, May 19, 2012 at 6:49 PM, Jason wrote: > Hello. I'd like you to change python math module factorial implementation. this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. For this kind of suggestion, you might want to contact either http://mail.python.org/mailman/listinfo/python-list or directly file a bug report on http://bugs.python.org/ 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 Sun May 27 21:44:48 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 27 May 2012 21:44:48 +0200 Subject: [docs] platform.python_implementation() miswording In-Reply-To: <20120526183534.5e9df7ac@Ulysses> References: <20120526183534.5e9df7ac@Ulysses> Message-ID: Hello Corey, thanks for your email. On Sun, May 27, 2012 at 12:35 AM, Corey Richardson wrote: > (http://docs.python.org/library/platform.html#platform.python_implementation) > >> ? ?Returns a string identifying the Python implementation. Possible >> ? ?return values are: ?CPython?, ?IronPython?, ?Jython?, ?PyPy?. > > Should read: > > Returns a string identifying the Python implementation. Some potential > return values are: ?Python?, ?IronPython?, ?Jython?, 'PyPy?. I'm a non-native speaker, so can you please explain why your proposed version is better than the actual one? Also your phrase contains a typo: Python -> CPython. 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 Sun May 27 21:49:06 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 27 May 2012 21:49:06 +0200 Subject: [docs] Issues I found on python.org In-Reply-To: References: Message-ID: Hello Anthony, On Wed, May 16, 2012 at 11:00 PM, Anthony Long wrote: > I put in tickets before I realized I should email. The issues are: > > http://bugs.python.org/issue14834 > http://bugs.python.org/issue14833 As explained in the ticket, this is not the right email address, python-www is. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From corey at octayn.net Sun May 27 22:00:21 2012 From: corey at octayn.net (Corey Richardson) Date: Sun, 27 May 2012 16:00:21 -0400 Subject: [docs] platform.python_implementation() miswording In-Reply-To: References: <20120526183534.5e9df7ac@Ulysses> Message-ID: <20120527160021.59191dd3@Ulysses> On Sun, 27 May 2012 21:44:48 +0200 Sandro Tosi wrote: > > I'm a non-native speaker, so can you please explain why your proposed > version is better than the actual one? > The reason it is better is because there could be other implementations not accounted for in the docs, and it would be silly to have *every* possible implementation string. The first implies, to me, that the list includes all possible values, which is simply false > Also your phrase contains a typo: Python -> CPython. > Ah yes, my bad, it should read CPython. -- Corey Richardson From report at bugs.python.org Sun May 27 23:10:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2012 21:10:47 +0000 Subject: [docs] [issue11785] email subpackages documentation problems In-Reply-To: <1302105466.45.0.930997240631.issue11785@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 64e82c4f4e10 by R David Murray in branch 'default': #11785: fix the :mod: references in email package submodule titles. http://hg.python.org/cpython/rev/64e82c4f4e10 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 23:18:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 27 May 2012 21:18:47 +0000 Subject: [docs] [issue11785] email subpackages documentation problems In-Reply-To: <1302105466.45.0.930997240631.issue11785@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset df59aefdb1c8 by R David Murray in branch '2.7': #11785: fix the :mod: references in email package submodule titles. http://hg.python.org/cpython/rev/df59aefdb1c8 New changeset 6737c2ca98ee by R David Murray in branch '3.2': #11785: fix the :mod: references in email package submodule titles. http://hg.python.org/cpython/rev/6737c2ca98ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 27 23:19:42 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 27 May 2012 21:19:42 +0000 Subject: [docs] [issue11785] email subpackages documentation problems In-Reply-To: <1302105466.45.0.930997240631.issue11785@psf.upfronthosting.co.za> Message-ID: <1338153582.06.0.274277124816.issue11785@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 12:07:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 May 2012 10:07:56 +0000 Subject: [docs] [issue12716] Reorganize os docs for files/dirs/fds In-Reply-To: <1312900904.97.0.581848486096.issue12716@psf.upfronthosting.co.za> Message-ID: <1338199676.75.0.664331169645.issue12716@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 28 15:17:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 May 2012 13:17:39 +0000 Subject: [docs] [issue14933] Misleading documentation about weakrefs Message-ID: <1338211059.84.0.366871304361.issue14933@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In http://docs.python.org/dev/extending/newtypes.html?highlight=pyobject_clearweakrefs#weak-reference-support, you can read: ?The only further addition is that the destructor needs to call the weak reference manager to clear any weak references. This should be done before any other parts of the destruction have occurred? I don't believe there is any need to clear weakrefs before starting with other parts of the destruction. Weakref callbacks cannot access the original object, by construction (else they never get called). Actually, if a weakref callback can rely on some resources having been released (say, a file descriptor), it is better to clear the weakrefs *after* other parts of the destruction. This seems to be a by-product of the erroneous doc committed in SVN r16381, part of which was removed in r18223. ---------- assignee: docs at python components: Documentation messages: 161780 nosy: docs at python, fdrake, ncoghlan, pitrou, sbt, tim_one priority: normal severity: normal status: open title: Misleading documentation about weakrefs type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 01:10:04 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 May 2012 23:10:04 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv Message-ID: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> New submission from Nick Coghlan : Command line documentation for pyvenv must be provided under http://docs.python.org/dev/using/index.html before 3.3 is released. ---------- assignee: docs at python components: Documentation messages: 161815 nosy: docs at python, ncoghlan, vinay.sajip priority: deferred blocker severity: normal stage: needs patch status: open title: Usage documentation for pyvenv type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 02:14:42 2012 From: report at bugs.python.org (Glenn Linderman) Date: Tue, 29 May 2012 00:14:42 +0000 Subject: [docs] [issue14943] winreg OpenKey doesn't work as documented Message-ID: <1338250481.35.0.334465326284.issue14943@psf.upfronthosting.co.za> New submission from Glenn Linderman : My first time to use winreg and I am sure that some of this report is documentation, but depending on behavior in other versions, maybe it is a regression in code as well, but I doubt it. I'm reading the 3.3 documentation, but using 3.2.3 for testing. The documentation doesn't indicate any change execpt the exception thrown, between 3.2 and 3.3. The documentation for OpenKey indicates it has 4 parameters, calling the 3rd "reserverd" and the 4th "access". These are given default values of 0 and KEY_ALL_ACCESS, respectively, according to the function definition. The text of the documentation does not further explain these parameters, rather it explains "res" and "sam" which may appear to correspond... (that is problem #1) Assuming a correspondence, and a name change for those parameters somewhere along the line (perhaps between 3.1 and 3.2 when named parameters became supported, per the doc. note), then "sam" is defined to have a default value of "KEY_READ". That conflicts with the default value shown in the function definition (this is problem #2). The behavior of OpenKey in 3.2.2 seems to be that the access parameter actually defaults to "KEY_READ", rather than "KEY_ALL_ACCESS". Since the documentation is inconsistent in this area, I'm not sure if there was intended to be a code change, nor what the prior behavior might have been, nor what the future behavior is intended to be. If a change in default was intended, either it was implemented wrong, or documented wrong, and there is no indication in the documentation that a change was made, or should have been made (this is problem #3). I suspect the changes should all be to the documentation, changing the function definition to read "KEY_READ" instead of "KEY_ALL_ACCESS", and changing the parameters in the text to be called "reserved" and "access" instead of "res" and "sam", and if so, then problem #3 is fictitious, just a result of the other inconsistencies, and speculation. ---------- assignee: docs at python components: Documentation messages: 161822 nosy: docs at python, v+python priority: normal severity: normal status: open title: winreg OpenKey doesn't work as documented type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 02:34:42 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 29 May 2012 00:34:42 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv In-Reply-To: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> Message-ID: <1338251682.77.0.73391189842.issue14939@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would document it in library/venv, just like other tools are documented in the relevant module docs. I?m nonetheless +1 to listing all scripts installed by Python in the Setup and Usage docs, with links. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:43:12 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 01:43:12 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv In-Reply-To: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> Message-ID: <1338255792.0.0.549019494828.issue14939@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, we need to start using the Setup & Usage docs *more*, not less. All tools with useful command line behaviour (especially those that are directly installed as scripts) should eventually be documented here. The fact this has historically been avoided is no excuse for perpetuating the mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:47:38 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 01:47:38 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc Message-ID: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> New submission from Nick Coghlan : pydoc is installed as a script by Python. It should be documented under http://docs.python.org/dev/using/index.html. ---------- assignee: docs at python components: Documentation messages: 161831 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Setup & Usage documentation for pydoc type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 03:50:59 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 01:50:59 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules Message-ID: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> New submission from Nick Coghlan : Some stdlib modules have officially documented and supported behaviour when executed via -m. These should be referenced from the Setup & Usage documentation at http://docs.python.org/dev/using/index.html Current candidates: python -m unittest python -m timeit ---------- assignee: docs at python components: Documentation messages: 161832 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Setup & Usage documentation for selected stdlib modules type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:03:53 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 02:03:53 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338257033.9.0.257168705743.issue14945@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm sure there's a predecessor to this issue that I intend for this one to replace, but I can't currently find it in order to mark it as superceded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:09:45 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 02:09:45 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1338257385.21.0.976098112672.issue11260@psf.upfronthosting.co.za> Nick Coghlan added the comment: I created #14945 as a suggestion to add a simple page to http://docs.python.org/dev/using/index.html that will provide a central reference to the module documentation for modules with officially supported behaviour when used with the "-m" switch. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:13:07 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 02:13:07 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338257587.85.0.32478533059.issue14945@psf.upfronthosting.co.za> Nick Coghlan added the comment: Found it: #11260. I've left it open, since the original suggestion in that issue is related to actually documenting the -m behaviour of the smptd module - it was just the issue *discussion* that ended up covering the more general question of how such command line interfaces should be documented. The current issue is specifically about providing a central index in the setup and usage documentation to those modules which *already* have officially documented and supported behaviour when executed with -m. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:18:33 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 02:18:33 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338257913.55.0.674323987476.issue14944@psf.upfronthosting.co.za> Nick Coghlan added the comment: Same goes for idle and 2to3. These may just be cross-references to the relevant module documentation rather than completely new text. ---------- title: Setup & Usage documentation for pydoc -> Setup & Usage documentation for pydoc, idle & 2to3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 04:30:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 02:30:26 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338258626.82.0.940338738055.issue14945@psf.upfronthosting.co.za> Nick Coghlan added the comment: Additional candidates after grepping the docs: python -m site python -m sysconfig python -m pickle python -m pickletools python -m compileall python -m test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:16:23 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 29 May 2012 03:16:23 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338261383.89.0.721938166913.issue14945@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?d propose to add one file per script / module-as-script, except maybe for -m site and -m sysconfig which are more about debugging an installation than really using a feature provided by the stdlib. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:22:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 May 2012 03:22:48 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338261768.8.0.648962627209.issue14944@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I second the motion for IDLE. There is no module doc for it. Off the top of my head, there should be a general section that * says what it is, and that it depends on tcl/tk and tkinter install; * mentions the existent of the menu Help / IDLE help document; * gives common startup methods from command line (I forget this) or inside interpreter ('from idlelib import idle') and that one may need to use one of these to see tracebacks if Idle crashes - even if one normally uses a system-specific method to directly run as gui app. * gives other common info and trouble-shooting tips (some of this is on tracker - such as deleting user .cfg that prevents startup). * points to system specific discussions, where ever they are put. Then for each system, * tcl/tk situation * how to directly start up * location of config files Windows: (what I use) tcl/tk comes with system. ... *nix: tcl/tk probably already on system ... mac: (ned daily) special tcl/tk issues, special page on site ... ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:27:21 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 29 May 2012 03:27:21 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338262040.94.0.0566069179418.issue14944@psf.upfronthosting.co.za> Ned Deily added the comment: http://docs.python.org/py3k/library/idle.html (duplicates much of the IDLE help file) ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:31:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 May 2012 03:31:22 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338262282.32.0.465580197275.issue14944@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Hmm, how did I miss that?? Well better to reference that, and maybe revise it. I believe there may also be another .txt document in idlelib. Anyway, perhaps there should first be a section on tkinter by itself, and how to get the tcl/tk it depends on. Mention that optional part of Windows install, so tkinter will likely not work if unselected from installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:33:50 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 03:33:50 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338262430.02.0.211807154794.issue14945@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think for these it's reasonable to just have an index page that references out to the individual module docs. Most of them are closely related to using the module in your own code and/or there's general background info in the module docs that you're likely to need in order to understand what the tool is for. The main thing I'm after at this point is for Setup & Usage to act as a central index for using Python from the command line, rather than it necessarily containing all the details directly. Rather than trying too hard to categorise them, I'd be inclined to start with a simple alphabetical list (module name linking to the relevant section in the module docs, adding it if it doesn't already exist). Something like: compileall - Precompiling Python source modules to bytecode pickle - Display the contents of pickles saved as files pickletools - Analyse the contents of pickles saved as files site - Display details of Python's configuration sysconfig - Display additional details of Python's configuration test - Execute Python's own regression test suite timeit - Microbenchmarking for small Python snippets unittest - Find and execute unit tests Maybe we'll decide to do something more long term, but I think this is a good way to start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 05:57:56 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 29 May 2012 03:57:56 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv In-Reply-To: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> Message-ID: <1338263876.46.0.693644027716.issue14939@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:01:53 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 29 May 2012 04:01:53 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338264113.42.0.320820978453.issue14945@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 06:05:51 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Tue, 29 May 2012 04:05:51 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338264351.38.0.206208209517.issue14944@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 11:11:34 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 29 May 2012 09:11:34 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv In-Reply-To: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> Message-ID: <1338282694.8.0.341335266625.issue14939@psf.upfronthosting.co.za> Vinay Sajip added the comment: The "Using" section has 4 sub-sections: one on the Python command line, + 3 on Python usage on Windows, Linux and OS X. I propose to add a fourth sub-section "Additional Tools and Scripts" (feel free to suggest an alternative title) and under that, add a section for pyvenv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 13:55:56 2012 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 29 May 2012 11:55:56 +0000 Subject: [docs] [issue14939] Usage documentation for pyvenv In-Reply-To: <1338246604.46.0.951372284166.issue14939@psf.upfronthosting.co.za> Message-ID: <1338292556.96.0.74408732699.issue14939@psf.upfronthosting.co.za> Vinay Sajip added the comment: Done in ace7c340d95d. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:08:57 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 29 May 2012 14:08:57 +0000 Subject: [docs] [issue12779] Update packaging documentation In-Reply-To: <1313686169.0.0.406072932055.issue12779@psf.upfronthosting.co.za> Message-ID: <1338300537.15.0.893561822873.issue12779@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- dependencies: +Usage documentation for pysetup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 16:26:47 2012 From: report at bugs.python.org (Alexis Metaireau) Date: Tue, 29 May 2012 14:26:47 +0000 Subject: [docs] [issue12779] Update packaging documentation In-Reply-To: <1313686169.0.0.406072932055.issue12779@psf.upfronthosting.co.za> Message-ID: <1338301607.39.0.577581924066.issue12779@psf.upfronthosting.co.za> Alexis Metaireau added the comment: I think it could be helpful to have this work at least somewhere so we can work on top of it. For instance if someone wants to do changes in the documentation, then only thing it would do now would be to cause potential merge conflicts. I'm okay to have several commits for this, as it would allow us to work on the documentation with more than one person (theoretically at least). Plus I really want to see those changes! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 18:11:10 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 29 May 2012 16:11:10 +0000 Subject: [docs] [issue12779] Update packaging documentation In-Reply-To: <1313686169.0.0.406072932055.issue12779@psf.upfronthosting.co.za> Message-ID: <1338307870.42.0.864454344924.issue12779@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 29 23:13:58 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 May 2012 21:13:58 +0000 Subject: [docs] [issue14943] winreg OpenKey doesn't work as documented In-Reply-To: <1338250481.35.0.334465326284.issue14943@psf.upfronthosting.co.za> Message-ID: <1338326038.36.0.862121728868.issue14943@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:34:50 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 22:34:50 +0000 Subject: [docs] [issue14957] Improve docs for str.splitlines Message-ID: <1338330890.64.0.0644445250227.issue14957@psf.upfronthosting.co.za> New submission from Nick Coghlan : The docs for str.splitlines() should explain: 1. That it uses the universal newlines approach to splitting lines 2. That unlike str.split() a trailing empty line is *not* included in the resulting list ---------- assignee: docs at python components: Documentation messages: 161915 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Improve docs for str.splitlines versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 00:46:05 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 May 2012 22:46:05 +0000 Subject: [docs] [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1338331565.84.0.335041088254.issue14956@psf.upfronthosting.co.za> Nick Coghlan added the comment: For the more general breakage due to PYTHONHOME and PYTHONPATH, yeah, global environment variables are bad, particularly when an OS relies on tools written in (or embedding) Python. That's the reason virtualenv (and 3.3's forthcoming venv) are a preferred alternative - they give you a space to play in that shouldn't break your system Python or apps that embed it. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python stage: -> needs patch versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:44:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 May 2012 23:44:46 +0000 Subject: [docs] [issue14943] winreg OpenKey doesn't work as documented In-Reply-To: <1338250481.35.0.334465326284.issue14943@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset fcb6c4a4ac0e by Brian Curtin in branch '3.2': Fix #14943. Update the proper default value and list the proper argument names in the explanation. http://hg.python.org/cpython/rev/fcb6c4a4ac0e New changeset 29e0f08ef065 by Brian Curtin in branch 'default': Fix #14943. Merge 3.2 http://hg.python.org/cpython/rev/29e0f08ef065 New changeset 8ec62c9eea34 by Brian Curtin in branch '3.2': Add news item for #14943 http://hg.python.org/cpython/rev/8ec62c9eea34 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 01:45:24 2012 From: report at bugs.python.org (Brian Curtin) Date: Tue, 29 May 2012 23:45:24 +0000 Subject: [docs] [issue14943] winreg OpenKey doesn't work as documented In-Reply-To: <1338250481.35.0.334465326284.issue14943@psf.upfronthosting.co.za> Message-ID: <1338335124.83.0.0603920385672.issue14943@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: docs at python -> brian.curtin components: +Windows resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:12:47 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 30 May 2012 14:12:47 +0000 Subject: [docs] [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1338387167.29.0.962597621708.issue14956@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I fully agree with site.py/os.py/spam.py but I find it offtopic for this Issue. I don?t understand this message :) There is nothing to agree with or judge on or off-topic; I was trying to understand the root of the bug and really asking you in good faith to try two things to see if my idea was right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:21:29 2012 From: report at bugs.python.org (Jan Kratochvil) Date: Wed, 30 May 2012 14:21:29 +0000 Subject: [docs] [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1338387689.16.0.961342294441.issue14956@psf.upfronthosting.co.za> Jan Kratochvil added the comment: While it should be documented this is not only a docs issue. It should be solved in some way during runtime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 16:32:55 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 May 2012 14:32:55 +0000 Subject: [docs] [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338321412.45.0.331737203349.issue14956@psf.upfronthosting.co.za> Message-ID: <1338388375.72.0.804134292984.issue14956@psf.upfronthosting.co.za> R. David Murray added the comment: No it shouldn't. As mentioned in the Fedora thread you linked, this is no different than the user setting LD_LIBRARY_PATH to something that screws up a system installed program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 30 22:57:08 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 30 May 2012 20:57:08 +0000 Subject: [docs] [issue14956] custom PYTHONPATH may break apps embedding Python In-Reply-To: <1338388375.72.0.804134292984.issue14956@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: If we don't expose the mechanism behind -E to embedding applications via the C API, then a non-docs change may be needed. However, writing (or at least trying to write) the relevant docs is a good way to check whether or not that is the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 08:46:03 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 31 May 2012 06:46:03 +0000 Subject: [docs] [issue14966] Fully document subprocess.CalledProcessError Message-ID: <1338446762.96.0.360332771622.issue14966@psf.upfronthosting.co.za> New submission from Nick Coghlan : CalledProcessError provides a nice encapsulation for a returncode, the original command and any partial output. The API should be officially documented so that third party subprocess.Popen convenience wrappers can use it easily. ---------- assignee: docs at python components: Documentation keywords: easy messages: 161984 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Fully document subprocess.CalledProcessError type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 09:44:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 May 2012 07:44:32 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1338450272.17.0.413850236013.issue10376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch updated to reflect Martin's stylistic comments. Sorry for the delay, Martin. I have not received an email with your review from 2012-05-13, and only today accidentally discovered your comments in Rietveld. It seems to have been some bug in Rietveld. ---------- Added file: http://bugs.python.org/file25769/zipfile_optimize_read_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:55:26 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 31 May 2012 08:55:26 +0000 Subject: [docs] [issue14944] Setup & Usage documentation for pydoc, idle & 2to3 In-Reply-To: <1338256058.02.0.10025521772.issue14944@psf.upfronthosting.co.za> Message-ID: <1338454526.25.0.931841046639.issue14944@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 10:55:36 2012 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 31 May 2012 08:55:36 +0000 Subject: [docs] [issue14945] Setup & Usage documentation for selected stdlib modules In-Reply-To: <1338256259.22.0.129056676976.issue14945@psf.upfronthosting.co.za> Message-ID: <1338454536.89.0.180376687551.issue14945@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 11:36:37 2012 From: report at bugs.python.org (Alexis Metaireau) Date: Thu, 31 May 2012 09:36:37 +0000 Subject: [docs] [issue14899] Naming conventions and guidelines for packages and namespace packages In-Reply-To: <1337863326.85.0.0790625001968.issue14899@psf.upfronthosting.co.za> Message-ID: <1338456997.14.0.685397597288.issue14899@psf.upfronthosting.co.za> Changes by Alexis Metaireau : ---------- nosy: +alexis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 14:32:46 2012 From: report at bugs.python.org (Lars Buitinck) Date: Thu, 31 May 2012 12:32:46 +0000 Subject: [docs] [issue14968] Section "Inplace Operators" of :mod:`operator` should be a subsection Message-ID: <1338467566.04.0.840263099985.issue14968@psf.upfronthosting.co.za> New submission from Lars Buitinck : The section "Inplace Operators" of the module docs for operator now show up in TOC at http://docs.python.org/dev/library/. I don't think that's intended as it does not describe a separate module. ---------- assignee: docs at python components: Documentation files: operator-module-docs.patch keywords: patch messages: 161996 nosy: docs at python, larsmans priority: normal severity: normal status: open title: Section "Inplace Operators" of :mod:`operator` should be a subsection type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25772/operator-module-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 31 21:58:29 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 May 2012 19:58:29 +0000 Subject: [docs] [issue14971] (unittest) loadTestsFromName does not work on method with a decorator In-Reply-To: <1338490939.51.0.536223048687.issue14971@psf.upfronthosting.co.za> Message-ID: <1338494309.3.0.165763351477.issue14971@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think this is documented anywhere (and should be). I believe what you need to do is use functools.wraps on your wrapper function. ---------- assignee: -> docs at python components: +Documentation -None nosy: +docs at python, michael.foord, r.david.murray versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From alv.deamicis at gmail.com Wed May 30 15:53:42 2012 From: alv.deamicis at gmail.com (Alvaro De Amicis) Date: Wed, 30 May 2012 15:53:42 +0200 Subject: [docs] python 3 library reference Message-ID: I think there is an inaccurate information in Python 3 documentation. In the 'Library Reference', chapter 4 'Built-in Types', there is a description of string methods (par. 4.6.1). Among them, there is the 'encode' method: ... str.encode(encoding="utf-8", errors="strict") Return an encoded version of the string as a bytes object. Default encoding is 'utf-8'. errors may be given to set a different error handling scheme. The default for errors is 'strict', meaning that encoding errors raise a UnicodeError. Other possible values are 'ignore', 'replace', 'xmlcharrefreplace', 'backslashreplace' and any other name registered via codecs.register_error(), see section Codec Base Classes. For a list of possible encodings, see section Standard Encodings. Changed in version 3.1: Support for keyword arguments added. ... But I think that the support for keyword arguments was added in 3.2! In fact I got this exception: ---------------------------------------------------------------------------------------------------- Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.1/tkinter/__init__.py", line 1402, in __call__ return self.func(*args) File "./stabtk-120530.py", line 510, in Button(wnd, text='Salva...', width=16, command=(lambda: g_salva(var, wnd, True, ''))).pack(pady=1) File "./stabtk-120530.py", line 497, in g_salva fp.write(txt.encode(encoding="utf-8", errors="strict")) TypeError: encode() takes no keyword arguments ---------------------------------------------------------------------------------------------------- I ran this script with Python 3.1.2 (r312:79147, Dec 9 2011, 20:47:34) [GCC 4.4.3] on linux2 If I run the same script with Python 3.2, I don't get any error! Am I wrong, or is the reference wrong? Thank you A. De Amicis From gaston.fiore at gmail.com Thu May 31 22:31:23 2012 From: gaston.fiore at gmail.com (Gaston Fiore) Date: Thu, 31 May 2012 16:31:23 -0400 Subject: [docs] Glossary mistake Message-ID: Hello, In the glossary, in the definition of "file object", there's an extra word "other" in the second sentence of the definition. It currently reads: "Depending on the way it was created, a file object can mediate access to a real on-disk file or to another other type of storage or communication device (for example standard input/output, in-memory buffers, sockets, pipes, etc.)." It should instead read: "Depending on the way it was created, a file object can mediate access to a real on-disk file or to another type of storage or communication device (for example standard input/output, in-memory buffers, sockets, pipes, etc.)." Best, -Gaston From Greg.Kennedy at acxiom.com Tue May 29 20:42:10 2012 From: Greg.Kennedy at acxiom.com (Kennedy Greg - grkenn) Date: Tue, 29 May 2012 18:42:10 +0000 Subject: [docs] Control flow - explanation Message-ID: Going through the tutorial for programmers, I noticed an area which might benefit from some improvement. http://docs.python.org/tutorial/controlflow.html Code snippet in section 4.4 is followed up by this: "(Yes, this is the correct code. Look closely: the else clause belongs to the for loop, not the if statement.)" -- That's hardly explanatory: if you are unfamiliar with the use of whitespace to designate blocks (say, coming from a language where {} braces normally accomplish the task), then this won't make any sense. This seems as good a place as any to begin addressing the "white space as a control structure" aspect of Python, perhaps with a demonstration that adding tabs to the Else: block will result in incorrect behavior. I don't recall seeing this being mentioned earlier in the tutorial, yet it's an important defining aspect of the grammar. *************************************************************************** The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank You. **************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From storchaka at gmail.com Thu May 31 09:46:38 2012 From: storchaka at gmail.com (storchaka at gmail.com) Date: Thu, 31 May 2012 07:46:38 -0000 Subject: [docs] ZipFile unzip is unbuffered (issue 10376) Message-ID: <20120531074638.14458.28090@psf.upfronthosting.co.za> http://bugs.python.org/review/10376/diff/4903/Lib/zipfile.py File Lib/zipfile.py (right): http://bugs.python.org/review/10376/diff/4903/Lib/zipfile.py#newcode659 Lib/zipfile.py:659: n += self._offset On 2012/05/13 21:34:47, loewis wrote: > I would call this variable "end" instead of "n" here, as it changes its meaning > from the original "n" parameter. Ok. http://bugs.python.org/review/10376/