From report at bugs.python.org Tue Mar 1 12:08:13 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 01 Mar 2011 11:08:13 +0000 Subject: [docs] [issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python In-Reply-To: <1265490255.73.0.743157337936.issue7867@psf.upfronthosting.co.za> Message-ID: <1298977693.07.0.0572265743997.issue7867@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 1 13:28:23 2011 From: report at bugs.python.org (Daniel Haertle) Date: Tue, 01 Mar 2011 12:28:23 +0000 Subject: [docs] [issue11360] In documentation of getopt, advertise argparse instead of optparse In-Reply-To: <1298982503.08.0.830578820579.issue11360@psf.upfronthosting.co.za> Message-ID: <1298982503.08.0.830578820579.issue11360@psf.upfronthosting.co.za> New submission from Daniel Haertle : At the beginning of http://docs.python.org/dev/library/getopt.html the line "A more convenient, flexible, and powerful alternative is the optparse module." routes the user to optparse. Since optparse is deprecated in favor of argparse, this line is no more up-to-date. The best is to remove this line completely, since there already is a note routing to argparse. ---------- assignee: docs at python components: Documentation messages: 129753 nosy: Danh, docs at python priority: normal severity: normal status: open title: In documentation of getopt, advertise argparse instead of optparse versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 1 19:28:21 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 01 Mar 2011 18:28:21 +0000 Subject: [docs] [issue11360] In documentation of getopt, advertise argparse instead of optparse In-Reply-To: <1298982503.08.0.830578820579.issue11360@psf.upfronthosting.co.za> Message-ID: <1299004101.85.0.112663777361.issue11360@psf.upfronthosting.co.za> ?ric Araujo added the comment: This was overlooked in r81490, which added the note pointing to argparse. Fixed in r88696 for the py3k branch (I?ll backport later to 3.2 and 2.7), thanks. ---------- nosy: +eric.araujo resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 1 19:50:03 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 01 Mar 2011 18:50:03 +0000 Subject: [docs] [issue11363] Curses - add missing functions to doc In-Reply-To: <1299005402.55.0.443028099437.issue11363@psf.upfronthosting.co.za> Message-ID: <1299005402.55.0.443028099437.issue11363@psf.upfronthosting.co.za> New submission from Sandro Tosi : Following up http://mail.python.org/pipermail/docs/2011-January/002922.html , I did a check on all the documented functions of curses and those available from the module, and wrote a patch to include in the doc the missing ones (text is mainly brought by manpages). IMHO, it should be backported to the currently maintained versions (but I didn't check what's 2.7 status). ---------- assignee: docs at python components: Documentation files: curses_missing_functs-py3k.patch keywords: patch messages: 129791 nosy: docs at python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Curses - add missing functions to doc versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20962/curses_missing_functs-py3k.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Mar 1 19:50:28 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 1 Mar 2011 18:50:28 +0000 Subject: [docs] curses page doesn't mention the resize method In-Reply-To: <4D4B7F36.8060904@netwok.org> References: <4D365259.2030505@louiz.org> <4D4B7F36.8060904@netwok.org> Message-ID: Hi all, On Fri, Feb 4, 2011 at 04:23, ?ric Araujo wrote: >> On the curses page [0], there is no mention of the window.resize() >> method, though it exists. > > Public functions or methods that are missing from the docs are a bug. > Do you want to propose a patch? I wrote one at http://bugs.python.org/issue11363 Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue Mar 1 19:53:24 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 01 Mar 2011 18:53:24 +0000 Subject: [docs] [issue11363] Curses - add missing functions to doc In-Reply-To: <1299005402.55.0.443028099437.issue11363@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Tue, Mar 1, 2011 at 19:50, Sandro Tosi wrote: > > New submission from Sandro Tosi : > > Following up http://mail.python.org/pipermail/docs/2011-January/002922.html , I did a check on all the documented functions of curses and those available from the module, and wrote a patch to include in the doc the missing ones (text is mainly brought by manpages). > > IMHO, it should be backported to the currently maintained versions (but I didn't check what's 2.7 status). I did it now, it was quite easy: diff between 2.7 and py3k doc files are just a bunch of line, and patch applies fine (with some hunk offsets) on release2.7-maint too. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Mar 1 23:45:35 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 1 Mar 2011 22:45:35 +0000 Subject: [docs] Bug viewing docs.python.org from IPod/IPhone In-Reply-To: References: Message-ID: Hi Anton, thanks for your email. On Sun, Jan 16, 2011 at 14:46, Anton Chikin wrote: > Hi, > > I've noticed that code sample blocks long lines are truncated with the > right edge of the screen while browsing documentation on > docs.python.org with Safari browser from IPod/IPhone 3G(S). I think this can be considere the expected behavior: while the text around the code is correctly rewrapped to shorter page witdh, this cannot be done for code, where indentation matters. On chormium I can see a slinging bar at the bottom of the code block, in order to scroll it, but without auto adjusting: if it's not there for you, then maybe that's a problem. 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 Wed Mar 2 02:30:30 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Mar 2011 01:30:30 +0000 Subject: [docs] [issue11366] xml.etree.ElementTree.Element: docs should mention immediate subelement In-Reply-To: <1299029422.8.0.159025283655.issue11366@psf.upfronthosting.co.za> Message-ID: <1299029430.93.0.29211649244.issue11366@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 02:34:21 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Mar 2011 01:34:21 +0000 Subject: [docs] [issue11366] xml.etree.ElementTree.Element: docs should mention immediate subelement In-Reply-To: <1299029422.8.0.159025283655.issue11366@psf.upfronthosting.co.za> Message-ID: <1299029661.81.0.179935442451.issue11366@psf.upfronthosting.co.za> anatoly techtonik added the comment: See also http://diveintopython3.org/xml.html#xml-find ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 02:44:31 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Mar 2011 01:44:31 +0000 Subject: [docs] [issue11367] xml.etree.ElementTree.find(all): docs are wrong In-Reply-To: <1299030271.87.0.648664421014.issue11367@psf.upfronthosting.co.za> Message-ID: <1299030271.87.0.648664421014.issue11367@psf.upfronthosting.co.za> New submission from anatoly techtonik : ElementTree.find(path) docs say: "Finds the first toplevel element with given tag. Same as getroot().find(path). path is the element to look for." That's not true. path can take the form of "//tag" to find any child element with given tag, not strictly top level. ---------- assignee: docs at python components: Documentation messages: 129847 nosy: docs at python, techtonik priority: normal severity: normal status: open title: xml.etree.ElementTree.find(all): docs are wrong versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 12:08:50 2011 From: report at bugs.python.org (Michal Nowikowski) Date: Wed, 02 Mar 2011 11:08:50 +0000 Subject: [docs] [issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module In-Reply-To: <1295898075.1.0.406467023745.issue10999@psf.upfronthosting.co.za> Message-ID: <1299064130.2.0.552900462244.issue10999@psf.upfronthosting.co.za> Michal Nowikowski added the comment: Improved the patch: - moved code example up, just below S_* functions list ---------- Added file: http://bugs.python.org/file20973/documented-os_chflags-flags-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 12:32:03 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Wed, 02 Mar 2011 11:32:03 +0000 Subject: [docs] [issue11372] Remove xrange from argparse docs In-Reply-To: <1299065523.43.0.68544574367.issue11372@psf.upfronthosting.co.za> Message-ID: <1299065523.43.0.68544574367.issue11372@psf.upfronthosting.co.za> New submission from Ross Lagerwall : As the title says, this patch replaces xrange with range for the 3.3 docs. ---------- assignee: docs at python components: Documentation files: doc.patch keywords: patch messages: 129876 nosy: docs at python, rosslagerwall priority: normal severity: normal status: open title: Remove xrange from argparse docs versions: Python 3.3 Added file: http://bugs.python.org/file20974/doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 13:44:28 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 02 Mar 2011 12:44:28 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak : Try to fix this in every Python documentation that you can. The typo was found here: http://docs.python.org/library/stdtypes.html#memoryview "Create a memoryview that references obj. obj must support the buffer protocol. Builtin objects that /.../." Fix this to "Create a memoryview that references obj, which must support the buffer protocol. Built-in objects that /.../." Thank you. ---------- assignee: docs at python components: Documentation messages: 129886 nosy: Retro, docs at python priority: normal severity: normal status: open title: Fix 2 new typos in the docs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 20:25:08 2011 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 02 Mar 2011 19:25:08 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> New submission from Stefan Behnel : http://docs.python.org/library/xml.dom.minidom.html presents MiniDOM as a "Lightweight DOM implementation". The word "lightweight" is easily misunderstood as meaning "efficient" or "memory friendly". MiniDOM is well known to be neither of the two. The first paragraph then continues: """ xml.dom.minidom is a light-weight implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also significantly smaller. """ Again, "smaller" can be misread as "low memory footprint", whereas it is actually supposed to refer to an incomplete DOM API implementation. And "simpler" is also clearly exaggerated when compared to the alternative ElementTree package. I would like to see this changed and combined with a clear and visible comment that MiniDOM has very high resource profile, e.g. """ 19.7. xml.dom.minidom ? Pure Python DOM implementation xml.dom.minidom is a pure Python implementation of the Document Object Model interface, as known from other programming languages. It is intended to provide a smaller API than the full DOM. Note, however, that MiniDOM has a very large memory footprint compared to other Python XML libraries. If you need a fast and memory friendly XML tree implementation with a vastly simpler API, use the xml.etree package instead. """ ---------- assignee: docs at python components: Documentation messages: 129914 nosy: docs at python, scoder priority: normal severity: normal status: open title: Remove "lightweight" from minidom description versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 2 22:49:46 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Mar 2011 21:49:46 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299102586.35.0.461838257147.issue11379@psf.upfronthosting.co.za> Martin v. L?wis added the comment: -1. The description is factually correct - minidom *does* have a lower footprint than other Python DOM implementations (such as 4DOM). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 06:31:43 2011 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 03 Mar 2011 05:31:43 +0000 Subject: [docs] [issue11372] Remove xrange from argparse docs In-Reply-To: <1299065523.43.0.68544574367.issue11372@psf.upfronthosting.co.za> Message-ID: <1299130303.4.0.991241079184.issue11372@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Committed for Python 3.3.0: r88717 Committed for Python 3.2.1: r88718 ---------- assignee: docs at python -> fdrake nosy: +fdrake resolution: -> accepted stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 08:02:18 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Mar 2011 07:02:18 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299135737.97.0.600914863085.issue11379@psf.upfronthosting.co.za> Stefan Behnel added the comment: Well, I'm not aware of many people who use 4DOM these days, and if that's what it's meant to refer to, maybe that should be made more obvious, because it currently is not at all. Even cDomlette uses only half of the memory according to http://effbot.org/zone/celementtree.htm When you say that the description is "factually correct", that does by no means imply that the average reader will understand how it's meant. My point is that almost everyone who reads this will draw the wrong conclusions. Also, when you say "lower footprint", that does not yet make it "light weight" in any way. It still uses something like ten times as much memory as cElementTree or lxml in Python 2 (and likely much more than even that in Python 3), and still something like 4-5 times as much as plain Python ElementTree. That's a huge difference. What about this phrasing then: """ MiniDOM has a smaller memory footprint than some of the other DOM compliant implementations for Python (such as 4DOM), but uses about 10x more memory than the faster and simpler xml.etree.cElementTree module. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 09:16:06 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Mar 2011 08:16:06 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299135737.97.0.600914863085.issue11379@psf.upfronthosting.co.za> Message-ID: <4D6F4E44.8080403@v.loewis.de> Martin v. L?wis added the comment: > What about this phrasing then: > > """ MiniDOM has a smaller memory footprint than some of the other DOM > compliant implementations for Python (such as 4DOM), but uses about > 10x more memory than the faster and simpler xml.etree.cElementTree > module. """ But that's not a DOM implementation - so it would be comparing apples and oranges. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 09:31:31 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Mar 2011 08:31:31 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299141091.25.0.50122778334.issue11379@psf.upfronthosting.co.za> Stefan Behnel added the comment: It's the tree based API most python users are parsing XML with, though. So I do not agree that it's comparing apples and oranges, not at all. It's comparing tree based XML libraries, only one of which is worth being called "light weight", and that's not the one that is currently carrying that name. I think it's worth telling new users what they are committing to when they write code that uses MiniDOM. The documentation should allow them to understand that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 09:36:34 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Mar 2011 08:36:34 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299141091.25.0.50122778334.issue11379@psf.upfronthosting.co.za> Message-ID: <4D6F5311.6010804@v.loewis.de> Martin v. L?wis added the comment: > It's the tree based API most python users are parsing XML with, > though. So I do not agree that it's comparing apples and oranges, not > at all. It's comparing tree based XML libraries, only one of which is > worth being called "light weight", and that's not the one that is > currently carrying that name. If that is a real concern, I'd rather reduce the memory footprint of minidom than put actual performance figures into the documentation that will likely outdate over time. Notice that the documentation doesn't claim that it is a lightweight XML library, only that it's a ligthweight DOM implementation. SAX is, of course, even lighter-weight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 10:29:01 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Mar 2011 09:29:01 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299144541.87.0.619999241678.issue11379@psf.upfronthosting.co.za> Stefan Behnel added the comment: > If that is a real concern, I'd rather reduce the memory footprint of > minidom than put actual performance figures into the documentation > that will likely outdate over time. Personally, I do not think it's worth putting much work into MiniDOM. I'd rather deprecate it to prevent new code from being written for it, but that's just my personal opinion, and this is the wrong place to discuss that. Given the current performance characteristics, I wouldn't be surprised if there was quite some room for improvements left in the xml.dom package. If you dislike the "10x", feel free to use "several times". I doubt that MiniDOM will ever get so much closer to cET and lxml to prove that phrasing wrong. > Notice that the documentation doesn't claim that it is a lightweight > XML library, only that it's a ligthweight DOM implementation. I imagine that you are as aware as I am that this nuance is easy to miss, especially for a new user. From my experience, it is very common for users, especially those with a Java-ish background, to confuse the terms "DOM" and "XML tree API/library". Hence my push to change the documentation. > SAX is, of course, even lighter-weight. Not so much more light weight than cET's iterparse(), but that's getting OT here. Stefan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 11:58:02 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Mar 2011 10:58:02 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1299149882.79.0.215233919731.issue11379@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Stefan's concern. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 19:25:34 2011 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Mar 2011 18:25:34 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> New submission from anatoly techtonik : TextTestRunner has a run method, which is not documented. It is also is not clear how to add suite to TextTestRunner to be executed later by unittest.main() ---------- assignee: docs at python components: Documentation, Tests messages: 129988 nosy: docs at python, techtonik priority: normal severity: normal status: open title: TextTestRunner methods are not documented versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 3 20:57:25 2011 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Mar 2011 19:57:25 +0000 Subject: [docs] [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> New submission from anatoly techtonik : I can't find a way to execute DocTests contained in a separate README.txt file using unittest.main() function. That doesn't allow to control verbosity for debugging. I am doing it this way in the tests.py import doctest import unittest if __name__ == '__main__': runner = unittest.TextTestRunner() runner.run(doctest.DocFileSuite('README.txt', optionflags=doctest.ELLIPSIS)) I could find a way to subclass TestLoader.loadTestsFromNames() by looking at the source code of undocumented TestProgram. I'd like to see this use case at least covered by documentation if not properly developed for stdlib of Python4. ---------- assignee: docs at python components: Documentation, Tests messages: 130001 nosy: docs at python, techtonik priority: normal severity: normal status: open title: unittest: no way to control verbosity of doctests from cmd _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Mar 3 23:37:40 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 3 Mar 2011 22:37:40 +0000 Subject: [docs] plistlib doc In-Reply-To: <80C1C5FF-B016-43AE-B639-87447D81AEDF@adobe.com> References: <80C1C5FF-B016-43AE-B639-87447D81AEDF@adobe.com> Message-ID: Hello David, On Thu, Jan 13, 2011 at 23:41, David Cotter wrote: > http://docs.python.org/library/plistlib.html > does not list all the available methods of each new class > please document: > for example: > what are the methods of "Dict" ? I can't find any reference to 'Dict' in the doc, if not in the examples, where it's used dict() to create a new dictionary data structure (which is a standard python datatype) > 'clear', 'copy', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', > 'iterkeys', 'itervalues', 'keys', 'pop', 'popitem', 'setdefault', 'update', > 'values' > these are not documented > and what about all the other classes? Can you please point precisely to what other classes are you referring to? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri Mar 4 00:13:22 2011 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 03 Mar 2011 23:13:22 +0000 Subject: [docs] [issue11392] Turtle - better explain 'chaos' demo In-Reply-To: <1299194002.65.0.446288192224.issue11392@psf.upfronthosting.co.za> Message-ID: <1299194002.65.0.446288192224.issue11392@psf.upfronthosting.co.za> New submission from Sandro Tosi : Following up http://mail.python.org/pipermail/docs/2011-January/002786.html I prepared this patch to - correct Verhulst name - explain that the results can be against common sense Also, what's exactly related to "world coordinates" in this example? ---------- assignee: docs at python components: Documentation files: turle_demo_chaos-py3k.patch keywords: patch messages: 130012 nosy: docs at python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Turtle - better explain 'chaos' demo versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20992/turle_demo_chaos-py3k.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Fri Mar 4 00:14:19 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 3 Mar 2011 23:14:19 +0000 Subject: [docs] chaos In-Reply-To: References: Message-ID: Hello Colin, thanks for your email. On Thu, Jan 13, 2011 at 17:19, Colin Reveley wrote: > here: > > http://docs.python.org/library/turtle.html#demo-scripts > > you say that chaotic behavior "proves that you cannot trust a computer's > computations" > > well, the opposite is the case. it proves you can trust computations > absolutely. the computations are deterministic. they are correct. that's how > the lorenz attractor was discovered. > > you do need to know what a computer does (and to what) when it computes, and > what it doesn't, and how to interpret it. > > it's misleading to say that computation is untrustworthy. computation is a > particular thing, that's all. > > it might seem pedantic but I think it's a much more interesting and > important thing for a student to think about than "untrustworthy". > > which is just false anyway. as you know I'm sure. I'm not trying to be > patronising. In http://bugs.python.org/issue11392 I tried to rephrase the description, feel free to contribute on the issue for additional adjustment. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri Mar 4 02:02:57 2011 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Mar 2011 01:02:57 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299200577.2.0.813467075981.issue11373@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 04:02:10 2011 From: report at bugs.python.org (Bob Wintemberg) Date: Fri, 04 Mar 2011 03:02:10 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299207730.4.0.170859562399.issue11373@psf.upfronthosting.co.za> Bob Wintemberg added the comment: The following is a patch to fix this documentation issue in release27-maint. ---------- keywords: +patch nosy: +rwinte Added file: http://bugs.python.org/file20993/patch-27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 04:03:05 2011 From: report at bugs.python.org (Bob Wintemberg) Date: Fri, 04 Mar 2011 03:03:05 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299207785.41.0.0334034299475.issue11373@psf.upfronthosting.co.za> Bob Wintemberg added the comment: The following is a patch to fix this documentation issue in py3k. ---------- Added file: http://bugs.python.org/file20994/patch-3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 08:37:56 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Mar 2011 07:37:56 +0000 Subject: [docs] [issue11368] xml.etree.ElementTree.Element should have a reference to parent In-Reply-To: <1299031116.52.0.175842807219.issue11368@psf.upfronthosting.co.za> Message-ID: <1299224276.04.0.598593646912.issue11368@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation -XML nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 08:38:12 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Mar 2011 07:38:12 +0000 Subject: [docs] [issue11368] Document why xml.etree.ElementTree.Element has no reference to parent In-Reply-To: <1299031116.52.0.175842807219.issue11368@psf.upfronthosting.co.za> Message-ID: <1299224292.82.0.865781631541.issue11368@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- title: xml.etree.ElementTree.Element should have a reference to parent -> Document why xml.etree.ElementTree.Element has no reference to parent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 10:04:41 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 04 Mar 2011 09:04:41 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299229480.98.0.284469303101.issue11373@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Please fix the word "Builtin" to "Built-in" as well. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 10:08:15 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 Mar 2011 09:08:15 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299229695.27.0.307430779483.issue11373@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 13:33:00 2011 From: report at bugs.python.org (Stephen Evans) Date: Fri, 04 Mar 2011 12:33:00 +0000 Subject: [docs] [issue9802] Document 'stability' of builtin min() and max() In-Reply-To: <1283974231.16.0.73129931792.issue9802@psf.upfronthosting.co.za> Message-ID: <1299241980.44.0.537248844158.issue9802@psf.upfronthosting.co.za> Stephen Evans added the comment: As suggested by Mark following my post on comp.lang.python I am adding further comments to the discussion on this (closed) issue. For a more mathematical consideration of the issue: Stepanov, Alexander and Paul McJones. 2009. Elements of Programming. Addison Wesley. Pages 52-53 The problem with the builtin max() is with weak comparisons. Consider two python objects a and b that are equivalent and where the following are True: a is not b repr([a, b]) == repr(sorted([a, b])) repr([a, b]) == repr(sorted([a, b], reverse=True)) repr([b, a]) == repr(sorted([b, a])) repr([b, a]) == repr(sorted([b, a], reverse=True)) Assuming repr() implemented correctly for a and b. The only Python rich comparison required is (weak) __lt__. If (weak) __eq__ is implemented then the following are True: a == b b == a In bltinmodule.c builtin_max() uses Py_GT. For correctness this should use the converse of builtin_min() i.e. the boolean negation of PyObject_RichCompare using Py_LT (for valid results). If using Python rich comparisions then only __lt__ would be required for both min() and max() as with list.sort(). The following will then be True: min([a, b]) is a max([a, b]) is b min([b, a]) is b max([b, a]) is a min([a, b]) is max([b, a]) min([a, b]) is not min([b, a]) max([a, b]) is min([b, a]) max([a, b]) is not max([b, a]) The above will work if Py_GE is subtituted for Py_GT in builtin_max(), though this will require the implementation of __ge__ which is inconsistent with list.sort() and is a point of potential failure if the implementation of __ge__ is not the converse of the implementation __lt__. To reiterate - builtin max() should be the converse of builtin min(). ---------- components: +None -Documentation nosy: +Stephen.Evans versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file20996/min_max.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 14:32:09 2011 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 04 Mar 2011 13:32:09 +0000 Subject: [docs] [issue11368] Document why xml.etree.ElementTree.Element has no reference to parent In-Reply-To: <1299031116.52.0.175842807219.issue11368@psf.upfronthosting.co.za> Message-ID: <1299245529.63.0.883996264081.issue11368@psf.upfronthosting.co.za> anatoly techtonik added the comment: I still struggling to find a way to apply http://effbot.org/zone/element.htm#accessing-parents in my specific case. Unfortunately, it doesn't seem trivial to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 14:40:41 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 04 Mar 2011 13:40:41 +0000 Subject: [docs] [issue11368] Document why xml.etree.ElementTree.Element has no reference to parent In-Reply-To: <1299031116.52.0.175842807219.issue11368@psf.upfronthosting.co.za> Message-ID: <1299246041.5.0.811536831112.issue11368@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is a question for comp.lang.python ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 18:57:11 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 04 Mar 2011 17:57:11 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299261431.02.0.0719698233157.issue11373@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I am uploading a patch that fixes both of these typos in the docs. Please apply it and keep up the good work. ---------- versions: +Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20998/stdtypes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 21:44:51 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 20:44:51 +0000 Subject: [docs] [issue11400] Remove reference to pre 1.5 assignment behavior In-Reply-To: <1299271491.28.0.280932939056.issue11400@psf.upfronthosting.co.za> Message-ID: <1299271491.28.0.280932939056.issue11400@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In Language Ref, 6.2 assignments, delete "(This rule is relaxed as of Python 1.5; in earlier versions, the object had to be a tuple. Since strings are sequences, an assignment like a, b = "xy" is now legal as long as the string has the right length.)" ---------- assignee: docs at python components: Documentation messages: 130071 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: Remove reference to pre 1.5 assignment behavior versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 21:55:13 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 20:55:13 +0000 Subject: [docs] [issue11337] Nothing refers to footnote [1] on page "6. Simple Statements" in Language Reference In-Reply-To: <1298745459.54.0.732710965592.issue11337@psf.upfronthosting.co.za> Message-ID: <1299272113.28.0.290938776377.issue11337@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Agreed. The footnote is "[1] It may occur within an except or else clause. The restriction on occurring in the try clause is implementor?s laziness and will eventually be lifted. " I searched chapter for all occurences of '1' and also found no reference. (And verified searching for '[#]' in .rst.) Nor can I think of what the footnote referred to. Unless someone else can, we should delete it. Georg: should sphinx not noticed mismatch between # of footnote references and footnotes? ---------- nosy: +georg.brandl, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 21:55:24 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 20:55:24 +0000 Subject: [docs] [issue11337] Nothing refers to footnote [1] on page "6. Simple Statements" in Language Reference In-Reply-To: <1298745459.54.0.732710965592.issue11337@psf.upfronthosting.co.za> Message-ID: <1299272124.38.0.960327652398.issue11337@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 4 21:59:57 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 20:59:57 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1299272397.28.0.624766928973.issue11338@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Conversion is underway today. Completion should be announced at least on the pydev list. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 00:17:02 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 23:17:02 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299280622.52.0.0134351857047.issue11385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Doc issues should be 'tested' and reported against the latest versions. 2.6.6 doc is effectively the last 2.6 version. TextTextRunner is not completely undocumented. In 3.2 >>> help(t.run) Help on function run in module unittest.runner: run(self, test) Run the given test case or test suite. Searching on 'run(' finds near the top of the unittest chapter (2.7, 3.2): "A test runner is an object that provides a single method, run(), which accepts a TestCase or TestSuite object as a parameter, and returns a result object." I agree that the entry for TextTestRunner near the bottom should include one for .run, with at least the doc string, but maybe a backreference to the discussion near the top. It is not clear to me how TextTestRunner is expected to be used. Does unittest.main instantiate one, and call run, behind the scenes? ---------- nosy: +michael.foord, terry.reedy versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 00:26:21 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Mar 2011 23:26:21 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299281181.56.0.471703405409.issue11385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I also see that TextTestRunner has an attribute resultclass, which is TextTestResult. Is this intended to be ever changed? The docstring for TTRunner says "It prints out the names of tests as they are run, errors as they occur, and a summary of the results at the end of the test run." which seems to be what .main() does. The manual just has the less informative "A basic test runner implementation that outputs results to a stream." I prefer the former. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 00:28:04 2011 From: report at bugs.python.org (Michael Foord) Date: Fri, 04 Mar 2011 23:28:04 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299281283.93.0.294306736309.issue11385@psf.upfronthosting.co.za> Michael Foord added the comment: Except the former is incorrect as the responsibility for printing results as they occur is with the TestResult and not the runner. I'll look at this and improve the docs for the runner. (And yes unittest.main() creates and uses a runner under the hood. It is frequently used directly by test frameworks as well though.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 01:08:20 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Mar 2011 00:08:20 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299283699.98.0.260659282819.issue11385@psf.upfronthosting.co.za> Terry J. Reedy added the comment: class unittest.TextTestRunner(stream=None, descriptions=True, verbosity=1, runnerclass=None, warnings=None) stream is documented, the others are not (except for some garbled text about warnings). "This class has a few configurable parameters, " is not helpful. It seems that TextTestRunner was meant to be a subclass of a documented TestRunner class (just as TextTestResult subclasses TestResult), except that is it not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 01:11:28 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Mar 2011 00:11:28 +0000 Subject: [docs] [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1299283888.1.0.200155232939.issue11389@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The undocumented verbosity parameter? ---------- nosy: +michael.foord, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 01:13:20 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Mar 2011 00:13:20 +0000 Subject: [docs] [issue11392] Turtle - better explain 'chaos' demo In-Reply-To: <1299194002.65.0.446288192224.issue11392@psf.upfronthosting.co.za> Message-ID: <1299284000.01.0.427401157013.issue11392@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +gregorlingl, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 01:15:36 2011 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Mar 2011 00:15:36 +0000 Subject: [docs] [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1299284136.18.0.586292400614.issue11389@psf.upfronthosting.co.za> Michael Foord added the comment: If the verbosity parameter isn't sufficient (which needs documenting but that is issue 11385) then it would need to be a feature request on DocFileSuite (part of doctest). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 01:21:43 2011 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Mar 2011 00:21:43 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299284503.88.0.565051674493.issue11385@psf.upfronthosting.co.za> Michael Foord added the comment: TextTestRunner was more meant to be an *example* of a test runner. It just turned out to be the only one and widely used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 06:44:11 2011 From: report at bugs.python.org (INADA Naoki) Date: Sat, 05 Mar 2011 05:44:11 +0000 Subject: [docs] [issue11405] Wrong reference to string module in tutorial/inputoutput.rst In-Reply-To: <1299303851.53.0.103129334097.issue11405@psf.upfronthosting.co.za> Message-ID: <1299303851.53.0.103129334097.issue11405@psf.upfronthosting.co.za> New submission from INADA Naoki : http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting > The standard module string contains some useful operations for padding strings to a given column width; these will be discussed shortly. The document uses str.rjust, ljust, zfill methods and not use string module for padding. ---------- assignee: docs at python components: Documentation messages: 130105 nosy: docs at python, naoki priority: normal severity: normal status: open title: Wrong reference to string module in tutorial/inputoutput.rst versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 5 09:02:56 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Mar 2011 08:02:56 +0000 Subject: [docs] [issue11405] Wrong reference to string module in tutorial/inputoutput.rst In-Reply-To: <1299303851.53.0.103129334097.issue11405@psf.upfronthosting.co.za> Message-ID: <1299312176.43.0.312357724242.issue11405@psf.upfronthosting.co.za> Ezio Melotti added the comment: That sentence should be changed to mention the str method rather than the deprecated functions in the string module. (The methods' names after the example should also link to the right str.method ---------- assignee: docs at python -> ezio.melotti keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From krishnan.gv at ge.com Wed Mar 2 06:55:56 2011 From: krishnan.gv at ge.com (GV, Krishnan (GE Transportation, Non-GE)) Date: Wed, 2 Mar 2011 11:25:56 +0530 Subject: [docs] Regarding standard Hex32 bit conversion Message-ID: <2FA4B2C868554B4E822A9C02B1581E4B0842DE9B@BANMLVEM05.e2k.ad.ge.com> Hi, I have been learning python for the last few months. I was not able to find a function for conversion from a 32-bit Hexadecimal Representation To Decimal Floating-Point. The one included in the library is really tough to use. Hence I have written my own. Kindly go through and acknowledge if u like it or otherwise. def hexconvert32(str_rcv): #string received :str_rcv str_rcv='0x'+str_rcv #appending 0x to it str_bin=bin(int(str_rcv,16)) #converting to binary k=[] #initializing reverse list k for i in range(len(str_bin)-1,-1,-1): k.append(str_bin[i]) k.pop() # popping the '0' k.pop() #popping the 'b' for i in range(len(k),33,1): #padding with 0 k.append('0') sign_bit=k.pop() #popping the sign bit expo='' sini='' for exp in range(30,22,-1): #removing exponent part expo= expo + k[exp] for sin in range(22,-1,-1): #removing significand part sini= sini + k[sin] h=[] dval=0 for i in range(1, len(sini),1): #finding the decimal value of significand dval =dval + (int(sini[i-1])*pow(2,(-1)*(i))) dval=dval+1 # adding 1 to the decimal dval #from here on we are looking at cases for each value. Detailed equations and explanations @ http://www.psc.edu/general/software/packages/ieee/ieee.php if int(expo,2)<255 and int(expo,2)>0 : v=(pow(-1,int(sign_bit,2)))*(pow(2,int(expo,2)-127))*(dval) return v elif int(expo,2)==0 and int(sini,2)!=0: v=(pow(-1,int(sign_bit,2)))*(pow(2,-126))*(dval-1) print v , 'unnormalized value' return 0 elif int(expo,2)==255 and int(sini,2)!=0: print 'Not a Number' return 0 elif int(expo,2)==0 and int(sini,2)==0 and int(sign_bit,2)==1: print '- infinity' return 0 elif int(expo,2)==0 and int(sini,2)==0 and int(sign_bit,2)==0: print 'infinity' return 0 else: print 'error' return 0 Thanks and Regards!! Krishnan G.V From steven.r.schaffer at jpl.nasa.gov Wed Mar 2 22:36:53 2011 From: steven.r.schaffer at jpl.nasa.gov (Schaffer, Steve (317J)) Date: Wed, 2 Mar 2011 13:36:53 -0800 Subject: [docs] tutorial example bug: filter function Message-ID: <3672E320C6E6A64EBF82849B4B426A58061155D054@ALTPHYEMBEVSP30.RES.AD.JPL> There is a bug in the first example (or at least bug in the description of it) at: http://docs.python.org/tutorial/datastructures.html#functional-programming-tools The prose introducing the example reads: "For example, to compute primes up to 25:" And then the actual example shows output: "[5, 7, 11, 13, 17, 19, 23]" The actual list of prime numbers less than 25 should include both 2 and 3: "[2, 3, 5, 7, 11, 13, 17, 19, 23]" The filter f(x) in the example actually tests for multiples of 2 or 3, it does not test for compositeness. I think the example of filter functions would be demonstrated adequately with a simpler filter def f(x): return x % 2 == 0 filter(f, range(1,10)) With the corresponding description For example, to find the even number up to 10: -------------- next part -------------- An HTML attachment was scrubbed... URL: From whitelynx at gmail.com Thu Mar 3 07:38:23 2011 From: whitelynx at gmail.com (David Bronke) Date: Thu, 3 Mar 2011 00:38:23 -0600 Subject: [docs] Documentation bug in 25.2.3.5. Option Flags and Directives Message-ID: In section 25.2.3.5, "Option Flags and Directives" at http://docs.python.org/dev/library/doctest.html, the code examples for doctest directives don't actually show the directives themselves; they seem to be hidden. -------------- next part -------------- An HTML attachment was scrubbed... URL: From reveley at gmail.com Fri Mar 4 09:48:01 2011 From: reveley at gmail.com (Colin Reveley) Date: Fri, 4 Mar 2011 08:48:01 +0000 Subject: [docs] chaos In-Reply-To: References: Message-ID: Thanks Sandro. it seems good to me. it would be nice to be able to exaplain that although a properly functioning computer is always trustworthy, there are two kinds of behavior "against common sense" in this case: a) just nonlinear chaos in a map, or system of nonlinear equations and b) numerical integration error. b) sort of is "untrustworthy", although the computer is always correct in its computations strictly. It's something we watch for carefully. that's somehow different to chaos, which would yield the same answer (to whatever precision) if the equation set had an analytic solution. but I don't see how all that can be discussed in documentation for a turtle graphics package! so it seems fine to me. thanks. Colin On 3 March 2011 23:14, Sandro Tosi wrote: > Hello Colin, > thanks for your email. > > On Thu, Jan 13, 2011 at 17:19, Colin Reveley wrote: > > here: > > > > http://docs.python.org/library/turtle.html#demo-scripts > > > > you say that chaotic behavior "proves that you cannot trust a computer's > > computations" > > > > well, the opposite is the case. it proves you can trust computations > > absolutely. the computations are deterministic. they are correct. that's > how > > the lorenz attractor was discovered. > > > > you do need to know what a computer does (and to what) when it computes, > and > > what it doesn't, and how to interpret it. > > > > it's misleading to say that computation is untrustworthy. computation is > a > > particular thing, that's all. > > > > it might seem pedantic but I think it's a much more interesting and > > important thing for a student to think about than "untrustworthy". > > > > which is just false anyway. as you know I'm sure. I'm not trying to be > > patronising. > > In http://bugs.python.org/issue11392 I tried to rephrase the > description, feel free to contribute on the issue for additional > adjustment. > > 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 markjballard at googlemail.com Sat Mar 5 18:15:14 2011 From: markjballard at googlemail.com (Mark Ballard) Date: Sat, 5 Mar 2011 17:15:14 +0000 Subject: [docs] Possible bug in Python documentation Message-ID: Hello I'm having a lot of fun reading your excellent Python documentation. I have found a discrepancy that may be attributable to my ignorance, but is possibly an error, in the section of the documentation dealing with Objects, Values and Types: http://docs.python.org/reference/datamodel.html#index-820 The documentation says: "An object?s identity never changes once it has been created" While using the interpreter to illustrate the points in the documentation, it appeared to me that an object's identity does change with its value. This, for example, is copied from my interpreter and appears to show that the id of the object a does change when I change its value: >>> a=20 >>> id(a) 137972908 >>> a=22 >>> id(a) 137972884 I hope this is of some help. Best regards Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From santoso.wijaya at gmail.com Sun Mar 6 00:51:39 2011 From: santoso.wijaya at gmail.com (Santoso Wijaya) Date: Sat, 5 Mar 2011 15:51:39 -0800 Subject: [docs] Possible bug in Python documentation In-Reply-To: References: Message-ID: You are confusing "names" (variables) and "objects". In the first, `a=20`, the "name" `a` is bound to the "object" `20`. In the second, `a=22`, the "name" `a` is re-bound to another "object", `22`. Regardless, the "identity" of either "objects"--`20` and `22`--never changes. ~/santa On Sat, Mar 5, 2011 at 9:15 AM, Mark Ballard wrote: > Hello > > I'm having a lot of fun reading your excellent Python documentation. > > I have found a discrepancy that may be attributable to my ignorance, but is > possibly an error, in the section of the documentation dealing with Objects, > Values and Types: > > http://docs.python.org/reference/datamodel.html#index-820 > > The documentation says: > > "An object?s identity never changes once it has been created" > > While using the interpreter to illustrate the points in the documentation, > it appeared to me that an object's identity does change with its value. > > This, for example, is copied from my interpreter and appears to show that > the id of the object a does change when I change its value: > > >>> a=20 > > >>> id(a) > 137972908 > > >>> a=22 > > >>> id(a) > 137972884 > > I hope this is of some help. > > Best regards > > Mark. > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Mar 6 10:49:04 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:49:04 +0000 Subject: [docs] [issue11400] Remove reference to pre 1.5 assignment behavior In-Reply-To: <1299271491.28.0.280932939056.issue11400@psf.upfronthosting.co.za> Message-ID: <1299404944.14.0.506622678196.issue11400@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in f7e04a9566c4. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 10:52:00 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:52:00 +0000 Subject: [docs] [issue11337] Nothing refers to footnote [1] on page "6. Simple Statements" in Language Reference In-Reply-To: <1298745459.54.0.732710965592.issue11337@psf.upfronthosting.co.za> Message-ID: <1299405120.88.0.939169735541.issue11337@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in 949a099a87ca. The detection of unused footnotes would be a docutils thing, not a Sphinx thing. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 10:52:49 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:52:49 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1299405169.46.0.0288224003241.issue11338@psf.upfronthosting.co.za> Georg Brandl added the comment: Does this need any more action? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 10:54:07 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:54:07 +0000 Subject: [docs] [issue11392] Turtle - better explain 'chaos' demo In-Reply-To: <1299194002.65.0.446288192224.issue11392@psf.upfronthosting.co.za> Message-ID: <1299405246.93.0.863158631462.issue11392@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in e6d9a8e38cc8. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 10:56:28 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:56:28 +0000 Subject: [docs] [issue11405] Wrong reference to string module in tutorial/inputoutput.rst In-Reply-To: <1299303851.53.0.103129334097.issue11405@psf.upfronthosting.co.za> Message-ID: <1299405388.11.0.208977017032.issue11405@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in 59e464a1bbf0. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 10:59:29 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 09:59:29 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299405569.15.0.064330562464.issue11373@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed the built-in spelling in 13bc0511b3d3. I did not do the other change; having two-level relative clauses is not really readable. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:05:11 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 10:05:11 +0000 Subject: [docs] [issue11227] [DOC] asyncore - use 'Host' header in HTTP example In-Reply-To: <1297898789.12.0.318094407747.issue11227@psf.upfronthosting.co.za> Message-ID: <1299405911.07.0.979163612274.issue11227@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in b630a135a86c. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:07:21 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 10:07:21 +0000 Subject: [docs] [issue11239] regexp-howto - add missing } to metachars In-Reply-To: <1297984111.53.0.588454087377.issue11239@psf.upfronthosting.co.za> Message-ID: <1299406041.04.0.7334088564.issue11239@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in 3ec0a764ab5c. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:08:43 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 10:08:43 +0000 Subject: [docs] [issue11292] Curses - add A_REVERSE to attributes table In-Reply-To: <1298406350.63.0.533877508283.issue11292@psf.upfronthosting.co.za> Message-ID: <1299406123.52.0.732803953685.issue11292@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in d9292abe80da. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:09:59 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 10:09:59 +0000 Subject: [docs] [issue11294] Locale - update & uniform ERA_*_FMT doc In-Reply-To: <1298413244.48.0.422350536879.issue11294@psf.upfronthosting.co.za> Message-ID: <1299406199.85.0.762630100721.issue11294@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in 6f861f98a3c5. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:12:26 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Mar 2011 10:12:26 +0000 Subject: [docs] [issue11239] regexp-howto - add missing } to metachars In-Reply-To: <1297984111.53.0.588454087377.issue11239@psf.upfronthosting.co.za> Message-ID: <1299406346.11.0.0586495083749.issue11239@psf.upfronthosting.co.za> Ezio Melotti added the comment: Actually '}' is not a metachar, the metachars should be only "|()[{.+*?^$\". >>> re.match('^a+(}+)b+$', 'aaaa}}}}}bbb') <_sre.SRE_Match object at 0xb77aa860> >>> re.match('^a+(}+)b+$', 'aaaa}}}}}bbb').group(1) '}}}}}' ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 11:13:30 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Mar 2011 10:13:30 +0000 Subject: [docs] [issue11239] regexp-howto - add missing } to metachars In-Reply-To: <1297984111.53.0.588454087377.issue11239@psf.upfronthosting.co.za> Message-ID: <1299406410.43.0.986310603884.issue11239@psf.upfronthosting.co.za> Georg Brandl added the comment: Since ] was in the list, I've added } as well. (It's never a bad idea to quote ] and } unconditionally.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 17:24:43 2011 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Mar 2011 16:24:43 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1299428683.26.0.421683332829.issue11385@psf.upfronthosting.co.za> anatoly techtonik added the comment: Something to think about for future examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 17:26:37 2011 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Mar 2011 16:26:37 +0000 Subject: [docs] [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1299428797.57.0.0217229200271.issue11389@psf.upfronthosting.co.za> anatoly techtonik added the comment: I need to execute doctests along with unit tests from test suite contained in tests.py file and control verbosity parameter in case something goes wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 17:44:48 2011 From: report at bugs.python.org (Michael Foord) Date: Sun, 06 Mar 2011 16:44:48 +0000 Subject: [docs] [issue11389] unittest: no way to control verbosity of doctests from cmd In-Reply-To: <1299182245.29.0.387603597674.issue11389@psf.upfronthosting.co.za> Message-ID: <1299429887.93.0.97086707765.issue11389@psf.upfronthosting.co.za> Michael Foord added the comment: Anatoly, does the verbosity parameter work for you? If not then any feature request / change needs to be for the DocFileSuite as the information is coming from there rather than unittest itself. ---------- assignee: docs at python -> versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 19:38:00 2011 From: report at bugs.python.org (blokeley) Date: Sun, 06 Mar 2011 18:38:00 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1299436680.89.0.175208541482.issue11338@psf.upfronthosting.co.za> blokeley added the comment: Closed because the issue is solved by: 1. The devguide http://docs.python.org/devguide/ has a "Browse online" link that points to the correct repositories at http://hg.python.org/ 2. Any attempt to access http://code.python.org/ redirects the user to the correct repositories above. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 6 19:51:07 2011 From: report at bugs.python.org (blokeley) Date: Sun, 06 Mar 2011 18:51:07 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299437467.55.0.438944352639.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Is this wording correct? """ In order to be compatible with test discovery, all of the test modules must be importable from the top level directory of the project (in other words, they must be part of the project :ref:`package ` or directly importable :ref:`modules `, and their names must be valid :ref:`identifiers `). """ If this wording is acceptable, I can provide patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 00:28:34 2011 From: report at bugs.python.org (INADA Naoki) Date: Sun, 06 Mar 2011 23:28:34 +0000 Subject: [docs] [issue11418] Method's global scope is module containing function definition, not class. In-Reply-To: <1299454101.64.0.841920247259.issue11418@psf.upfronthosting.co.za> Message-ID: <1299454114.6.0.608111472988.issue11418@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 00:48:39 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Sun, 06 Mar 2011 23:48:39 +0000 Subject: [docs] [issue11418] Method's global scope is module containing function definition, not class. In-Reply-To: <1299454101.64.0.841920247259.issue11418@psf.upfronthosting.co.za> Message-ID: <1299455319.62.0.955975691604.issue11418@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- nosy: +santa4nt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 06:44:54 2011 From: report at bugs.python.org (INADA Naoki) Date: Mon, 07 Mar 2011 05:44:54 +0000 Subject: [docs] [issue11425] Cleanup sample codes in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> New submission from INADA Naoki : * Insert spaces around operators and after commas. * Split one liner blocks (ex. def foo(x, y): return x + y) to multi-line blocks. * Insert empty line after def block for scripts (not interactive mode). * Use new-style raise (s/ralse KeyboardInterrupt/raise KeyboardInterrupt()/) * Use x ** 3 instead of x * x * x. Attached patch is for Python 2.6. I'll make same changes for Python 3.1 if this patch is accepted. ---------- assignee: docs at python components: Documentation files: cleanup_tutorial_codes.patch keywords: patch messages: 130225 nosy: docs at python, naoki priority: normal severity: normal status: open title: Cleanup sample codes in tutorial. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file21027/cleanup_tutorial_codes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 07:16:27 2011 From: report at bugs.python.org (INADA Naoki) Date: Mon, 07 Mar 2011 06:16:27 +0000 Subject: [docs] [issue11425] Cleanup sample codes in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1299478587.76.0.789078975485.issue11425@psf.upfronthosting.co.za> INADA Naoki added the comment: This patch inserts spaces around ** operator but I prefer no spaces around **. Any thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 07:19:32 2011 From: report at bugs.python.org (Graham Wideman) Date: Mon, 07 Mar 2011 06:19:32 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> New submission from Graham Wideman : On the csv doc page (.../library/csv.html) most of the examples show creation of an anonymous file object within the csv.reader or csv.writer function, for example... spamWriter = csv.writer(open('eggs.csv', 'w'), delimiter=' ',.... This anonymity prevents later closing the file, which seems especially problematic for a writer. It also confuses users as to whether there's some sort of close function on a csv.reader or csv.writer object which should be called, or perhaps some other magic behind the scenes. I'm pretty sure that it's the doc that is incorrect here. This issue was raised pernthetically here http://bugs.python.org/issue7198#msg124678 by sjmachin, though mysteriously overlooked in his later suggested patch http://bugs.python.org/issue7198#msg126593 I suggest changing all examples to include the complete cycle of opening an explicit file, and later closing it. ---------- assignee: docs at python components: Documentation messages: 130228 nosy: docs at python, gwideman priority: normal severity: normal status: open title: CSV examples can't close their files type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 08:14:08 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 07 Mar 2011 07:14:08 +0000 Subject: [docs] [issue11425] Cleanup sample codes in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1299482047.96.0.491439902316.issue11425@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, but I think many of these changes should not be made. Sometime the tight spacing is used for visual grouping. The following look fine and should not be changed because adding spaces around the + or * operator makes the whole sentence harder to mentally parse correctly: sum(x*y for x,y in zip(xvec, yvec)) a, b = b, a+b Also, it is perfectly correct to use: raise StopIteration We use the parentheses when there is an argument: raise KeyError('key not found: {!r}'.format(k)) Sometimes one-liners are okay in the interactive mode for quick filter functions and whatnot. Spreading them out with '...' lines makes the example harder to follow and expands the set-up part of the example rather than the part being explained. It's perfectly valid to use x * x * x instead of x**3 in an example of how to use map. We want the example to be as simple as possible. Also, the interactive prompt examples should be left as-is. They communicate the free-form nature of experimentation at the prompt. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 08:33:27 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 07 Mar 2011 07:33:27 +0000 Subject: [docs] [issue11425] Cleanup sample codes in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1299483207.79.0.771226402886.issue11425@psf.upfronthosting.co.za> Georg Brandl added the comment: I made the c -> cls change in 88fe1ac48460. Some other fixes have already been made in py3k (like removing the duplicate index keyword), and for the others I completely agree with Raymond. ---------- nosy: +georg.brandl resolution: rejected -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 11:59:33 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 Mar 2011 10:59:33 +0000 Subject: [docs] [issue11425] Cleanup sample codes in tutorial. In-Reply-To: <1299476693.61.0.829631562481.issue11425@psf.upfronthosting.co.za> Message-ID: <1299495573.21.0.0999095544385.issue11425@psf.upfronthosting.co.za> ?ric Araujo added the comment: Just two notes: The operations like ?7205759403792794 * 10**30 / 2**56? in floatimport could use some parens; the patch removed a duplicate ?statement: for? entry. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 12:19:45 2011 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 07 Mar 2011 11:19:45 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299496785.19.0.335975267157.issue11426@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 18:31:31 2011 From: report at bugs.python.org (SilentGhost) Date: Mon, 07 Mar 2011 17:31:31 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> New submission from SilentGhost : With the conversion to mercurial source links in documentation should now point to hg.python.org Here is the patch. ---------- assignee: docs at python components: Documentation files: docs_sourcename.diff keywords: patch messages: 130268 nosy: SilentGhost, docs at python priority: normal severity: normal stage: patch review status: open title: Links to source code should now point to hg repo Added file: http://bugs.python.org/file21033/docs_sourcename.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 19:00:17 2011 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Mar 2011 18:00:17 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299520817.4.0.474676553193.issue11435@psf.upfronthosting.co.za> Ned Deily added the comment: Good point. However, making the change won't help the already generated versions of the 3.2 html doc, like those included with installers or any older URL references elsewhere to the svn source. Perhaps some URL rewrite rules should be added to the web server to redirect "source code" URLs from svn.python.org to hg.python.org style? ---------- nosy: +georg.brandl, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 19:05:46 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 07 Mar 2011 18:05:46 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299521146.39.0.769772203889.issue11435@psf.upfronthosting.co.za> Ezio Melotti added the comment: IIUC those svn links will keep working for some time, but if/when the svn repo and/or viewvc will be removed an URL rewrite rule should be fix the problem. The patch seems OK to me. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 19:06:24 2011 From: report at bugs.python.org (Michael Foord) Date: Mon, 07 Mar 2011 18:06:24 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299521184.55.0.853953742684.issue11298@psf.upfronthosting.co.za> Michael Foord added the comment: Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 19:11:40 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 Mar 2011 18:11:40 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299521500.09.0.160379483405.issue11298@psf.upfronthosting.co.za> ?ric Araujo added the comment: I find there are some redundancy and perfectible phrasing. Here?s my rewrite: In order to be compatible with test discovery, all of the test files must be :ref:`modules ` or :ref:`packages ` importable from the top-level directory of the project (this means that their filenames must be valid :ref:`identifiers `). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 19:30:22 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Mar 2011 18:30:22 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299522622.75.0.582787971406.issue11435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've put the redirection in place. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 20:52:31 2011 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Mar 2011 19:52:31 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299527550.94.0.854121704742.issue11435@psf.upfronthosting.co.za> Ned Deily added the comment: Antoine, great! How about also for the other "active" branches now in hg: release{32,31,27,26,25-maint} ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 21:06:15 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Mar 2011 20:06:15 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299527550.94.0.854121704742.issue11435@psf.upfronthosting.co.za> Message-ID: <1299528372.3770.92.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, great! How about also for the other "active" branches now in hg: > release{32,31,27,26,25-maint} ? Is there any such reference in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 7 21:37:28 2011 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Mar 2011 20:37:28 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299530248.27.0.0969750015049.issue11435@psf.upfronthosting.co.za> Ned Deily added the comment: Right: no comprehensive links like in the 3.2+ versions. I just see a few miscellaneous links elsewhere in the source. But there are undoubtedly plenty of links elsewhere out in the wild. So this is probably out-of-scope for this issue but should be dealt with elsewhere as part of a long-term migration plan for svn.python.org. I'll bring it up on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 00:32:30 2011 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 07 Mar 2011 23:32:30 +0000 Subject: [docs] [issue5901] missing meta-info in documentation pdf In-Reply-To: <1241246578.79.0.771794251259.issue5901@psf.upfronthosting.co.za> Message-ID: <1299540750.82.0.909533825826.issue5901@psf.upfronthosting.co.za> Sandro Tosi added the comment: AFAIK, this is obtained using \pdfinfo{} command[1][2][3] [1] http://theoval.cmp.uea.ac.uk/~nlct/latex/pdfdoc/pdfdoc/pdfdoc.html [2] http://tex.stackexchange.com/questions/5958/is-hyperref-really-the-best-way-to-add-metadata-to-a-tex-file [3] http://www.tug.org/applications/hyperref/manual.html#x1-110003.7 Georg, do you think this is something that sphinx has to handle (in the latex builder) or somewhere else? ---------- nosy: +sandro.tosi versions: +Python 3.3 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 02:16:14 2011 From: report at bugs.python.org (SilentGhost) Date: Tue, 08 Mar 2011 01:16:14 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299546974.82.0.46974268235.issue11435@psf.upfronthosting.co.za> SilentGhost added the comment: > I've put the redirection in place. So, it's not possible to access http://svn.python.org/view/python/branches/py3k/ at all now? ---------- _______________________________________ Python tracker _______________________________________ From Ingwer.Wurzel at gmx.de Sun Mar 6 19:25:08 2011 From: Ingwer.Wurzel at gmx.de (Ingwer) Date: Sun, 06 Mar 2011 19:25:08 +0100 Subject: [docs] Extending and Embedding the Python Interpreter Message-ID: <1299435908.4697.19.camel@Speranza> Hi Python-Team, fist I appologize for my weak english skills. At the moment I'm trying to make my own Extending Module for Python, which works with Python/C API. (Systeminfo: Python3.1, Ubuntu 9.04, gcc 4.3.3) For a start I read the Python Docu: Extending and Embedding the Python Interpreter (http://docs.python.org/py3k/extending/index.html) and try to copy the example "spam". But I have some problem with the Point: 1.4. The Module?s Method Table and Initialization Function. If I'm trying to compile spam.c (sourcecode see attachment), I get an error in the function main(). Here the command and result: ---------------------------------------------------------------------------- ~/src/Spam$ g++ -c -fPIC -DPIC -I/usr/local/include/python3.1 -L/usr/local/lib/python3.1 -lpython3.1 spam.c spam.c: In function ?int main(int, char**)?: spam.c:63: Fehler: ?char*? kann nicht nach ?wchar_t*? f?r Argument ?1? nach ?void Py_SetProgramName(wchar_t*)? umgewandelt werden ---------------------------------------------------------------------------- The translation (my own): spam.c:63: Error: cant' convert ?char*? to ?wchar_t*? for the argument ?1? to ?void Py_SetProgramName(wchar_t*)?. Is it a bug in the Docu-Code, or do I make some mistakes? I'm grateful for any help. With best regards /Ingwer -------------- next part -------------- A non-text attachment was scrubbed... Name: spam.c Type: text/x-csrc Size: 1787 bytes Desc: not available URL: From d.orton5963 at gmail.com Mon Mar 7 03:18:32 2011 From: d.orton5963 at gmail.com (Dan Orton) Date: Mon, 7 Mar 2011 11:18:32 +0900 Subject: [docs] documentation error/bug 7.1. Fancier Output Formatting Message-ID: hello, I think I may have found a bug in the documentation under 7.1. Fancier Output Formatting as I am a beginner, I really do not have many ideas on how to fix it. also as this is a simpleton error, there may already be discussion on a fix. *1)* You will see the following code. >>> import math>>> print 'The value of PI is approximately {}.'.format(math.pi)The value of PI is approximately 3.14159265359.>>> print 'The value of PI is approximately {!r}.'.format(math.pi)The value of PI is approximately 3.141592653589793. *2) * When entered into Python, it complains Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import math >>> print 'The value of PI is approximately {}.'.format(math.pi) Traceback (most recent call last): File "", line 1, in ValueError: zero length field name in format >>> print 'The value of PI is approximately {!r}.'.format(math.pi) Traceback (most recent call last): File "", line 1, in ValueError: zero length field name in format >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From victorywin5 at yahoo.com Mon Mar 7 03:19:57 2011 From: victorywin5 at yahoo.com (Victor Paraschiv) Date: Sun, 6 Mar 2011 18:19:57 -0800 (PST) Subject: [docs] bug about syntax of "if-else" statement in the IDLE shell Message-ID: <285600.91091.qm@web43515.mail.sp1.yahoo.com> Hello, Several days ago I downloaded Python 3.2, the standard windows installer, for windows vista. Here's the bug: in the Python-command line, the following works: " >>>if 2==2:print('yes') ?. . . else:print('n') ?. . . yes " Now, in the Python shell (IDLE-python gui, the standard one included with the installer of python), the only way it works is: >>> if 2==2:print('yes') else:print('n') yes So, it requires me to put "else" unindented. On the other hand, if the "if--else" statement is included in the definition of a function, then it requires that "else" be exactly under "if". This was frustrating, when trying to learn "if-else" statement, because it took me half an hour of experimenting, before I figurred out. Shouldn't it be consistent? Could you please reply me with an explanation, in case I am wrong? Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: From natalja.dyck at gmx.de Mon Mar 7 11:37:07 2011 From: natalja.dyck at gmx.de (natta) Date: Mon, 07 Mar 2011 11:37:07 +0100 Subject: [docs] Extending and Embedding the Python Interpreter - solved Message-ID: <1299494227.4647.5.camel@Speranza> Hi Python-Team, my problem with main() function is solved. I convert char* to wchar_t* (Py_SetProgramName((wchar_t*)argv[0]); ) and now it works. thanks anyway. With best regards /Ingwer From ulrik.sverdrup at gmail.com Mon Mar 7 23:21:06 2011 From: ulrik.sverdrup at gmail.com (Ulrik Sverdrup) Date: Mon, 7 Mar 2011 23:21:06 +0100 Subject: [docs] Please provide Python 2.5.5 documentation Message-ID: Hi, My Python2.5 installation (among the various versions installed) provides this link for documentation: FILE /usr/lib/python2.5/socket.py MODULE DOCS http://www.python.org/doc/2.5.5/lib/module-socket.html The above link is not active, there is no documentation for 2.5.5. Please understand that I'm looking for the documentation for 2.5. I also know that 2.5.4 docs are available and I will go there to read them now, but isn't it nice if the URLs in the latest version of 2.5 work? Mvh Ulrik From report at bugs.python.org Tue Mar 8 11:00:01 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:00:01 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578401.65.0.588001636141.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Removed file: http://bugs.python.org/file20863/py3k_rev9921_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 11:00:08 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:00:08 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578408.21.0.351730867584.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Removed file: http://bugs.python.org/file20865/py2.7-maint_rev45852_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 11:00:13 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:00:13 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578413.65.0.332438853249.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Removed file: http://bugs.python.org/file20866/py3.2-maint_rev9895_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 11:01:34 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:01:34 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578494.29.0.283520051663.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Patch for py3k (default branch). ---------- Added file: http://bugs.python.org/file21042/issue11298_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 11:02:14 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:02:14 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578534.78.0.0396754763263.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Patch for 2.7 branch. ---------- Added file: http://bugs.python.org/file21043/issue11298_py2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 11:03:53 2011 From: report at bugs.python.org (blokeley) Date: Tue, 08 Mar 2011 10:03:53 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299578633.41.0.209633399731.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Patch for 3.2 branch. This is the first time I've submitted patches so I hope the format is OK. If I could have submitted 1 patch to apply to 2.7, 3.2 and py3k at the same time let me know. Hope this helps. ---------- Added file: http://bugs.python.org/file21044/issue11298_py3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 12:28:32 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Mar 2011 11:28:32 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299583712.93.0.251271551788.issue11298@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 15:18:33 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Mar 2011 14:18:33 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: Ezio Melotti added the comment: #11298: Improve the unittest discovery explanation. http://hg.python.org/cpython/rev/bbf8a8a1af17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 15:51:05 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Mar 2011 14:51:05 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: Ezio Melotti added the comment: #11298: merge from 3.2. http://hg.python.org/cpython/rev/fa23f323d747 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 16:10:15 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Mar 2011 15:10:15 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: Ezio Melotti added the comment: #11298: Improve the unittest discovery explanation. http://hg.python.org/cpython/rev/88b5a93b1725 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 16:13:13 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Mar 2011 15:13:13 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1299597193.54.0.877474209583.issue11298@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed on 2.7, 3.2 and py3k, thanks for the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 21:46:58 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 08 Mar 2011 20:46:58 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1299617218.86.0.481068984048.issue10617@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi ?ric, after #11085, I think the part of the doc you're referring to has been moved to collections.abc.rst, is that correct? If so, can you please explain what you'd like to see? all those ":class:`Container`" converted into ".. class:: Container" in the table? That will help me provide a patch :) ---------- nosy: +sandro.tosi versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 22:22:06 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 08 Mar 2011 21:22:06 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1299619326.66.0.214142746113.issue11009@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- nosy: +sandro.tosi versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 8 22:45:37 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Mar 2011 21:45:37 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299620737.69.0.613584295585.issue11435@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > So, it's not possible to access http://svn.python.org/view/python > /branches/py3k/ at all now? Hmm, apparently no. Is it important? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 00:12:29 2011 From: report at bugs.python.org (Terrence Cole) Date: Tue, 08 Mar 2011 23:12:29 +0000 Subject: [docs] [issue11446] Incorrect PEP link in Language Reference section 7.7 In-Reply-To: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> Message-ID: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> New submission from Terrence Cole : At the bottom of section 7.7 Class Definitions in the Python Language Reference: http://docs.python.org/py3k/reference/compound_stmts.html#class-definitions The text is: See also: PEP 3116 - Metaclasses in Python 3 PEP 3129 - Class Decorators This appears to be a typo. PEP 3116 is "New I/O", not "Metaclasses in Python3000" -- the correct PEP number is 3115. ---------- assignee: docs at python components: Documentation messages: 130385 nosy: docs at python, terrence priority: normal severity: normal status: open title: Incorrect PEP link in Language Reference section 7.7 type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:08:49 2011 From: report at bugs.python.org (Ryan Kelly) Date: Wed, 09 Mar 2011 02:08:49 +0000 Subject: [docs] [issue11448] docs for HTTPConnection.set_tunnel are ambiguous In-Reply-To: <1299636529.48.0.302129596868.issue11448@psf.upfronthosting.co.za> Message-ID: <1299636529.48.0.302129596868.issue11448@psf.upfronthosting.co.za> New submission from Ryan Kelly : The docs for HTTPConnection.set_tunnel(host,port) are ambiguous. They simply say "Set the host and the port for HTTP Connect Tunnelling". But should I specify the address of the server *through* which I want to tunnel, or the address of the *endpoint* of the tunnel? Turns out it's the latter, but I just wasted an hour "debugging" thinking it was the former :-( Attached is a simple doc patch to try to clarify this issue. ---------- assignee: docs at python components: Documentation files: set_tunnel_doc.diff keywords: patch messages: 130396 nosy: docs at python, rfk priority: normal severity: normal status: open title: docs for HTTPConnection.set_tunnel are ambiguous versions: Python 3.3 Added file: http://bugs.python.org/file21056/set_tunnel_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:10:52 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Mar 2011 02:10:52 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1299636652.84.0.922359003423.issue10617@psf.upfronthosting.co.za> ?ric Araujo added the comment: Doc moved: correct. Changing roles to directives: yes, that?s what I meant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:13:19 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:13:19 +0000 Subject: [docs] [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> Message-ID: <1299636799.21.0.596973719265.issue9307@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:26:10 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:26:10 +0000 Subject: [docs] [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1299637570.01.0.255972266591.issue5784@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:38:24 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:38:24 +0000 Subject: [docs] [issue7798] Make generally useful pydoc functions public In-Reply-To: <1264692401.66.0.0955816094505.issue7798@psf.upfronthosting.co.za> Message-ID: <1299638304.2.0.761764097359.issue7798@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have looked at the pydoc module. Everything except help() is intended to be private. The author says within the file that __all__, when present, defines public interface and uses that definition within help() to decide what to display. So I do not think anything else should be documented unless it is made 'public' by being added to pydoc.__all__ or moved to another module. In either case, the result would be a new code feature. Doc addition would naturally follow. Also, if a function is made public, the interface and code could be reconsidered for possible modification for general usage. ---------- assignee: -> docs at python components: +Library (Lib) nosy: +docs at python title: document pydoc methods -> Make generally useful pydoc functions public versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:39:38 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:39:38 +0000 Subject: [docs] [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1299638378.08.0.314699853463.issue8722@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:39:54 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 09 Mar 2011 02:39:54 +0000 Subject: [docs] [issue11448] docs for HTTPConnection.set_tunnel are ambiguous In-Reply-To: <1299636529.48.0.302129596868.issue11448@psf.upfronthosting.co.za> Message-ID: <1299638394.71.0.651026189021.issue11448@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I am not able to understand what you mean by 'endpoint'. Actually, when using tunnels people understand that they often 'tunnel through' the proxy server and here is an example code from the tests which is going to use the set_tunnel method. ph = urllib.request.ProxyHandler(dict(https="proxy.example.com:3128")) o.add_handler(ph) It is the proxy server and port. (Is 3128 called the endpoint of proxy?) Could you please provide some more information on your interpretation and the behavior you observed? ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:42:34 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:42:34 +0000 Subject: [docs] [issue1554133] PyOS_InputHook() and related API funcs. not documented Message-ID: <1299638553.96.0.709900524521.issue1554133@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A.B, I believe you have looked at other areas of missing C-API docs. What do you think of this one? Is it still missing? ---------- nosy: +belopolsky, terry.reedy versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:55:51 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:55:51 +0000 Subject: [docs] [issue3565] array documentation, method names not 3.x-compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1299639351.7.0.245780555137.issue3565@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.2, a change *was* committed (by who?) but not recorded here: .from/.tostring were renamed .from/.tobytes and kept as deprecated aliases. Is there anything more to this issue other than removing the deprecated aliases in 3.3 (which could be done now if that was the intention or 3.4 in not)? Is there still any idea/intention of renaming .from/.tounicode to .from/.tostring? That would have to be done at least one version with the 'string' names absent, and would have little gain as 'unicode' is clear. ---------- components: +Library (Lib) -Interpreter Core nosy: +terry.reedy versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:57:09 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:57:09 +0000 Subject: [docs] [issue9254] __import__ docstring should recommend importlib.import_module() In-Reply-To: <1279057769.02.0.398615806235.issue9254@psf.upfronthosting.co.za> Message-ID: <1299639429.53.0.754875691428.issue9254@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 03:58:11 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 02:58:11 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1299639491.88.0.127837882434.issue4966@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 04:00:19 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 03:00:19 +0000 Subject: [docs] [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1299639619.66.0.525447700588.issue10175@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 04:41:33 2011 From: report at bugs.python.org (Ryan Kelly) Date: Wed, 09 Mar 2011 03:41:33 +0000 Subject: [docs] [issue11448] docs for HTTPConnection.set_tunnel are ambiguous In-Reply-To: <1299636529.48.0.302129596868.issue11448@psf.upfronthosting.co.za> Message-ID: <1299642093.48.0.578050525987.issue11448@psf.upfronthosting.co.za> Ryan Kelly added the comment: Sorry, "endpoint" is just a noun that seemed to fit for me, I've no idea if there is a standard term for this. Perhaps "origin server" if you follow the terminology from the RFC? By way of example, suppose I'm running a proxy on localhost:3128 and I want to tunnel through it to connect to www.example.com:443. >From the train of thought that "I need to tunnel through localhost:3128 to connect to www.example.com:443" my instinct was to write code like this: c = HTTPSConnection("www.example.com",443) c.set_tunnel("localhost",3128) c.send('...etc...') This doesn't work; it tries to tunnel through www.example.com to get to localhost. The correct way around is: c = HTTPSConnection("localhost",3128) c.set_tunnel("www.example.com",443) c.send('...etc...') Another way to put it: the arguments to set_tunnel are the host/port to tunnel *to*, not the host/port to tunnel *through*. I was only able to work this out by looking through to code for urllib2. It's not clear from the docs. Then again, sounds like my doc patch didn't make things any clearer :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 05:01:09 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 04:01:09 +0000 Subject: [docs] [issue4819] Misc/cheatsheet needs updating In-Reply-To: <1230988594.32.0.497089911482.issue4819@psf.upfronthosting.co.za> Message-ID: <1299643269.07.0.0452686036324.issue4819@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 05:12:23 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 04:12:23 +0000 Subject: [docs] [issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python In-Reply-To: <1265490255.73.0.743157337936.issue7867@psf.upfronthosting.co.za> Message-ID: <1299643943.21.0.213913594466.issue7867@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 10:36:39 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 Mar 2011 09:36:39 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299663399.48.0.987380449172.issue11435@psf.upfronthosting.co.za> Ezio Melotti added the comment: The svn repos and viewvc won't disappear soon because they are used for other things (e.g. the tracker). I think it's better to avoid redirects until svn and/or viewvc are definitely gone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 11:38:47 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Mar 2011 10:38:47 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299663399.48.0.987380449172.issue11435@psf.upfronthosting.co.za> Message-ID: <1299667124.3749.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > The svn repos and viewvc won't disappear soon because they are used > for other things (e.g. the tracker). I think it's better to avoid > redirects until svn and/or viewvc are definitely gone. The redirect is only for the py3k branch, something nobody should use anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 14:56:07 2011 From: report at bugs.python.org (SilentGhost) Date: Wed, 09 Mar 2011 13:56:07 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299678967.7.0.664400684763.issue11435@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 20:08:56 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 09 Mar 2011 19:08:56 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1299697736.79.0.189313196446.issue10617@psf.upfronthosting.co.za> Sandro Tosi added the comment: but that will generate "class collections.abc.Container" as text in the first column of the table: do you really like it? I don't :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 22:20:55 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Mar 2011 21:20:55 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1299705655.67.0.877864725985.issue10617@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t either. The one thing I?d like is that :class:`collections.Set` generates a link to the table which documents the ABCs. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 22:23:23 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 Mar 2011 21:23:23 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1299705803.67.0.467765135817.issue10617@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 23:28:02 2011 From: report at bugs.python.org (Tony Wallace) Date: Wed, 09 Mar 2011 22:28:02 +0000 Subject: [docs] [issue11456] Documentation csv RFC4180 In-Reply-To: <1299709682.27.0.368718810764.issue11456@psf.upfronthosting.co.za> Message-ID: <1299709682.27.0.368718810764.issue11456@psf.upfronthosting.co.za> New submission from Tony Wallace : Change to documentation preamble for csv module: From: There is no ?CSV standard?, so the format is operationally defined by the many applications which read and write it. The lack of a standard means that subtle differences often exist in the data produced and consumed by different applications. To: CSV has been used for many years prior to attempts to standardise it in RFC4180. This has resulted in subtle differences often exist in the data produced and consumed by different applications. ---------- assignee: docs at python components: Documentation messages: 130469 nosy: docs at python, tonywallace priority: normal severity: normal status: open title: Documentation csv RFC4180 type: feature request versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 9 23:31:11 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Mar 2011 22:31:11 +0000 Subject: [docs] [issue11456] Documentation csv RFC4180 In-Reply-To: <1299709682.27.0.368718810764.issue11456@psf.upfronthosting.co.za> Message-ID: <1299709871.34.0.130765962874.issue11456@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. I?ve added Skip, at his request on the CSV list. ---------- assignee: docs at python -> skip.montanaro keywords: +patch nosy: +eric.araujo, skip.montanaro stage: -> patch review versions: -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 10 00:02:19 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Mar 2011 23:02:19 +0000 Subject: [docs] [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1299711739.47.0.107145640129.issue3722@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Temporary output will break all doctests, not just those with exception traceback. One should fix, disable debug output, and then rerun doctest to make sure fix did not break anything else. A function that prints and raises *can* be tested as by separately testing both output and silencing of expected exception as follows: >>> def test(): ... print("hello") ... raise IndexError() ... >>> try: ... test() ... raise BaseException() ... except IndexError: ... pass hello This passes but will not if function prints anything else or does anything other than raise that exception (or a subclass thereof). In practice, catching subclasses should be ok, but if not, the except clause can be expanded to ... except IndexError as msg: ... if type(msg) is not IndexError: ... raise BaseException I am only leaving this open for a possible doc addition showing something like the simpler fix above. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch Added file: http://bugs.python.org/file21065/doctest_solution.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 10 01:59:51 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Mar 2011 00:59:51 +0000 Subject: [docs] [issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python In-Reply-To: <1265490255.73.0.743157337936.issue7867@psf.upfronthosting.co.za> Message-ID: <1299718791.31.0.44069575567.issue7867@psf.upfronthosting.co.za> R. David Murray added the comment: This patch isn't going to be accepted, so I'm closing the issue. Someone else can propose a different wording in a new issue if they wish. ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 10 22:16:46 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 Mar 2011 21:16:46 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299791806.3.0.719896980251.issue11435@psf.upfronthosting.co.za> Ezio Melotti added the comment: This can be closed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 00:19:50 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 Mar 2011 23:19:50 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1299799190.17.0.823970062968.issue4966@psf.upfronthosting.co.za> Ezio Melotti added the comment: This is maybe out of the scope of this issue, but I would like to see all the basic data types on single page on their own. The current page[0] has some section about data types mixed with sections about operations, comparisons, and other things, followed by less-"used" types. The page also contains lot of informations and it's not easy to browse (42 screens on a 24" monitor). Ideally the structure should be something like: 1. True, False, None 2. int, float(, long, complex) 3. str, unicode, list, tuple(, bytearray, buffer, xrange) 4. dict 5. set(, frozenset) (where the types in () are considered less important -- so maybe described in detail later or in another page). The page can list common operations for each group and their methods, but leaving things like the string formatting operations to another page/section. [0]: http://docs.python.org/library/stdtypes.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 00:22:44 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Mar 2011 23:22:44 +0000 Subject: [docs] [issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module In-Reply-To: <1295898075.1.0.406467023745.issue10999@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4f9213d3858b by R David Murray in branch '3.1': #10999: Add missing documentation for chflags constants to stat module docs http://hg.python.org/cpython/rev/4f9213d3858b New changeset de5d0b4f81c3 by R David Murray in branch '3.2': Merge #10999 fix. http://hg.python.org/cpython/rev/de5d0b4f81c3 New changeset 761e6e85d29e by R David Murray in branch 'default': Merge #10999 fix. http://hg.python.org/cpython/rev/761e6e85d29e New changeset 515a81ca81ce by R David Murray in branch '2.7': #10999: Add missing documentation for chflags constants to stat module docs http://hg.python.org/cpython/rev/515a81ca81ce ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 00:26:41 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Mar 2011 23:26:41 +0000 Subject: [docs] [issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module In-Reply-To: <1295898075.1.0.406467023745.issue10999@psf.upfronthosting.co.za> Message-ID: <1299799601.21.0.0693454947934.issue10999@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 00:34:28 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Mar 2011 23:34:28 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1299800068.81.0.907575208501.issue4966@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have started learning .rst, so I hope to work on this in the not too distant future. Ezio -- I have also noticed that some chapters are too long to be easily scrolled around in (unittest is another), and either need an index at the top (like with built-in functions) or separate files (or both) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 00:57:34 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 10 Mar 2011 23:57:34 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1299801454.48.0.691166208202.issue4966@psf.upfronthosting.co.za> Ezio Melotti added the comment: The advantage of having one big page is that you can ctrl+f easily without having to go back and forth from different pages On the other hand, the page is not easy to browse (especially on small screens, mobile devices, old/slow pcs). In this case I don't think that splitting the page is a problem, because the page contains information about different and fairly unrelated thing. With pages like unittest or logging is not so easy to split because while working with them you might need to use several different functions/methods/classes and having their docs on two or more page will be annoying. (FWIW I've been working a lot on the unittest doc to make it more "compact" and easier to browse, but there's still work to do. We have also been considering to make a page for unittest "users" that explains how to write tests and use the assert methods and another for unittest "developers" that explains how to write test runners, suites and more advanced stuff.) BTW .rst is really easy, and if you are not sure about something just try to build the doc with "make html" and see if it complains and if the resulting page looks OK. Also see http://docs.python.org/documenting/index.html. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 01:26:58 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 00:26:58 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1299803218.63.0.927955563371.issue10665@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch contains non-ascii chars that should be avoided (they break `make pdf`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 08:27:37 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 11 Mar 2011 07:27:37 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299828457.42.0.350928969699.issue11426@psf.upfronthosting.co.za> Eli Bendersky added the comment: The attached patch tries to be true to the convention in other documentation pages, by using "with" in complete code samples (examples), but not using it in prompt (>>>) samples, where usage of "with" unnecessarily complicates interaction. ---------- keywords: +patch nosy: +ezio.melotti, georg.brandl, ncoghlan stage: -> patch review Added file: http://bugs.python.org/file21078/issue11426.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 10:25:24 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 11 Mar 2011 09:25:24 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1299835523.91.0.307201753773.issue11009@psf.upfronthosting.co.za> Senthil Kumaran added the comment: splituser is an internal API. It has never been exposed through Docs anytime and there are good reasons for that too. We never want internal helper functions (even tough they don't startwith _) be exposed through docs as it may clutter the API Documentation. If you find a good use for splituser like function, it would good to discuss and build upon current one before exposing. I am closing this as wontfix. ---------- assignee: docs at python -> orsenthil nosy: +orsenthil resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 10:53:18 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 11 Mar 2011 09:53:18 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1295987078.02.0.421774194417.issue11009@psf.upfronthosting.co.za> Message-ID: <1299837198.67.0.568132173375.issue11009@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi Senthil, what do you think about "documenting" those methods are private ones in the urllib code (if not using _, at least a short comment above them)? at least we have a mark it's an implementation decision and in case someone has the crazy idea :) to scan the module to fill in the missing methods in the doc, he'd know they are not to be exposed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 11:04:36 2011 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 11 Mar 2011 10:04:36 +0000 Subject: [docs] [issue11465] Set documentation: Link to wikipedia In-Reply-To: <1299837876.85.0.251184172401.issue11465@psf.upfronthosting.co.za> Message-ID: <1299837876.85.0.251184172401.issue11465@psf.upfronthosting.co.za> New submission from Thomas Guettler : A link from http://docs.python.org/library/stdtypes.html#set.union to http://en.wikipedia.org/wiki/Union_%28set_theory%29 would help young people to understand sets. Of course it is the same for intersection(), difference(), and symmetric_difference(). The images of the wikipedia article explain it very good. ---------- assignee: docs at python components: Documentation messages: 130555 nosy: docs at python, guettli priority: normal severity: normal status: open title: Set documentation: Link to wikipedia versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 11:07:38 2011 From: report at bugs.python.org (SilentGhost) Date: Fri, 11 Mar 2011 10:07:38 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299838058.84.0.593138400693.issue11435@psf.upfronthosting.co.za> SilentGhost added the comment: This issue is not about the redirects. It is about links in documentation. The redirect is great for the links in the wild, the online documentation, however, could and should use proper links without any redirects. Georg, or whoever is maintainer of Doc/tools/sphinxext/pyspecific.py, could you please have a look at the patch. ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 11:29:23 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 11 Mar 2011 10:29:23 +0000 Subject: [docs] [issue11465] Set documentation: Link to wikipedia In-Reply-To: <1299837876.85.0.251184172401.issue11465@psf.upfronthosting.co.za> Message-ID: <20110311102914.GB2374@kevin> Senthil Kumaran added the comment: Only for relatively uncommon concepts like "Moving Average" and some other cases used in collections module hyperlink to a general article helps. Set theory is a commonly understood concept and link to wikipedia article may not be required. It can be left to the user to find out more, if they want. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 11:55:18 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 11 Mar 2011 10:55:18 +0000 Subject: [docs] [issue11009] urllib.splituser is not documented In-Reply-To: <1299837198.67.0.568132173375.issue11009@psf.upfronthosting.co.za> Message-ID: <20110311105509.GC2374@kevin> Senthil Kumaran added the comment: Sandro, I don't think is a required. Those functions serve the purpose of making the module code modular. They are helper functions for the module and are not really useful outside of it, when used standalone. Think about , splituser, splitpath, splitport etc etc. I think, it is best that they remain as such, undocumented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 13:14:43 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 11 Mar 2011 12:14:43 +0000 Subject: [docs] [issue11373] Fix 2 new typos in the docs In-Reply-To: <1299069868.83.0.520444195077.issue11373@psf.upfronthosting.co.za> Message-ID: <1299845683.19.0.57258524272.issue11373@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Georg, please fix all the branches. Also, the online docs are still not updated with this fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 14:16:41 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 13:16:41 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 3c1e779002d3 by Ezio Melotti in branch '3.2': #11435: Update the links generated by the source directive to use hg.python.org. http://hg.python.org/cpython/rev/3c1e779002d3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 14:22:33 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 13:22:33 +0000 Subject: [docs] [issue11435] Links to source code should now point to hg repo In-Reply-To: <1299519091.7.0.295996410449.issue11435@psf.upfronthosting.co.za> Message-ID: <1299849753.26.0.616981215878.issue11435@psf.upfronthosting.co.za> Ezio Melotti added the comment: Now it's fixed in 3.2 and 3.3. Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 14:39:54 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 13:39:54 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299850793.98.0.977663820558.issue11426@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch looks good to me. The quotes are somewhat inconsistent (sometimes '' and sometimes ""), if you want you can "fix" them while you are at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 14:47:44 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 13:47:44 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f2a73d65422a by Eli Bendersky in branch 'default': Issue #11426: use 'with' statements on open files in CSV examples http://hg.python.org/cpython/rev/f2a73d65422a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 14:51:18 2011 From: report at bugs.python.org (SilentGhost) Date: Fri, 11 Mar 2011 13:51:18 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299851477.98.0.993313926409.issue11426@psf.upfronthosting.co.za> SilentGhost added the comment: Related issue #10461 ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 15:00:57 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 11 Mar 2011 14:00:57 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299852057.48.0.598447531917.issue11426@psf.upfronthosting.co.za> Eli Bendersky added the comment: SilentGhost: yep, thanks for the reminder :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 15:43:54 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 14:43:54 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4cb0a8f5c952 by Eli Bendersky in branch 'default': Issue #11426: use 'with' statements on open files in CSV examples http://hg.python.org/cpython/rev/4cb0a8f5c952 New changeset d54e9c4fcd43 by Eli Bendersky in branch '3.1': Issue #11426: use 'with' statements on open files in CSV examples http://hg.python.org/cpython/rev/d54e9c4fcd43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 16:53:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Mar 2011 15:53:25 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1299858805.05.0.539896966666.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Perhaps something should also be added to the doc style guide (along > with using 'attributes' instead of 'members'). Terry, could you open another report for that, or maybe just commit the change directly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 17:55:24 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 16:55:24 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c3d28c84a372 by ?ric Araujo in branch 'default': Use with statement where it improves the documentation (closes #10461) http://hg.python.org/cpython/rev/c3d28c84a372 ---------- nosy: +python-dev resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 18:26:40 2011 From: report at bugs.python.org (SilentGhost) Date: Fri, 11 Mar 2011 17:26:40 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1299864400.65.0.712731648356.issue10461@psf.upfronthosting.co.za> SilentGhost added the comment: ?ric, I'm not sure about the first atexit.rst hunk. I thought the purpose of that code was to except IOError when no file is found. I'm not entirely sure why in the simplest case infile.read() would raise IOError. I'd think that eli's patch (file19667) would suit better. ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 18:47:29 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 17:47:29 +0000 Subject: [docs] [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1299865649.08.0.840523897882.issue11090@psf.upfronthosting.co.za> Ezio Melotti added the comment: addCleanup/doCleanups/startTestRun/stopTestRun are in 3.1 too and now they are documented as new in 3.1. I also removed the versionchanged note for __iter__ (0f9e5042907c). Test discovery, --failfast, --catch, --buffer are new in 3.2 and not documented on 3.1. This seems to be fixed now so I'm closing it, if I missed something feel free to reopen it. ---------- assignee: michael.foord -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 19:15:42 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 18:15:42 +0000 Subject: [docs] [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> New submission from Ezio Melotti : The current example[0] uses assertTrue(element in self.seq) but it would be better to use assertIn instead. The whole example could be changed to something simpler that uses only the assertTrue/assertEqual/assertRaises methods correctly, e.g.: import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') def test_isupper(self): self.assertTrue('FOO'.isupper()) self.assertFalse('Foo'.isupper()) def test_split(self): s = 'hello world' self.assertEqual(s.split(), ['hello', 'world']) # check that s.split fails when the separator is not a string with self.assertRaises(TypeError): s.split(2) if __name__ == '__main__': unittest.main() [0]: http://docs.python.org/py3k/library/unittest.html#basic-example ---------- assignee: docs at python components: Documentation keywords: easy messages: 130598 nosy: docs at python, eric.araujo, ezio.melotti, michael.foord, ncoghlan, rhettinger priority: low severity: normal stage: needs patch status: open title: Improve unittest basic example in the doc type: feature request versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 19:51:20 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 18:51:20 +0000 Subject: [docs] [issue11446] Incorrect PEP link in Language Reference section 7.7 In-Reply-To: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset ed1f7b3f2ff3 by Ezio Melotti in branch '3.1': #11446: fix incorrect PEP link. http://hg.python.org/cpython/rev/ed1f7b3f2ff3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 19:54:02 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 18:54:02 +0000 Subject: [docs] [issue11446] Incorrect PEP link in Language Reference section 7.7 In-Reply-To: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset eeef2f17a774 by Ezio Melotti in branch '3.2': #11446: merge with 3.1. http://hg.python.org/cpython/rev/eeef2f17a774 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 19:57:35 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 11 Mar 2011 18:57:35 +0000 Subject: [docs] [issue11446] Incorrect PEP link in Language Reference section 7.7 In-Reply-To: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 14a2d276b9ab by Ezio Melotti in branch 'default': #11446: merge with 3.2. http://hg.python.org/cpython/rev/14a2d276b9ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 19:58:41 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 18:58:41 +0000 Subject: [docs] [issue11446] Incorrect PEP link in Language Reference section 7.7 In-Reply-To: <1299625949.4.0.356508747283.issue11446@psf.upfronthosting.co.za> Message-ID: <1299869921.37.0.250357101008.issue11446@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 22:44:30 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Mar 2011 21:44:30 +0000 Subject: [docs] [issue11418] Method's global scope is module containing function definition, not class. In-Reply-To: <1299454101.64.0.841920247259.issue11418@psf.upfronthosting.co.za> Message-ID: <1299879870.13.0.477494128668.issue11418@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m afraid I don?t understand ?Method's function?. Could you rephrase, or give a commented code example showing the bad behavior? ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 23:06:16 2011 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Mar 2011 22:06:16 +0000 Subject: [docs] [issue11418] Method's global scope is module containing function definition, not class. In-Reply-To: <1299454101.64.0.841920247259.issue11418@psf.upfronthosting.co.za> Message-ID: <1299881176.84.0.687230377893.issue11418@psf.upfronthosting.co.za> R. David Murray added the comment: If you do a "def foo" in module bar.py, and have a class FooFoo in bar.py, and do: FooFoo.myfoo = foo and foo refers to an unbound variable, that variable will be looked up in bar.py's global name space. If instead the 'def foo' is in a module parrot.py, and bar.py does: from parrot import foo FooFoo.myfoo = foo and foo contains an unbound variable, that variable will be looked up in *parrots* global name space. So, yes, this is a doc bug of a sort :) It would be technically correct to change it to "The global scope associated with a method is the module containing the method's function definition", but that is not suitable for the tutorial. In fact, the discussion of this quirk probably doesn't belong in the tutorial; unless, perhaps, in a footnote. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 11 23:26:50 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 11 Mar 2011 22:26:50 +0000 Subject: [docs] [issue10936] Simple CSS fix for left margin at docs.python.org In-Reply-To: <1295377924.0.0.902429691003.issue10936@psf.upfronthosting.co.za> Message-ID: <1299882409.89.0.764503593588.issue10936@psf.upfronthosting.co.za> Ezio Melotti added the comment: There's #4965 for that. Last time I tried there was some problem with it, maybe I'll try again in future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 00:43:39 2011 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Mar 2011 23:43:39 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1299887018.51.0.876593550716.issue10665@psf.upfronthosting.co.za> STINNER Victor added the comment: > The patch contains non-ascii chars that should be avoided (they break `make pdf`). What is the error? Can't you fix the PDF generator instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 03:49:06 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Mar 2011 02:49:06 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 06cca90ff105 by orsenthil in branch 'default': Fix issue11283 - Clarifying a re pattern in the re module docs for conditional regex http://hg.python.org/cpython/rev/06cca90ff105 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 04:44:23 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Mar 2011 03:44:23 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset d676601fee6f by Senthil Kumaran in branch '3.1': Fix issue11283 - Clarifying a re pattern in the re module docs for conditional regex http://hg.python.org/cpython/rev/d676601fee6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 04:46:47 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 12 Mar 2011 03:46:47 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <1299901607.33.0.530072585918.issue11283@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Okay, fixed in all relevant branches. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 15:56:30 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Mar 2011 14:56:30 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset cebaf1bdaf78 by ?ric Araujo in branch 'default': Fix example in atexit doc: Both open and read could raise the IOError (#10461 follow-up). http://hg.python.org/cpython/rev/cebaf1bdaf78 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 15:58:20 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 12 Mar 2011 14:58:20 +0000 Subject: [docs] [issue10461] Use with statement throughout the docs In-Reply-To: <1290182704.47.0.121540663424.issue10461@psf.upfronthosting.co.za> Message-ID: <1299941900.45.0.618986922948.issue10461@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the catch! I was so used to the idiom where opening the file doesn?t fail but you protect the read or write that I didn?t think about the issue here. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 15:59:52 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 12 Mar 2011 14:59:52 +0000 Subject: [docs] [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1299941992.37.0.931863168245.issue11468@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 17:52:32 2011 From: report at bugs.python.org (MATSUI Tetsushi) Date: Sat, 12 Mar 2011 16:52:32 +0000 Subject: [docs] [issue11475] trunc in documentation of numbers.Real should math.trunc In-Reply-To: <1299948752.38.0.816571509541.issue11475@psf.upfronthosting.co.za> Message-ID: <1299948752.38.0.816571509541.issue11475@psf.upfronthosting.co.za> New submission from MATSUI Tetsushi : In the documentation of numbers.Real: "In short, those are: a conversion to float, trunc(), round(), math.floor(), math.ceil(), divmod(), //, %, <, <=, >, and >=." where only "trunc" is not linked if we look at it in html pages. This is because the function trunc is not in built-in namespace, but in math module. So we should call it math.trunc similarly to math.floor, etc. ---------- assignee: docs at python components: Documentation messages: 130690 nosy: docs at python, mft priority: normal severity: normal status: open title: trunc in documentation of numbers.Real should math.trunc versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 18:12:48 2011 From: report at bugs.python.org (follower) Date: Sat, 12 Mar 2011 17:12:48 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> New submission from follower : The following change broke pre-existing code that used "strm" as the parameter name (as documented http://docs.python.org/release/2.6.6/library/logging.html#streamhandler): http://hg.python.org/cpython/diff/7391436d8a74/Lib/logging/__init__.py The parameter name was changed with no documentation note that it had changed in 2.7: http://docs.python.org/library/logging.html#stream-handler This breaks existing code with the error: TypeError: __init__() got an unexpected keyword argument 'strm' I encountered it in pyres but it broke Ubuntu bug reporting too: https://bugs.launchpad.net/ubuntu/+source/launchpad-integration/+bug/702455 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 130691 nosy: docs at python, follower priority: normal severity: normal status: open title: StreamHandler code broken by change of parameter name type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 19:05:23 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 12 Mar 2011 18:05:23 +0000 Subject: [docs] [issue11475] trunc in documentation of numbers.Real should math.trunc In-Reply-To: <1299948752.38.0.816571509541.issue11475@psf.upfronthosting.co.za> Message-ID: <1299953123.64.0.884536252124.issue11475@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 7fd06773c3c2 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 22:07:58 2011 From: report at bugs.python.org (Gediminas Liktaras) Date: Sat, 12 Mar 2011 21:07:58 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: <1299964078.79.0.95152201683.issue11329@psf.upfronthosting.co.za> Gediminas Liktaras added the comment: I have attached a patch that fixes this issue. Please let me know if there are any problems. ---------- keywords: +patch nosy: +gliktaras Added file: http://bugs.python.org/file21094/issue11329-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 23:26:17 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Mar 2011 22:26:17 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1299968777.28.0.654340574717.issue10665@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think Georg said that non-ascii chars shouldn't be used directly in the rst files, and one of the reasons is that they break `make pdf` (I haven't tried though). I added him to the nosy. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 23:33:30 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 12 Mar 2011 22:33:30 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299969210.9.0.0746658765586.issue11426@psf.upfronthosting.co.za> Ezio Melotti added the comment: This should be now fixed in 3.x, but not on 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 23:45:21 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 12 Mar 2011 22:45:21 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6d56d2c63a04 by Vinay Sajip in branch '2.7': Fixes issue #11476: StreamHandler parameter name change documented. http://hg.python.org/cpython/rev/6d56d2c63a04 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 12 23:46:55 2011 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 12 Mar 2011 22:46:55 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: <1299970015.64.0.459204581347.issue11476@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 00:14:42 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 12 Mar 2011 23:14:42 +0000 Subject: [docs] [issue11312] Confusing sentence in file.readline() doc In-Reply-To: <1298583708.57.0.612051612173.issue11312@psf.upfronthosting.co.za> Message-ID: <1299971682.53.0.30898761359.issue11312@psf.upfronthosting.co.za> Benjamin Peterson added the comment: c017695acf19 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 02:07:30 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Mar 2011 01:07:30 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1299978450.31.0.438023927167.issue11282@psf.upfronthosting.co.za> Ezio Melotti added the comment: Michael, what's the status of this? Do you think some of the removed methods should be added back even if they are marked as "removed in 3.3" in the 3.2 doc? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 03:44:48 2011 From: report at bugs.python.org (Thomas Wouters) Date: Sun, 13 Mar 2011 02:44:48 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToData function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> New submission from Thomas Wouters : The buffer docs on http://docs.python.org/c-api/buffer.html list PyObject_CopyToData, but no such function seems to exist. ---------- assignee: docs at python components: Documentation messages: 130717 nosy: docs at python, twouters priority: normal severity: normal status: open title: Docs list nonexistant PyObject_CopyToData function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 03:50:39 2011 From: report at bugs.python.org (Thomas Wouters) Date: Sun, 13 Mar 2011 02:50:39 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToData function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: <1299984639.69.0.715603062731.issue11478@psf.upfronthosting.co.za> Thomas Wouters added the comment: Eh, I mean PyObject_CopyToObject. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 03:51:05 2011 From: report at bugs.python.org (Thomas Wouters) Date: Sun, 13 Mar 2011 02:51:05 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToObject function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: <1299984665.61.0.687291510959.issue11478@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- title: Docs list nonexistant PyObject_CopyToData function -> Docs list nonexistant PyObject_CopyToObject function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 04:10:03 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Mar 2011 03:10:03 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> New submission from R. David Murray : Here is a proposed addition to the tutorial noting the problem with using raw strings for windows paths and how to work around it. ---------- assignee: docs at python components: Documentation files: tutorial-raw-string.patch keywords: patch messages: 130720 nosy: QuantumTim, docs at python, facundobatista, georg.brandl, gwideman, r.david.murray, v+python priority: normal severity: normal stage: patch review status: open title: Add discussion of trailing slash in raw string to tutorial type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file21097/tutorial-raw-string.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 07:45:11 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 06:45:11 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 52e1ad467edd by Eli Bendersky in branch '2.7': Issue #11426: use 'with' statements on open files in CSV examples http://hg.python.org/cpython/rev/52e1ad467edd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 07:45:38 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 13 Mar 2011 06:45:38 +0000 Subject: [docs] [issue11426] CSV examples can't close their files In-Reply-To: <1299478772.2.0.158667289214.issue11426@psf.upfronthosting.co.za> Message-ID: <1299998738.11.0.151621726789.issue11426@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 07:49:10 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 13 Mar 2011 06:49:10 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1299998950.26.0.00495322867047.issue11479@psf.upfronthosting.co.za> Eli Bendersky added the comment: Would it not be better to just recommend Windows users not to put that last backslash in at all? IIUC it's only needed to later append file names to directory names, but that's better achieved with os.path.join ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 10:47:51 2011 From: report at bugs.python.org (Daniel Urban) Date: Sun, 13 Mar 2011 09:47:51 +0000 Subject: [docs] [issue11481] The copy module already uses copyreg In-Reply-To: <1300009670.98.0.0546201477777.issue11481@psf.upfronthosting.co.za> Message-ID: <1300009670.98.0.0546201477777.issue11481@psf.upfronthosting.co.za> New submission from Daniel Urban : In the copyreg documentation there is this sentence: "The copy module is likely to use this in the future as well." (http://docs.python.org/dev/py3k/library/copyreg) But the copy module already uses the copyreg module. ---------- assignee: docs at python components: Documentation messages: 130732 nosy: docs at python, durban priority: normal severity: normal status: open title: The copy module already uses copyreg versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From k.langer at arkadin.com Tue Mar 8 22:13:34 2011 From: k.langer at arkadin.com (Ken Langer) Date: Tue, 8 Mar 2011 16:13:34 -0500 Subject: [docs] MOBI format for DOCs Message-ID: Documentation Support: If possible, could you include the docs in MOBI format? Ken Langer Project Manager - R&D ARKADIN GLOBAL AUDIO & WEB CONFERENCING 150 East Campus View Blvd., Suite 220 * Columbus, OH 43235 United States Direct: (+1) (614)635-5305 * Mobile: (+1) (614)906-0128 * Fax: (+1) (614)841-2455 www.arkadin.com Reduce travel costs, save time, and contribute to a greener world using remote collaboration solutions. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lc277642 at students.mimuw.edu.pl Wed Mar 9 14:34:04 2011 From: lc277642 at students.mimuw.edu.pl (=?ISO-8859-2?Q?=A3ukasz_Czerwi=F1ski?=) Date: Wed, 9 Mar 2011 14:34:04 +0100 Subject: [docs] Broken link in Python manual Message-ID: Hello, In the beginning of http://docs.python.org/library/xmlrpclib.html#multicall-objects there is a broken link in sentence: > > In http://www.xmlrpc.com/discuss/msgReader%241208, an approach is > presented to encapsulate multiple calls to a remote server into a single > request. Best wishes, ?ukasz Czerwi?ski -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.george.hammond at gmail.com Wed Mar 9 21:52:26 2011 From: andrew.george.hammond at gmail.com (Andrew Hammond) Date: Wed, 9 Mar 2011 12:52:26 -0800 Subject: [docs] suggestion for http://docs.python.org/library/unittest.html#unittest.TestCase.assertRaises Message-ID: I suggest adding an example of using assertRaises to test a property: class MyObject(object): @property def myProperty(): raise Exception() self.assertRaises(Exception, getattr, myObject, myProperty) Rationale: the naive approach doesn't work and I spent a good half hour figuring that out. Andrew From mmartinez at central.unicor.gov Fri Mar 11 13:30:32 2011 From: mmartinez at central.unicor.gov (Manuel Martinez) Date: Fri, 11 Mar 2011 07:30:32 -0500 Subject: [docs] Damaged pages in Python 3.2 Library Reference Message-ID: <4D79CF9A.EB2A.0033.0@central.unicor.gov> Pages 116 - 118 of the 3.2 Library Reference is damaged. Manuel Martinez 202 305 3919 mmartinez at central.unicor.gov ?This message is intended for official use and may contain SENSITIVE information. If this message contains SENSITIVE information, it should be properly delivered, labeled, stored, and disposed of according to policy.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From timox at gala.net Fri Mar 11 18:01:43 2011 From: timox at gala.net (Timox@) Date: Fri, 11 Mar 2011 19:01:43 +0200 Subject: [docs] 4.4. break and continue Statements, and else Clauses on Loops Message-ID: Hi! In v2.7 and future versions of Python tutorial. Python 3.1.3 (r313:86834, Mar 8 2011, 08:21:55) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> for n in range(2, 10): ... for x in range(2, n): # !!! if n = 9 and x = 2 then the output of ... if n % x == 0: # the condition without further verification from the list!!! ... print(n, 'equals', x, '*', n//x) ... break ... else: ... print(n, 'is a prime number') ... 3 is a prime number 4 equals 2 * 2 5 is a prime number 5 is a prime number 5 is a prime number 6 equals 2 * 3 7 is a prime number 7 is a prime number 7 is a prime number 7 is a prime number 7 is a prime number 8 equals 2 * 4 9 is a prime number ^^^^^^^^^^^^^^^^^^^^!!! IS NOT TRUE 9 equals 3 * 3 as variant: number = 2 counter = 0 while counter < 10: flag = True for divider in range(2, number - 1): if number % divider == 0: flag = False break if flag: counter += 1 print(number) number += 1 -- From report at bugs.python.org Sun Mar 13 13:36:03 2011 From: report at bugs.python.org (Graham Wideman) Date: Sun, 13 Mar 2011 12:36:03 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1300019763.52.0.929139365543.issue11479@psf.upfronthosting.co.za> Graham Wideman added the comment: Eli: Excellent and thoughtful point. This would indeed be exactly the place to suggest os.path.join as an alternative. In addition, there are still occasions where one needs to form a string with trailing backslash. Two examples: 1. When writing the string specifying root directory: r'C:\ '[:-1] 2. Using python to prepare command lines to run other command line programs, where an argument may require a final backslash to explicitly specify a target directory (as opposed to a file). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 13:52:18 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Mar 2011 12:52:18 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1300020738.19.0.0845521834437.issue11479@psf.upfronthosting.co.za> Ezio Melotti added the comment: I would rephrase: +There is one subtle aspect to raw strings that is of special concern to Windows +programmers: a raw string may not end in an odd number of ``\`` characters. to something like: +There is one subtle aspect to raw strings: a raw string may not end in +an odd number of ``\`` characters. That is of special concern while +dealing with Windows paths. Otherwise it seems that this problem only affects raw strings on Windows. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 14:17:16 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 13 Mar 2011 13:17:16 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1300020738.19.0.0845521834437.issue11479@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: > Ezio Melotti added the comment: > > I would rephrase: > +There is one subtle aspect to raw strings that is of special concern to > Windows > +programmers: a raw string may not end in an odd number of ``\`` > characters. > > to something like: > +There is one subtle aspect to raw strings: a raw string may not end in > +an odd number of ``\`` characters. That is of special concern while > +dealing with Windows paths. > > Otherwise it seems that this problem only affects raw strings on Windows. > I agree, but I'd also say something about os.path.join when mentioning Windows paths, because the vast majority of problems that require the trailing backslashes can be solved with it. ---------- Added file: http://bugs.python.org/file21102/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

Ezio Melotti <ezio.melotti at gmail.com> added the comment:

I would rephrase:
+There is one subtle aspect to raw strings that is of special concern to Windows
+programmers: ??a raw string may not end in an odd number of ``\`` characters.

to something like:
+There is one subtle aspect to raw strings: a raw string may not end in
+an odd number of ``\`` characters. ??That is of special concern while
+dealing with Windows paths.

Otherwise it seems that this problem only affects raw strings on Windows.

I agree, but I'd also say something about os.path.join when mentioning Windows paths, because the vast majority of problems that require the trailing backslashes can be solved with it.
From report at bugs.python.org Sun Mar 13 14:21:28 2011 From: report at bugs.python.org (SilentGhost) Date: Sun, 13 Mar 2011 13:21:28 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1300022488.52.0.59508521917.issue11479@psf.upfronthosting.co.za> Changes by SilentGhost : Removed file: http://bugs.python.org/file21102/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 15:22:51 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Mar 2011 14:22:51 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1300026171.46.0.581743268131.issue11479@psf.upfronthosting.co.za> Ezio Melotti added the comment: That would of course be a good addition too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 16:29:07 2011 From: report at bugs.python.org (R. David Murray) Date: Sun, 13 Mar 2011 15:29:07 +0000 Subject: [docs] [issue11479] Add discussion of trailing slash in raw string to tutorial In-Reply-To: <1299985803.24.0.199507309731.issue11479@psf.upfronthosting.co.za> Message-ID: <1300030147.34.0.856251551594.issue11479@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the problem with both [:-1] and os.path.join is that they are inappropriate for that section of the tutorial. I considered putting the discussion later in the section so that I could use [:-1] (which hasn't been introduced at that point), but it made the flow even worse than adding the text where I did. I suppose the os.path.join could be put in if the sentence was short and cross referenced the library docs rather than going into a detailed example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 19:16:13 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 18:16:13 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f197dac00f43 by Antoine Pitrou in branch 'default': Merge commit for #11233 http://hg.python.org/cpython/rev/f197dac00f43 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 19:27:46 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Mar 2011 18:27:46 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToObject function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: <1300040866.53.0.402636976111.issue11478@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, it doesn't exist. There is also a function named PyObject_CopyData which is not documented anywhere (and I'd bet noone has ever used it). ---------- nosy: +mark.dickinson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 19:32:44 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 18:32:44 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToObject function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 539e6f1fce78 by Antoine Pitrou in branch '3.1': Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) http://hg.python.org/cpython/rev/539e6f1fce78 New changeset eb8c2f43b251 by Antoine Pitrou in branch '3.2': Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) http://hg.python.org/cpython/rev/eb8c2f43b251 New changeset 955547e57cff by Antoine Pitrou in branch 'default': Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) http://hg.python.org/cpython/rev/955547e57cff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 19:35:14 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 18:35:14 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToObject function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 248800b58175 by Antoine Pitrou in branch '2.7': Remove documentation to non-existent function PyObject_CopyToObject (fixes #11478) http://hg.python.org/cpython/rev/248800b58175 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 19:35:35 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Mar 2011 18:35:35 +0000 Subject: [docs] [issue11478] Docs list nonexistant PyObject_CopyToObject function In-Reply-To: <1299984288.28.0.0947094207419.issue11478@psf.upfronthosting.co.za> Message-ID: <1300041335.12.0.455244470864.issue11478@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 21:17:52 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 13 Mar 2011 20:17:52 +0000 Subject: [docs] [issue11484] `with_traceback` in 2.7 docs but not implemented In-Reply-To: <1300047472.09.0.42501037917.issue11484@psf.upfronthosting.co.za> Message-ID: <1300047472.09.0.42501037917.issue11484@psf.upfronthosting.co.za> New submission from Jonas H. : Either a `BaseException.with_traceback` implementation is missing or the docs are wrong. http://docs.python.org/library/exceptions.html?highlight=with_traceback#exceptions.BaseException.with_traceback python3 -c 'print("with_traceback" in dir(BaseException))' True python2 -c 'print("with_traceback" in dir(BaseException))' False ---------- assignee: docs at python components: Documentation messages: 130760 nosy: docs at python, jonash priority: normal severity: normal status: open title: `with_traceback` in 2.7 docs but not implemented versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 21:56:19 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 20:56:19 +0000 Subject: [docs] [issue11484] `with_traceback` in 2.7 docs but not implemented In-Reply-To: <1300047472.09.0.42501037917.issue11484@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 22f991bb9b0b by Ezio Melotti in branch '2.7': #11484: remove paragraph about with_traceback from 2.7 doc. http://hg.python.org/cpython/rev/22f991bb9b0b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 21:57:51 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 13 Mar 2011 20:57:51 +0000 Subject: [docs] [issue11484] `with_traceback` in 2.7 docs but not implemented In-Reply-To: <1300047472.09.0.42501037917.issue11484@psf.upfronthosting.co.za> Message-ID: <1300049871.33.0.0584307885045.issue11484@psf.upfronthosting.co.za> Ezio Melotti added the comment: It's a documentation bug, with_traceback is available in 3.x only. I now fixed the doc for 2.7, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 23:29:34 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Mar 2011 22:29:34 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4c59cd84086f by Antoine Pitrou in branch '3.2': Issue #11329: PyEval_InitThreads() cannot be called before Py_Initialize() anymore http://hg.python.org/cpython/rev/4c59cd84086f New changeset 3c0edb157ea2 by Antoine Pitrou in branch 'default': Issue #11329: PyEval_InitThreads() cannot be called before Py_Initialize() anymore http://hg.python.org/cpython/rev/3c0edb157ea2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 13 23:30:40 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 13 Mar 2011 22:30:40 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: <1300055440.82.0.459631342975.issue11329@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch now committed, thank you! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 09:52:09 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 14 Mar 2011 08:52:09 +0000 Subject: [docs] [issue10885] multiprocessing docs In-Reply-To: <1294742845.68.0.53995604469.issue10885@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 5dabfc3e4dd5 by Ross Lagerwall in branch '3.1': Issue #10885: Fix multiprocessing docs typo http://hg.python.org/cpython/rev/5dabfc3e4dd5 New changeset b2ebe9f5faca by Ross Lagerwall in branch '2.7': Issue #10885: Fix multiprocessing docs typo http://hg.python.org/cpython/rev/b2ebe9f5faca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 09:56:00 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Mon, 14 Mar 2011 08:56:00 +0000 Subject: [docs] [issue10885] multiprocessing docs In-Reply-To: <1294742845.68.0.53995604469.issue10885@psf.upfronthosting.co.za> Message-ID: <1300092960.16.0.182990749256.issue10885@psf.upfronthosting.co.za> Changes by Ross Lagerwall : ---------- assignee: docs at python -> rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 14:24:10 2011 From: report at bugs.python.org (Robbie Clemons) Date: Mon, 14 Mar 2011 13:24:10 +0000 Subject: [docs] [issue11165] Document PyEval_Call* functions In-Reply-To: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> Message-ID: <1300109050.16.0.0146573453803.issue11165@psf.upfronthosting.co.za> Changes by Robbie Clemons : ---------- nosy: +robquad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 15:38:49 2011 From: report at bugs.python.org (Matias Bordese) Date: Mon, 14 Mar 2011 14:38:49 +0000 Subject: [docs] [issue11497] Devguide: re-run configure in Unix setup step after installing deps In-Reply-To: <1300113528.98.0.0552782381076.issue11497@psf.upfronthosting.co.za> Message-ID: <1300113528.98.0.0552782381076.issue11497@psf.upfronthosting.co.za> New submission from Matias Bordese : When setting up dev environment in Unix and there are missing dependencies after running make, you may need to re-run configure before a new make (relates to #11496). ---------- assignee: docs at python components: Documentation messages: 130820 nosy: docs at python, matiasb priority: normal severity: normal status: open title: Devguide: re-run configure in Unix setup step after installing deps type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 15:47:36 2011 From: report at bugs.python.org (Matias Bordese) Date: Mon, 14 Mar 2011 14:47:36 +0000 Subject: [docs] [issue11497] Devguide: re-run configure in Unix setup step after installing deps In-Reply-To: <1300113528.98.0.0552782381076.issue11497@psf.upfronthosting.co.za> Message-ID: <1300114056.41.0.234255073795.issue11497@psf.upfronthosting.co.za> Matias Bordese added the comment: Adding patch. ---------- keywords: +patch Added file: http://bugs.python.org/file21114/issue11497.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 15:58:22 2011 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 Mar 2011 14:58:22 +0000 Subject: [docs] [issue11497] Devguide: re-run configure in Unix setup step after installing deps In-Reply-To: <1300113528.98.0.0552782381076.issue11497@psf.upfronthosting.co.za> Message-ID: <1300114702.12.0.618231047129.issue11497@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in [9bacb56f08e7] ---------- nosy: +brett.cannon resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 17:01:15 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 14 Mar 2011 16:01:15 +0000 Subject: [docs] [issue11165] Document PyEval_Call* functions In-Reply-To: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> Message-ID: <1300118475.05.0.00213117616908.issue11165@psf.upfronthosting.co.za> Antoine Pitrou added the comment: IMO, it would probably have been better if these APIs had been private from the start. Is there any use case for calling them from 3rd-party code? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 18:39:42 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 14 Mar 2011 17:39:42 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1300124382.3.0.0185681911369.issue10665@psf.upfronthosting.co.za> Georg Brandl added the comment: The "PDF generator" is PDFLaTeX, whose range of Unicode characters is very limited, so no, I can't fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 21:03:45 2011 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 14 Mar 2011 20:03:45 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1300133025.32.0.833943843685.issue10433@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I do understand the issue, but I'm not sure if I can write it down consisely. I've attached an initial attempt (patch is relative to the default branch, I'll port to 2.7 and 3.2 if it looks OK) ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file21133/issue10433.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 21:13:50 2011 From: report at bugs.python.org (Michael Foord) Date: Mon, 14 Mar 2011 20:13:50 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1300133630.19.0.352940714639.issue11282@psf.upfronthosting.co.za> Michael Foord added the comment: Those methods should *not* have been removed. I thought we had discussed this. It is my fault for allowing the error in the 3.2 docs to remain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 22:40:19 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 14 Mar 2011 21:40:19 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300138819.04.0.974455656795.issue10617@psf.upfronthosting.co.za> Ezio Melotti added the comment: Apparently there's no way to change the text generated by the "class" directive, so it's not possible to use it in the table without having the "class" before the names. The alternatives are: 1) define these classes normally instead of or in addition to the table; 2) leave the doc as is and close the issue; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 14 22:57:29 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Mar 2011 21:57:29 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300139849.3.0.189274360837.issue10617@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, do you have a recommendation? ---------- assignee: docs at python -> georg.brandl nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 00:15:13 2011 From: report at bugs.python.org (Jeff Ramnani) Date: Mon, 14 Mar 2011 23:15:13 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1300144513.32.0.242267163541.issue8158@psf.upfronthosting.co.za> Jeff Ramnani added the comment: I've read through the doc and the code. All keyword arguments for OptionParser.__init__() are in the documentation for branches 2.7 and default (as of ecc176488349). Does that mean this issue can be closed? ---------- nosy: +jramnani _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 00:31:01 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Mar 2011 23:31:01 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1300145461.15.0.478622703298.issue8158@psf.upfronthosting.co.za> R. David Murray added the comment: It looks to me like description is still missing from the docstring, at least on python3 tip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 03:22:24 2011 From: report at bugs.python.org (Jeff Ramnani) Date: Tue, 15 Mar 2011 02:22:24 +0000 Subject: [docs] [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1300155744.05.0.431599276989.issue9362@psf.upfronthosting.co.za> Jeff Ramnani added the comment: I've checked Lib/site.py and it tells the user to use 'Ctrl-Z' to exit the prompt when they are running Windows. Perhaps this means we can close the ticket, since discussion on this issue seems to have dissipated? ---------- nosy: +jramnani _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 03:22:54 2011 From: report at bugs.python.org (Brian Curtin) Date: Tue, 15 Mar 2011 02:22:54 +0000 Subject: [docs] [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1300155774.77.0.290260730007.issue9362@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 12:39:51 2011 From: report at bugs.python.org (Graham Wideman) Date: Tue, 15 Mar 2011 11:39:51 +0000 Subject: [docs] [issue11553] Docs for: import, packages, site.py, .pth files In-Reply-To: <1300189190.68.0.0305569633639.issue11553@psf.upfronthosting.co.za> Message-ID: <1300189190.68.0.0305569633639.issue11553@psf.upfronthosting.co.za> New submission from Graham Wideman : The overall scope of this issue is that current Python documentation gives vague, sometimes incorrect, information about the set of Python features involved in modularizing functionality. This issue presents an obstacle to programmers making smooth transitions from a single module, to collections of modules and packages, then on to neatly organized common packages shared between projects. The problem affects documentation of: import and from...import statements ------------------------------------ The Language Reference is way too complicated for the mainstream case. Exactly what variants of arguments are possible, and what are their effects? What are the interactions with package features, such as whether or not modules have been explicitly imported into package __init_.py? sys.path --------- Typical consituents; range of alternatives for adding more dirs Module site.py -------------- Multiple serious errors in the file docstring, relating to site-packages directories and .pth files .pth files ----------- Incorrectly described in site.py, and then vaguely described in other docs. Are .pth files processed everywhere on sys.path? Can they be interative? (No to both). package structure ----------------- Details of package structure have evidently changed over Python versions. Current docs are unclear on points such as: -- is __init__.py needed on subpackage directories? -- the __all__ variable: Does it act generally to limit visibility of a module or package's attributes, or does pertain only to the 'from...import *' statement? Details: ========= Language Reference ------------------- http://docs.python.org/py3k/reference/simple_stmts.html#the-import-statement The description of the import statement is extensive, but dauntingly complicated for the reader trying to understand the mainstream case of simply importing modules or packages that are on sys.path. This is because the algorithm for finding modules tries numerous esoteric strategies before falling back on the plain-old-file-system method. (Even now that I have a good understanding of the plain-old-file variations of import, I reread this and find it hard to comprehend, and disorganized and incomplete in presenting the available variations of the statement.) Grammar issue: the grammar shown for the import statement shows: relative_module ::= "."* module | "."+ ... which implies that relative module could have zero leading dots. I believe an actual relative path is required to have at least one dot (PEP 328). Evidently, in this grammar, 'relative_module' really means "relative or absolute path to module or package", so it would be quite helpful to change to: relative_path ::= "."+ module | "."+ from_path ::= (relative_path | module) etc. (Really 'module' is not quite right here either since it's used to mean module-or-package.) site.py: -------- Module site.py implements the site-package related features. The docstring has multiple problems with consequences in other docs. 1. Does not mention user-specific site-package directories (implemented by addusersitepackages() ) 2. Seriously misleading discussion of .pth files. In the docstring the example shows using pth files, called "package configuration files" in their comments, to point to actual package directories bar and foo located within the site-packages directory. This is an absolutely incorrect use of pth files: If foo and bar are packages in .../site-packages/, they do not need to be pointed to, they are already on sys.path. If the package dirs ARE pointed to by foo.pth and bar.pth, the modules inside them will be exposed directly to sys.path, possibly precipitating name collisions. Further, programmers following this example will create packages in which import statements will appear to magically perform relative imports without leading dots, leading to confusion over how the import statement is supposed to work. It may be that this discussion is held over from a time when "package" perhaps meant "Just a Bunch of Files in a Directory"? 3. The docstring (or other docs) should make clear that .pth files are ONLY processed within site-package directories (ie: only by site.py). 4. Bug: Minor: In addsitepackages(), the library directory for Windows (the else clause) is shown as lower-case 'lib' instead of 'Lib'. This has some possibility of causing problems when running from a case-sensitive server. In any case, if read as documentation it is misleading. Tutorial --------- 6. Modules: http://docs.python.org/py3k/tutorial/modules.html 1. Discussion (6.1.2. The Module Search Path) is good as far as it goes, but it doesn't mention the site-package directories. 2. Section 6.4. Packages: Discussion of __init__.py does describe the purpose of these files. However, the discussion in relation to subpackages should mention that for subdirectories to be accessible they must in fact be made into subpackages. I.e.: there is not form of import that can reach into a subdir of a package *unless* it's flagged as a subpackage using __init__.py. I have read elsewhere that there were some versions of Python where __init__.py was not needed on subdirs within a package. 3. Section 6.4. Packages: The discussion of __all__ should note that it works *only* in conjunction with 'from...import *', and is not a general mechanism for limiting visibility of attributes. Attributes not in the __all__ list are still accessible using other forms of import. 4. Section 6.4. Packages: "Note that when using from package import item" and following. Draws a contrast between: from package import item vs import item.subitem.subsubitem However, this muddles the roles of the arguments to import, and notably uses 'item' in two different ways. Instead the discussion can be presented as a comparison of: from PackageOrModule import ModuleOrAttribute vs import PackageOrModule ... where it can be pointed out that the PackageOrModule 'dotted path' argument follows the *same* rules in both cases (except for relative paths). The *salient* contrast is that only the 'from' form has a *second* argument which can be an attribute. 5. Footnote: (somewhat unrelated, but...) says "the execution of a module-level function enters the function name in the module?s global symbol table." This is surely incorrect -- it is the execution of the function's *def* that enters the function name in the symbol table. Standard Library Reference --------------------------- 1) 27.13. site ? Site-specific configuration hook http://docs.python.org/py3k/library/site.html This is documentation for site.py, and is a page that might well come up in a search for '.pth'. 1a) This page may simply be importing the docstring from site.py? In any case it repeats the ommissions and errors noted above for site.py. 2) 27.1. sys ? System-specific parameters and functions http://docs.python.org/py3k/library/sys.html Documentation for sys.path. OK as far as it goes, but: 2a) Could helpfully point to a discussion of the typical items to be found in sys.path under normal circumstances 2b) It does point to the site.py module documentation as the authoritative info on using .pth files (which is seriously flawed as noted above). 3) 29.3. pkgutil ? Package extension utility. http://docs.python.org/py3k/library/pkgutil.html 3a) The info for pkgutil.extend_path() describes how .pkg files are similar to .pth files, and their entries should point to package directories. As I noted above, so far as I can see, package directories should be within a directory on sys,path, but should not themselves be included in the path, otherwise it breaks their capability to work properly as packages. 'Installing Python Modules' document: -------------------------------------- http://docs.python.org/py3k/install/index.html This may well be consulted for info on how to organize source files, though it is basically the doc for Distutils. 1. Main problem is that it seems quite out-of-date; "Windows has no concept of a user?s home directory, " and so on. 2. 'How installation works' > table. For Windows suggests 'prefix' (default: C:\Python) as an installation directory. This is indeed one of the possible 'site-package' directories, but surely it is deprecated in favor of C:\Python\Lib\site-packages, which this section does not mention. 3. Does not mention user-specific site-package directories. 4. 'Modifying Python's Search Path' > "The most convenient way is to add a path configuration file to a directory that?s already on Python?s path". This is incorrect. (a) .pth files are only processed in site-package directories. (b) Clarifying an additional point of confusion -- as a consequence of (a) .pth files cannot be chained. 5. Points to docs for site.py... with it's flaws noted above. PEP 302 New Import Hooks ------------------------ Given the vagueness elsewhere in the docs, one might go hunting for ground truth in the PEPs. One must allow for PEPs having been superceeded, but nonetheless, outdated info that is now wrong is an additional stumbling block for learners. 1. Section 'Specification part 1: The importer Protocol'. Discussion says that in an import statement, a path (with no leading '.') is first treated as relative. This is now incorrect (as spelled out in PEP 328.) It would be helpful to insert a note in PEP 302 pointing out that the later revision invalidates this passage. ---------- assignee: docs at python components: Documentation messages: 130964 nosy: docs at python, gwideman priority: normal severity: normal status: open title: Docs for: import, packages, site.py, .pth files type: behavior versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 13:16:37 2011 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 15 Mar 2011 12:16:37 +0000 Subject: [docs] [issue11165] Document PyEval_Call* functions In-Reply-To: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> Message-ID: <1300191397.22.0.802433892803.issue11165@psf.upfronthosting.co.za> Nick Coghlan added the comment: There may be some legitimate use cases when embedding Python and you *know* that the checks performed by the PyObject_* versions aren't needed. It may also be historical - the PyEval versions may predate the PyObject ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 15 17:59:39 2011 From: report at bugs.python.org (Michael Foord) Date: Tue, 15 Mar 2011 16:59:39 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1300208379.77.0.425542419552.issue11385@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- assignee: docs at python -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 16 00:09:29 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Mar 2011 23:09:29 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1300230569.92.0.0292724930771.issue11298@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file21043/issue11298_py2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 16 00:15:39 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Mar 2011 23:15:39 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1300230939.46.0.476257010268.issue11298@psf.upfronthosting.co.za> R. David Murray added the comment: Drat, I accidentally deleted the patch file. Reattaching. ---------- nosy: +r.david.murray Added file: http://bugs.python.org/file21234/issue11298_py2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 17 11:58:41 2011 From: report at bugs.python.org (Gennadiy Zlobin) Date: Thu, 17 Mar 2011 10:58:41 +0000 Subject: [docs] [issue11568] docstring of select.epoll.register() is wrong In-Reply-To: <1300271962.07.0.948411199474.issue11568@psf.upfronthosting.co.za> Message-ID: <1300359521.77.0.160063322261.issue11568@psf.upfronthosting.co.za> Changes by Gennadiy Zlobin : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 17 12:03:59 2011 From: report at bugs.python.org (Gennadiy Zlobin) Date: Thu, 17 Mar 2011 11:03:59 +0000 Subject: [docs] [issue11568] docstring of select.epoll.register() is wrong In-Reply-To: <1300271962.07.0.948411199474.issue11568@psf.upfronthosting.co.za> Message-ID: <1300359838.97.0.642560237346.issue11568@psf.upfronthosting.co.za> Gennadiy Zlobin added the comment: The patch fixes the docstring ---------- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file21265/11568.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 17 14:40:08 2011 From: report at bugs.python.org (Clive Darke) Date: Thu, 17 Mar 2011 13:40:08 +0000 Subject: [docs] [issue11585] Documentation 1.8 shows Python 2 example In-Reply-To: <1300369208.25.0.790450898206.issue11585@psf.upfronthosting.co.za> Message-ID: <1300369208.25.0.790450898206.issue11585@psf.upfronthosting.co.za> New submission from Clive Darke : Python 3.2 version attached ---------- assignee: docs at python components: Documentation files: parrot.c messages: 131246 nosy: cdarke, docs at python priority: normal severity: normal status: open title: Documentation 1.8 shows Python 2 example versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file21267/parrot.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 17 14:42:33 2011 From: report at bugs.python.org (Clive Darke) Date: Thu, 17 Mar 2011 13:42:33 +0000 Subject: [docs] [issue11585] Documentation 1.8 shows Python 2 example In-Reply-To: <1300369208.25.0.790450898206.issue11585@psf.upfronthosting.co.za> Message-ID: <1300369353.43.0.759605517512.issue11585@psf.upfronthosting.co.za> Clive Darke added the comment: 1.8. Keyword Parameters for Extension Functions "Here is an example module which uses keywords, based on an example by Geoff Philbrick (philbrick at hks.com):" The example which follows will not compile on Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 18 00:37:21 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 Mar 2011 23:37:21 +0000 Subject: [docs] [issue11573] Improve Unicode Documentation with Known Caveats In-Reply-To: <1300295742.01.0.225887630619.issue11573@psf.upfronthosting.co.za> Message-ID: <1300405041.47.0.565964935575.issue11573@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 18 00:45:56 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 17 Mar 2011 23:45:56 +0000 Subject: [docs] [issue11553] Docs for: import, packages, site.py, .pth files In-Reply-To: <1300189190.68.0.0305569633639.issue11553@psf.upfronthosting.co.za> Message-ID: <1300405556.32.0.20729301216.issue11553@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +brett.cannon, eric.araujo, ncoghlan, pje versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 18 22:19:18 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Mar 2011 21:19:18 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: <1300483158.64.0.210368557108.issue11476@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is it okay to change a public parameter name without deprecation process? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 00:41:54 2011 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 18 Mar 2011 23:41:54 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: <1300491714.5.0.606205683196.issue11476@psf.upfronthosting.co.za> Vinay Sajip added the comment: It's a formal parameter name, in general passed by position rather than keyword. Anyway, it seems a bit late to change it back now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 00:49:45 2011 From: report at bugs.python.org (follower) Date: Fri, 18 Mar 2011 23:49:45 +0000 Subject: [docs] [issue11476] StreamHandler code broken by change of parameter name In-Reply-To: <1299949968.72.0.952611916951.issue11476@psf.upfronthosting.co.za> Message-ID: <1300492185.5.0.161761802002.issue11476@psf.upfronthosting.co.za> follower added the comment: I don't think it would be unreasonable to add the old name back in temporarily and use whichever parameter is supplied--this change has obviously broken code in the process. But for future situations I think changes like this shouldn't happen without a deprecation process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 06:11:08 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Mar 2011 05:11:08 +0000 Subject: [docs] [issue11418] Method's global scope is module containing function definition, not class. In-Reply-To: <1299454101.64.0.841920247259.issue11418@psf.upfronthosting.co.za> Message-ID: <1300511468.03.0.460119474866.issue11418@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "Methods defined within a class may reference..." would make the tutorial correct without introducing the complication of methods defined outside a class, let alone in another module. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 06:36:42 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Mar 2011 05:36:42 +0000 Subject: [docs] [issue11465] Set documentation: Link to wikipedia In-Reply-To: <1299837876.85.0.251184172401.issue11465@psf.upfronthosting.co.za> Message-ID: <1300513002.68.0.871952668754.issue11465@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is no end of helpful articles at Wikipedia and elsewhere. Wikipedia articles are especially easy to find with a special search in some browsers and on the site. In my experience on python-list, for instance, people have much more problem with floats, for instance, than sets. Certainly, sets are taught much better in U.S. schools. ---------- nosy: +terry.reedy resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From tyler.j.barth at gmail.com Wed Mar 16 07:39:32 2011 From: tyler.j.barth at gmail.com (Tyler J. Barth) Date: Wed, 16 Mar 2011 14:39:32 +0800 Subject: [docs] argparse doc example not especially helpful Message-ID: <5395211D-86D6-4B3C-8B5C-7023E4F4AEF5@gmail.com> I propose an improvement to the documentation for argparse (http://docs.python.org/library/argparse.html) I posit that the example 15.4.1 is not immediately helpful for the majority of people coming to docs.python.org to figure out how to use argparse. Though the use of argparse features to effortlessly sum and max the input integers is clever (and demonstrates many advanced features), I think most people arriving on that page want to know how to do three things: -Read in a file ("input.txt") -Read in a boolean switch ("-bar", use bar mode or not) -Read in a value for a switch ("-foo 6", set variable foo to 6) Of course, by hunting through the rest of the documentation you can learn how to do all of these basic tasks and more (much, much more). The clever sum and max example doesn't help elucidate how to perform these simple parses, and by using advanced features actually confuses new users. "argparse" has much more power than most people need, and I think it is fair to say that it's power obscures how to do the most common tasks. However, because "optparse" is deprecated and we all probably want to discourage people from rolling their own argument parsers every time they make a new simple program, I think there is value in making the "common case" more prominent in the example. It would encourage adoption of argparse so that when users's programs eventually increase in complexity and they do want to expand functionality, they would have the full power of argparse at their disposal. In summary, my suggestion is: -Expand example 15.4.1 to include the most common use cases -Consider splitting the "clever" example into a different section to avoid confusing new users. Sincerely, Tyler Barth -------------- next part -------------- An HTML attachment was scrubbed... URL: From mzollinger at esri.com Fri Mar 18 19:16:04 2011 From: mzollinger at esri.com (Mark Zollinger) Date: Fri, 18 Mar 2011 11:16:04 -0700 Subject: [docs] typo on http://docs.python.org/tutorial/classes.html Message-ID: FWIW, On page http://docs.python.org/tutorial/classes.html, the text "where one at least one of the parent classes" should probably be changed to "where at least one of the parent classes". (too many "one"s) -Mark Z From report at bugs.python.org Sat Mar 19 08:40:13 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Mar 2011 07:40:13 +0000 Subject: [docs] [issue11465] Set documentation: Link to wikipedia In-Reply-To: <1299837876.85.0.251184172401.issue11465@psf.upfronthosting.co.za> Message-ID: <1300520413.05.0.513015476618.issue11465@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with the other respondants. Also, experience has shown a near zero learning curve for sets. For whatever reason, people seem to just get it and not require further explanation. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 19:08:08 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Mar 2011 18:08:08 +0000 Subject: [docs] [issue11456] Documentation csv RFC4180 In-Reply-To: <1299709682.27.0.368718810764.issue11456@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c63d7374b89a by Skip Montanaro in branch 'default': Mention RFC 4180. Based on input by Tony Wallace in issue 11456. http://hg.python.org/cpython/rev/c63d7374b89a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 19:49:45 2011 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 19 Mar 2011 18:49:45 +0000 Subject: [docs] [issue11456] Documentation csv RFC4180 In-Reply-To: <1299709682.27.0.368718810764.issue11456@psf.upfronthosting.co.za> Message-ID: <1300560585.29.0.554226685317.issue11456@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 20:10:36 2011 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 19 Mar 2011 19:10:36 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1300561836.91.0.0248360901546.issue9650@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 20:11:21 2011 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 19 Mar 2011 19:11:21 +0000 Subject: [docs] [issue9755] Fix refcounting details in Py3k C API documentation In-Reply-To: <1283514224.53.0.325600320074.issue9755@psf.upfronthosting.co.za> Message-ID: <1300561881.35.0.731362140629.issue9755@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 19 20:11:45 2011 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 19 Mar 2011 19:11:45 +0000 Subject: [docs] [issue8387] use universal newline mode in csv module examples In-Reply-To: <1271193086.18.0.201846291594.issue8387@psf.upfronthosting.co.za> Message-ID: <1300561905.77.0.316400565849.issue8387@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 20 02:50:07 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 20 Mar 2011 01:50:07 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1300585807.49.0.804839225825.issue11282@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: michael.foord -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 20 21:57:33 2011 From: report at bugs.python.org (Chris Withers) Date: Sun, 20 Mar 2011 20:57:33 +0000 Subject: [docs] [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1300654653.56.0.455690161131.issue3722@psf.upfronthosting.co.za> Chris Withers added the comment: Terry, My original post was not about *temporary* output inserted for debugging, but test mocks and the like which form a permanent part of the test and which output to stdout. cheers, Chris ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 20 22:45:11 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 20 Mar 2011 21:45:11 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300657511.69.0.749650975486.issue10617@psf.upfronthosting.co.za> Georg Brandl added the comment: I would recommend to document the classes like all other classes. It may take a bit more space, but it will be a) standard and b) linkable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 20 23:34:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 20 Mar 2011 22:34:34 +0000 Subject: [docs] [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1300660473.97.0.440011542221.issue901727@psf.upfronthosting.co.za> ?ric Araujo added the comment: I added the missing words and reworded a few lines in the attached patch. That said, I find that the new doc is barely helpful; it describes what the code does, but does not explain why one would want to use it. Comments in the source suggest it?s a hack to support some corner case. This is still obscure to me after reading about it and looking at the code :( ---------- Added file: http://bugs.python.org/file21313/apiref-followup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 20 23:35:44 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 20 Mar 2011 22:35:44 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1300660544.83.0.902397738583.issue9364@psf.upfronthosting.co.za> ?ric Araujo added the comment: yeswanth, would you like more guidance or should I finish the patches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 00:22:02 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Mar 2011 23:22:02 +0000 Subject: [docs] [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1300663322.01.0.482248611546.issue3722@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You misunderstood my last response. The first paragraph *dismisses* the case of temporary print (raised by Charles-Axle) as out of scope for doctests and hence this issue. The next ones addresses *your* case of code *permanently* intended to print and raise and gives a workable solution to your example. After failing to find a simpler example that works with 3.x*, I am now thinking of the following doc fix. 1. Add 'directly' before 'supported' in Tim's first sentence: "Examples containing both expected output and an exception are not supported." 2. After the next sentence of explanation, add """Instead, try something like: >>> def test(): ... print("hello") ... raise IndexError() ... >>> try: ... test() ... raise BaseException # Fail if no IndexError ... except IndexError: ... pass hello """ * I discovered a subtle consequence of the print change: "print 1, 1/0" will print '1' on a line by itself and then a traceback. "print(1,1/0)" just prints a traceback. Something like class C(): def __str__(self): raise IndexError print(1, C(), sep='\n') is required to print a value by itself on a line and then a traceback. That is no simpler and probably less realistic than test() above. ---------- keywords: +patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 02:18:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 21 Mar 2011 01:18:25 +0000 Subject: [docs] [issue9302] distutils.core.Extension: list parameters documented as strings In-Reply-To: <1279532605.75.0.42010773345.issue9302@psf.upfronthosting.co.za> Message-ID: <1300670305.44.0.0422895822449.issue9302@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the catch. Are there no similar problems in the rest of the distutils doc, or did you search in one file only? ---------- assignee: docs at python -> eric.araujo components: +Distutils, Distutils2 nosy: +alexis, eric.araujo stage: -> patch review title: Distutils document problem? -> distutils.core.Extension: list parameters documented as strings versions: +3rd party, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 02:22:22 2011 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Mar 2011 01:22:22 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1300670542.54.0.712917776541.issue11230@psf.upfronthosting.co.za> STINNER Victor added the comment: >> Victor asked "Which web page should updated/fixed?" > Answer: The Python 3.2 download page. Sorry, but I don't see which page tells that Python 3.2 has a full Unicode support for import. In http://www.python.org/download/releases/3.2/, I can read "countless fixes regarding bytes/string issues; among them full support for a bytes environment (filenames, environment variables)". "full support for a bytes environment" means that Python 3.2 has been fixed on UNIX to support undecodable filenames, but not that Python 3.2 supports unencodable filenames on Windows. Can you propose a sentence which is more clear about bytes/Unicode? Python 3.3 will have a full Unicode support for modules: issue #3080 is already fixed, and I think that #11619 can be fixed (maybe not easily). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 06:21:08 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Mar 2011 05:21:08 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300684867.92.0.0326129203781.issue10617@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch that adds the list of classes with a minimal description before the table. I grouped a few classes to save some space. Container, Hashable, Sized, Callable could be grouped too. I also added links to the methods and to glossary terms (the `set` term is missing from the glossary though). The methods listed in the table can be turned to links too. (The :meth:`__len__ <__len__>` markup is to hide the () after the __method__.) ---------- assignee: georg.brandl -> ezio.melotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file21318/issue10617.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 07:58:28 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Mar 2011 06:58:28 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300690708.19.0.452403404246.issue10617@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks fine, but it may be better to put the tables first and details second. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 08:52:36 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Mar 2011 07:52:36 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300693956.26.0.871768846299.issue10617@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes; then the table entries will link to the descriptions below. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 08:53:08 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Mar 2011 07:53:08 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300693988.75.0.104176080116.issue10617@psf.upfronthosting.co.za> Georg Brandl added the comment: BTW: :meth:`x ` should not do anything different from :meth:`x`. ---------- _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Mon Mar 21 07:23:44 2011 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Mon, 21 Mar 2011 15:23:44 +0900 Subject: [docs] HTMLParser documentation bug Message-ID: Hello I am a Japanese Pythonophilia and also a member of the python-doc-ja project. I found a small bug in HTMLParser library reference. http://docs.python.org/library/htmlparser.html There is duplicated word "be" in the explanation of the unknown_decl method. > It is sometimes useful to be be overridden Regards. -- class Cocoatomo: ? ? name = 'cocoatomo' ? ? email_address = 'cocoatomo77 at gmail.com' ? ? twitter_id = '@cocoatomo' From report at bugs.python.org Mon Mar 21 09:23:08 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 21 Mar 2011 08:23:08 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300695788.59.0.768451895778.issue10617@psf.upfronthosting.co.za> Ezio Melotti added the comment: I put the list first and table second because the table contains more details and information, whereas the list only has a short description (usually the tables provide an overview and they are followed by a more comprehensive list). I didn't include the () after the methods name because they are not in the table, they look ugly on the special __methods__() and it's clear that they are methods even without the (). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 13:31:39 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 21 Mar 2011 12:31:39 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1300710699.19.0.826617834302.issue10617@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I didn't include the () after the methods name because [...] they look > ugly on the special __methods__() and it's clear that they are methods > even without the (). I feel that way for all functions and methods in the docs, especially given Python?s distinction between getting an object and calling it, but the current Sphinx setting is to add parenthesis, so let?s follow it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 14:22:47 2011 From: report at bugs.python.org (Ray.Allen) Date: Mon, 21 Mar 2011 13:22:47 +0000 Subject: [docs] [issue9302] distutils API Reference: setup() and Extension parameters' description not correct. In-Reply-To: <1279532605.75.0.42010773345.issue9302@psf.upfronthosting.co.za> Message-ID: <1300713767.34.0.776308878301.issue9302@psf.upfronthosting.co.za> Ray.Allen added the comment: I searched the distutils docs for such a parameter description table and find tow more on the distutils.core.setup() function descriptions. Reflected in my updated patch. ---------- title: distutils.core.Extension: list parameters documented as strings -> distutils API Reference: setup() and Extension parameters' description not correct. Added file: http://bugs.python.org/file21323/issue_9302.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 15:26:33 2011 From: report at bugs.python.org (Roberto De Renzi) Date: Mon, 21 Mar 2011 14:26:33 +0000 Subject: [docs] [issue11622] Documentation In-Reply-To: <1300717593.92.0.639893924649.issue11622@psf.upfronthosting.co.za> Message-ID: <1300717593.92.0.639893924649.issue11622@psf.upfronthosting.co.za> New submission from Roberto De Renzi : I don't know if a suggestion is allowed here. I am an absolute beginner trying to substitute my matlab+fortran with python. I just passed the stage of tutorials and I have to struggle looking for the right syntax to implement my simple-minded programs. The learning curve is much steeper than for matlab, certainly due to the greater power of the language. The thing I need is a good reference manual. I find the Language Reference extremely poor in examples. The Library Reference is marginally better. Would you please consider sponsoring (as a developer-user community) a style that forces to include very short examples? Thanks Roberto ---------- assignee: docs at python components: Documentation messages: 131658 nosy: docs at python, roberto.derenzi priority: normal severity: normal status: open title: Documentation type: feature request versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 15:33:36 2011 From: report at bugs.python.org (SilentGhost) Date: Mon, 21 Mar 2011 14:33:36 +0000 Subject: [docs] [issue11622] Documentation In-Reply-To: <1300717593.92.0.639893924649.issue11622@psf.upfronthosting.co.za> Message-ID: <1300718016.73.0.0866352268321.issue11622@psf.upfronthosting.co.za> SilentGhost added the comment: Did you try http://docs.python.org/tutorial/ ? ---------- nosy: +SilentGhost versions: -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 18:33:44 2011 From: report at bugs.python.org (Doug Latornell) Date: Mon, 21 Mar 2011 17:33:44 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs Message-ID: <1300728824.77.0.91602355451.issue11625@psf.upfronthosting.co.za> Changes by Doug Latornell : ---------- assignee: docs at python components: Documentation nosy: dlatornell, docs at python priority: normal severity: normal status: open title: Typo in collections.abc docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 18:34:17 2011 From: report at bugs.python.org (Doug Latornell) Date: Mon, 21 Mar 2011 17:34:17 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> New submission from Doug Latornell : There is a minor type in note (1) regarding use of Set and MutableSet mixins. The method to be overridden when a special constructor signature is required should be _from_iterator, not from_iterator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 18:34:35 2011 From: report at bugs.python.org (Doug Latornell) Date: Mon, 21 Mar 2011 17:34:35 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: <1300728875.56.0.731944949469.issue11625@psf.upfronthosting.co.za> Changes by Doug Latornell : ---------- keywords: +patch Added file: http://bugs.python.org/file21326/collections.abc-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 18:37:47 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Mar 2011 17:37:47 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: <1300729067.66.0.176692806737.issue11625@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. ---------- nosy: +rhettinger priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 21 23:36:39 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 21 Mar 2011 22:36:39 +0000 Subject: [docs] [issue11622] Documentation In-Reply-To: <1300717593.92.0.639893924649.issue11622@psf.upfronthosting.co.za> Message-ID: <1300746999.62.0.208266648643.issue11622@psf.upfronthosting.co.za> ?ric Araujo added the comment: Welcome to Python! We hope you?ll have a great time using it. The language reference is useful to understand subtleties or implement a Python interpreter, not for common use. The library reference is, well, a reference manual to use when you already know the modules. Another resource with more examples is http://www.doughellmann.com/PyMOTW/articles/. SilentGhost gave you the link to the official tutorial; more links are given on http://wiki.python.org/moin/FrontPage. If you still have questions, the python-list mailing list or #python IRC channel are full of nice people with answers. I hope those links get you started in the right direction. Since this report does not contain a specific error in the Python doc, I am closing it. If you want to suggest the policy of adding short examples to all our docs, please bring it up to the python-dev mailing list. ---------- assignee: docs at python -> nosy: +eric.araujo resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 08:57:19 2011 From: report at bugs.python.org (Roberto De Renzi) Date: Tue, 22 Mar 2011 07:57:19 +0000 Subject: [docs] [issue11622] Documentation In-Reply-To: <1300746999.62.0.208266648643.issue11622@psf.upfronthosting.co.za> Message-ID: <4D88565D.4000906@unipr.it> Roberto De Renzi added the comment: Thank you, Eric. My comment was not intended either as a bug (I thought it was the wrong place to post it, but coud not find any better) or a help request. It is just a suggestion. We non professional progammers happen to be writing code for some time, then stopping, then coming back. Therefore we often vaguely know how to do, but do not remember the syntax well. The best solution is a great reference manual. The reference structure makes the info easy to find, then you want a definition, and an example as well, to clarify the usage. I noticed that the present stage of documentation is not ideal, and , to my understanding, what is lacking most is the simple example part. I will post this on the the python-dev list, as you suggest. Thanks again Roberto Il 21/03/2011 11:36 PM, ??ric Araujo ha scritto: > ??ric Araujo added the comment: > > Welcome to Python! We hope you???ll have a great time using it. > > The language reference is useful to understand subtleties or implement a Python interpreter, not for common use. The library reference is, well, a reference manual to use when you already know the modules. Another resource with more examples is http://www.doughellmann.com/PyMOTW/articles/. SilentGhost gave you the link to the official tutorial; more links are given on http://wiki.python.org/moin/FrontPage. If you still have questions, the python-list mailing list or #python IRC channel are full of nice people with answers. > > I hope those links get you started in the right direction. Since this report does not contain a specific error in the Python doc, I am closing it. > > If you want to suggest the policy of adding short examples to all our docs, please bring it up to the python-dev mailing list. > > ---------- > assignee: docs at python -> > nosy: +eric.araujo > resolution: -> works for me > stage: -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- Added file: http://bugs.python.org/file21331/roberto_derenzi.vcf _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: roberto_derenzi.vcf Type: text/x-vcard Size: 385 bytes Desc: not available URL: From report at bugs.python.org Tue Mar 22 10:08:47 2011 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 22 Mar 2011 09:08:47 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: <1300784927.66.0.124561443473.issue11625@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 14:13:58 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 22 Mar 2011 13:13:58 +0000 Subject: [docs] [issue11622] Documentation In-Reply-To: <1300717593.92.0.639893924649.issue11622@psf.upfronthosting.co.za> Message-ID: <1300799638.96.0.561355413219.issue11622@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file21331/roberto_derenzi.vcf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 15:41:23 2011 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 22 Mar 2011 14:41:23 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> New submission from Eli Bendersky : The comment string above the implementation of _PyBytes_FromStringAndSize in Objects/bytesobject.c starts with: /* For both PyBytes_FromString() and PyBytes_FromStringAndSize(), the parameter `size' denotes number of characters to allocate, not counting any null terminating character. This is misleading since PyBytes_FromString() has no 'size' parameter. The problem also exists for PyString in Python 2.x ---------- assignee: docs at python components: Documentation keywords: easy messages: 131750 nosy: docs at python, eli.bendersky priority: low severity: normal status: open title: misleading comment on PyBytes_FromStringAndSize versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 15:43:20 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Mar 2011 14:43:20 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300805000.19.0.0275003205488.issue11634@psf.upfronthosting.co.za> STINNER Victor added the comment: Could you write a patch to fix this comment? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 17:09:31 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 16:09:31 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset a56cd7aeac5e by Raymond Hettinger in branch '2.7': Issue #11625: Fix Typo http://hg.python.org/cpython/rev/a56cd7aeac5e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 17:19:14 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 16:19:14 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 3aec82018a18 by Raymond Hettinger in branch '3.1': Issue #11625: Fix Typo http://hg.python.org/cpython/rev/3aec82018a18 New changeset 461e5c60fbdf by Raymond Hettinger in branch '3.2': Issue #11625: Fix Typo http://hg.python.org/cpython/rev/461e5c60fbdf New changeset 8b633c55ac7a by Raymond Hettinger in branch 'default': Issue #11625: Fix Typo http://hg.python.org/cpython/rev/8b633c55ac7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 17:22:22 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 16:22:22 +0000 Subject: [docs] [issue11625] Typo in collections.abc docs In-Reply-To: <1300728857.46.0.900552872608.issue11625@psf.upfronthosting.co.za> Message-ID: <1300810942.37.0.52890992249.issue11625@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 19:52:08 2011 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 22 Mar 2011 18:52:08 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300819928.03.0.529019429292.issue11634@psf.upfronthosting.co.za> Eli Bendersky added the comment: Sure, I just wanted confirmation from another dev that it's indeed an error and I'm not missing anything. I suppose the fix is just replace "for both PyBytes_FromString() and PyBytes_FromStringAndSize()" with just "for PyBytes_FromStringAndSize()". I'll commit the change to all relevant branches. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Mar 22 20:42:12 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 20:42:12 +0100 Subject: [docs] MOBI format for DOCs In-Reply-To: References: Message-ID: Hello Ken, On Tue, Mar 8, 2011 at 22:13, Ken Langer wrote: > If possible, could you include the docs in MOBI format? Since Python 3.2, we started to ship documentation in EPUB format, meant to be read by mobile devices. AFAIK MOBI is used only on Palm devices, and it seems some are also able to read EPUB. What's exactly the reason for your request. It seems Palm is going to be less and less used, do we really need this format? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Mar 22 21:10:57 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:10:57 +0100 Subject: [docs] MOBI format for DOCs In-Reply-To: References: Message-ID: On Tue, Mar 22, 2011 at 20:47, Nick Efford wrote: > On Tue, 22 Mar 2011, Sandro Tosi wrote: > >> Since Python 3.2, we started to ship documentation in EPUB format, >> meant to be read by mobile devices. AFAIK MOBI is used only on Palm >> devices, and it seems some are also able to read EPUB. What's exactly >> the reason for your request. It seems Palm is going to be less and >> less used, do we really need this format? > > Sandro, > > MOBI is the native format for the Amazon Kindle. Oh, I didn't know that, and from what I read on Internet, Kindle doesn't support EPUB. >?Given the > popularity of this device, I think it might be a good idea to > support MOBI alongside EPUB. I agree, so we just need to make Sphinx (our doc generator) support MOBI - Georg, is this already in program or brand new request? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Mar 22 21:16:04 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:16:04 +0100 Subject: [docs] HTMLParser documentation bug In-Reply-To: References: Message-ID: Hi tomo, On Mon, Mar 21, 2011 at 07:23, tomo cocoa wrote: > http://docs.python.org/library/htmlparser.html > > There is duplicated word "be" in the explanation of the unknown_decl method. > >> It is sometimes useful to be be overridden This was fixed yesterday in 68797:ed8eefa6d57c . Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue Mar 22 21:22:18 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Mar 2011 20:22:18 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300825338.68.0.334550495358.issue11634@psf.upfronthosting.co.za> STINNER Victor added the comment: PyObject * PyBytes_FromString(const char *str) { register size_t size; ... size = strlen(str); ... } PyBytes_FromString() does compute the input string size using strlen(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 21:25:38 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 20:25:38 +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: <1300825538.69.0.201403360142.issue11260@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Mar 22 21:32:25 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:32:25 +0100 Subject: [docs] typo on http://docs.python.org/tutorial/classes.html In-Reply-To: References: Message-ID: Hi Mark, thanks for your email. On Fri, Mar 18, 2011 at 19:16, Mark Zollinger wrote: > On page http://docs.python.org/tutorial/classes.html, the text "where one at least one of the parent classes" should probably be changed to "where at least one of the parent classes". (too many "one"s) we've just added this to a set of typos that will be fixed all together. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Mar 22 21:41:40 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:41:40 +0100 Subject: [docs] Broken link in Python manual In-Reply-To: References: Message-ID: Hi ?ukasz, thanks for your email. 2011/3/9 ?ukasz Czerwi?ski : > Hello, > In the beginning > of?http://docs.python.org/library/xmlrpclib.html#multicall-objects?there is > a broken link in sentence: >> >> In?http://www.xmlrpc.com/discuss/msgReader%241208, Indeed it's broken, and in general http://www.xmlrpc.com/discuss . I wrote to the webmaster, let's see how it goes. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Mar 22 21:45:09 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:45:09 +0100 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: <4D79CF9A.EB2A.0033.0@central.unicor.gov> References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> Message-ID: Hello Manuel, On Fri, Mar 11, 2011 at 13:30, Manuel Martinez wrote: > Pages 116 - 118 of the 3.2 Library Reference is damaged. Can you please tell us what is teh file you're watching, and how you obtained it? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Mar 22 21:54:39 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Mar 2011 21:54:39 +0100 Subject: [docs] 4.4. break and continue Statements, and else Clauses on Loops In-Reply-To: References: Message-ID: Hi, On Fri, Mar 11, 2011 at 18:01, Timox@ wrote: > Hi! > > In v2.7 and future versions of Python tutorial. > > > Python 3.1.3 (r313:86834, Mar ?8 2011, 08:21:55) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> for n in range(2, 10): > > ... ? ? for x in range(2, n): ? # !!! if n = 9 and x = 2 then the output of > ... ? ? ? ? ? ? if n % x == 0: ? ?# the condition without further > verification from the list!!! > ... ? ? ? ? ? ? ? ? ? ? print(n, 'equals', x, '*', n//x) > ... ? ? ? ? ? ? ? ? ? ? break > ... ? ? ? ? ? ? else: > ... ? ? ? ? ? ? ? ? ? ? print(n, 'is a prime number') you cut&pasted the code wrongly; you have: for n in range(2, 10): for x in range(2, n): if n % x == 0: print(n, 'equals', x, '*', n//x) break else: print(n, 'is a prime number') while it actually is: for n in range(2, 10): for x in range(2, n): if n % x == 0: print(n, 'equals', x, '*', n//x) break else: print(n, 'is a prime number') (note the 'else' is relative to 'for' not 'if'). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue Mar 22 22:45:41 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Tue, 22 Mar 2011 21:45:41 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> New submission from Santoso Wijaya : For example, the function `fileConfig` is listed in the documentation [1] as `logging.fileConfig`. This was a surprise for me when trying it gave me an AttributeError. Only after reading the source code that I found out this function is defined in the `logging.config` module, and must be referenced as such. [1] http://docs.python.org/library/logging.html#logging.fileConfig ---------- assignee: docs at python components: Documentation messages: 131791 nosy: docs at python, santa4nt priority: normal severity: normal status: open title: Documentation for *Config functions in logging module should be in logging.config versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 22:46:09 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Tue, 22 Mar 2011 21:46:09 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: <1300830369.81.0.925714296197.issue11639@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 22:47:03 2011 From: report at bugs.python.org (Santoso Wijaya) Date: Tue, 22 Mar 2011 21:47:03 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: <1300830423.27.0.204421324138.issue11639@psf.upfronthosting.co.za> Changes by Santoso Wijaya : ---------- versions: -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:23:42 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 22:23:42 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1300832622.07.0.636512450776.issue10225@psf.upfronthosting.co.za> Raymond Hettinger added the comment: These are fine except for the changes to collections.py. Please leave the deployed code for named tuple as-is. Doctest may have issues with trailing whitespace, but that is doctest's problem, not named tuple's. ---------- assignee: rhettinger -> belopolsky resolution: -> accepted versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:29:29 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 22:29:29 +0000 Subject: [docs] [issue10988] Descriptor protocol documentation for super bindings is incorrect In-Reply-To: <1295807885.2.0.206629380861.issue10988@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 50cc60852a76 by Raymond Hettinger in branch '2.7': Issue 10988: fix description of super's descriptor call. http://hg.python.org/cpython/rev/50cc60852a76 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:34:11 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 22:34:11 +0000 Subject: [docs] [issue10988] Descriptor protocol documentation for super bindings is incorrect In-Reply-To: <1295807885.2.0.206629380861.issue10988@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 3e3c46a3dce8 by Raymond Hettinger in branch '3.1': Issue 10988: fix description of super's descriptor call. http://hg.python.org/cpython/rev/3e3c46a3dce8 New changeset 40698c68a32c by Raymond Hettinger in branch '3.2': Issue 10988: fix description of super's descriptor call. http://hg.python.org/cpython/rev/40698c68a32c New changeset 29c8eb206076 by Raymond Hettinger in branch 'default': Issue 10988: fix description of super's descriptor call. http://hg.python.org/cpython/rev/29c8eb206076 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:34:41 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 22:34:41 +0000 Subject: [docs] [issue10988] Descriptor protocol documentation for super bindings is incorrect In-Reply-To: <1295807885.2.0.206629380861.issue10988@psf.upfronthosting.co.za> Message-ID: <1300833281.07.0.279500633541.issue10988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. Thanks for the bug report. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.3 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:44:13 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Mar 2011 22:44:13 +0000 Subject: [docs] [issue11633] regression: print buffers output when end='' In-Reply-To: <1300790242.96.0.630463287349.issue11633@psf.upfronthosting.co.za> Message-ID: <1300833853.79.0.644803146039.issue11633@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Python 3.2, WinXP, IDLE edit window, F5 Run: 'Processing ...' appears immediately, 'Done' 3 sec later. The only difference between printtest2/3 is where 'Done' appears. Behavior is same when pasting into interactive interpreter -- has to be since the first two prints are executed before the sleep. I presume interpreter flushes before or after printing next prompt. IDLE must do same even when running from editor even when not printing prompts. Anatoly, I gather you ran files by some other method. I disagree with closing this yet. Print was designed to be a simplified wrapper around sys.stdout.write (and now, any file.write). Requiring that one import sys to use print goes against that. I have always experienced and expected Python's print to screen to be immediately visible. I thought that was pretty standard in other languages with a print-to-screen separate from general file-write. When printing to screen, efficiency is, I believe, a non-issue. Writing to files or the net is a whole different ballgame. Amaury's idea of checking isatty seems good. Otherwise, print should gain an optional, no-default flush=True/False parameter (no default because behavior currently varies.) Until then, non-flushing *should* be documented. The current doc for print does not seem to address the issue either way. Amaury, I though 'run from console' more or less meant 'isatty', so I am not sure I understand your comment. ---------- assignee: -> docs at python components: +Documentation, Library (Lib) nosy: +docs at python, terry.reedy resolution: invalid -> status: closed -> open type: -> feature request versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:53:01 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 22:53:01 +0000 Subject: [docs] [issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate In-Reply-To: <1293554918.75.0.546382725998.issue10787@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 42816be02b9b by Raymond Hettinger in branch '2.7': Issue 10787: Document the probability density function for random.gammavariate. http://hg.python.org/cpython/rev/42816be02b9b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 22 23:57:29 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 22:57:29 +0000 Subject: [docs] [issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate In-Reply-To: <1293554918.75.0.546382725998.issue10787@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset e880020e7e6a by Raymond Hettinger in branch '3.1': Issue 10787: Document the probability density function for random.gammavariate. http://hg.python.org/cpython/rev/e880020e7e6a New changeset f882b284d260 by Raymond Hettinger in branch '3.2': Issue 10787: Document the probability density function for random.gammavariate. http://hg.python.org/cpython/rev/f882b284d260 New changeset a892a0dd8190 by Raymond Hettinger in branch 'default': Issue 10787: Document the probability density function for random.gammavariate. http://hg.python.org/cpython/rev/a892a0dd8190 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:09:28 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 23:09:28 +0000 Subject: [docs] [issue10787] [random.gammavariate] Add the expression of the distribution in a comprehensive form for random.gammavariate In-Reply-To: <1293554918.75.0.546382725998.issue10787@psf.upfronthosting.co.za> Message-ID: <1300835368.41.0.38852069829.issue10787@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:27:16 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 22 Mar 2011 23:27:16 +0000 Subject: [docs] [issue11633] regression: print buffers output when end='' In-Reply-To: <1300790242.96.0.630463287349.issue11633@psf.upfronthosting.co.za> Message-ID: <1300836436.63.0.0789683235239.issue11633@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The attached patch calls "if file.isatty(): file.flush()" at the end of the print function: - only when an "end" argument was specified - errors in file.isatty() are ignored (and then no flush occurs) ---------- keywords: +patch Added file: http://bugs.python.org/file21349/print-flush.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:28:20 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Mar 2011 23:28:20 +0000 Subject: [docs] [issue10771] descriptor protocol documentation has two different definitions of "owner" class In-Reply-To: <1293253554.32.0.921681514845.issue10771@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset b31606ea7ce3 by Raymond Hettinger in branch '3.1': Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents. http://hg.python.org/cpython/rev/b31606ea7ce3 New changeset 4dfbf8c8f4e5 by Raymond Hettinger in branch '3.2': Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents. http://hg.python.org/cpython/rev/4dfbf8c8f4e5 New changeset 5aaa71591dda by Raymond Hettinger in branch 'default': Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents. http://hg.python.org/cpython/rev/5aaa71591dda ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:29:08 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Mar 2011 23:29:08 +0000 Subject: [docs] [issue10771] descriptor protocol documentation has two different definitions of "owner" class In-Reply-To: <1293253554.32.0.921681514845.issue10771@psf.upfronthosting.co.za> Message-ID: <1300836548.07.0.9545351507.issue10771@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:29:18 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 22 Mar 2011 23:29:18 +0000 Subject: [docs] [issue11633] regression: print buffers output when end='' In-Reply-To: <1300790242.96.0.630463287349.issue11633@psf.upfronthosting.co.za> Message-ID: <1300836558.01.0.245573040586.issue11633@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Python 3.2, WinXP, IDLE edit window, F5 Run: > 'Processing ...' appears immediately, 'Done' 3 sec later. Terry, IDLE is completely different, its sys.stdout completely bypasses the new io stack, and there is no buffering... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 00:55:11 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 22 Mar 2011 23:55:11 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> New submission from ?ric Araujo : Some files like site.rst use ?X.Y? to refer to the Python version, but Sphinx helpfully provides a |version| construct that can be replaced by the current version at build time. ---------- assignee: docs at python components: Documentation keywords: easy messages: 131816 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: Use |version| instead of X.Y in the doc versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:00:06 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 23 Mar 2011 00:00:06 +0000 Subject: [docs] [issue11644] 2to3 example.py is not a Python 2.x file In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300838406.79.0.561749171235.issue11644@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:05:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 23 Mar 2011 00:05:32 +0000 Subject: [docs] [issue11644] 2to3 example.py is not a Python 2.x file In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300838731.99.0.837803098499.issue11644@psf.upfronthosting.co.za> ?ric Araujo added the comment: Your title is untrue: This example code from the 2.6 docs is valid 2.6 code. I can?t find a problem with that. ---------- nosy: +eric.araujo resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:10:20 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 Mar 2011 00:10:20 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1300839020.4.0.553281132344.issue11643@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:30:42 2011 From: report at bugs.python.org (Eric Smith) Date: Wed, 23 Mar 2011 00:30:42 +0000 Subject: [docs] [issue11644] 2to3 example.py is not a Python 2.x file In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300840242.36.0.389136266762.issue11644@psf.upfronthosting.co.za> Eric Smith added the comment: Plus, it's recommended to move to 2.6 or 2.7 before trying to port to 3.x. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:32:09 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 23 Mar 2011 00:32:09 +0000 Subject: [docs] [issue11644] 2to3 example.py is not a Python 2.x file In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300840329.63.0.299137792902.issue11644@psf.upfronthosting.co.za> anatoly techtonik added the comment: Then the docs should say that this is the 2.6 code, not 2.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:34:51 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Mar 2011 00:34:51 +0000 Subject: [docs] [issue10610] Correct the float(), int() and complex() documentation In-Reply-To: <1291329082.54.0.0152970985117.issue10610@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6853b480e388 by Raymond Hettinger in branch '3.1': Issue #10610: Document that int(), float(), and complex() accept numeric literals with the Nd property. http://hg.python.org/cpython/rev/6853b480e388 New changeset a1e685ceb3bd by Raymond Hettinger in branch '3.2': Issue #10610: Document that int(), float(), and complex() accept numeric literals with the Nd property. http://hg.python.org/cpython/rev/a1e685ceb3bd New changeset 997271aebd69 by Raymond Hettinger in branch 'default': Issue #10610: Document that int(), float(), and complex() accept numeric literals with the Nd property. http://hg.python.org/cpython/rev/997271aebd69 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:35:23 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Mar 2011 00:35:23 +0000 Subject: [docs] [issue10610] Correct the float(), int() and complex() documentation In-Reply-To: <1291329082.54.0.0152970985117.issue10610@psf.upfronthosting.co.za> Message-ID: <1300840523.81.0.676653363925.issue10610@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:35:30 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 23 Mar 2011 00:35:30 +0000 Subject: [docs] [issue11644] 2to3 example.py is not a Python 2.x file In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300840530.72.0.150572514026.issue11644@psf.upfronthosting.co.za> anatoly techtonik added the comment: I can't find where it is recommended to move code to Python 2.7 before porting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:36:34 2011 From: report at bugs.python.org (Eric Smith) Date: Wed, 23 Mar 2011 00:36:34 +0000 Subject: [docs] [issue11644] 2to3 documentation should mention that the sample file requires 2.6 or better In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300840594.82.0.379113601829.issue11644@psf.upfronthosting.co.za> Eric Smith added the comment: I'll agree that the documentation could mention that. Reopening. Patches accepted. ---------- components: -2to3 (2.x to 3.0 conversion tool) resolution: invalid -> stage: committed/rejected -> status: closed -> open title: 2to3 example.py is not a Python 2.x file -> 2to3 documentation should mention that the sample file requires 2.6 or better _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:39:17 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 23 Mar 2011 00:39:17 +0000 Subject: [docs] [issue11644] 2to3 documentation should mention that the sample file requires 2.6 or better In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1300840757.25.0.195750444481.issue11644@psf.upfronthosting.co.za> ?ric Araujo added the comment: http://docs.python.org/release/3.2/whatsnew/3.0#porting-to-python-3-0 ---------- resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 01:52:32 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 23 Mar 2011 00:52:32 +0000 Subject: [docs] [issue10771] descriptor protocol documentation has two different definitions of "owner" class In-Reply-To: <1293253554.32.0.921681514845.issue10771@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f28565867d22 by Raymond Hettinger in branch '2.7': Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents. http://hg.python.org/cpython/rev/f28565867d22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 04:48:57 2011 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 23 Mar 2011 03:48:57 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300852137.69.0.872837318548.issue11634@psf.upfronthosting.co.za> Eli Bendersky added the comment: Yes it does, but the comment says something about "parameter 'size'" which is clearly absent from the function signature of PyBytes_FromString. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 05:31:54 2011 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 23 Mar 2011 04:31:54 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300854714.09.0.0141155597328.issue11634@psf.upfronthosting.co.za> Eli Bendersky added the comment: I propose the attached patch (for the latest default branch). It simply removes the first paragraph of that comment, since it's misleading and redundant. The *last* paragraph explains the same thing just in a clear and correct way (except that it also has a small typo the patch fixes :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 05:34:02 2011 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 23 Mar 2011 04:34:02 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1300854842.69.0.0762599739423.issue11634@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- keywords: +patch Added file: http://bugs.python.org/file21354/issue11634.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 10:33:23 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 23 Mar 2011 09:33:23 +0000 Subject: [docs] [issue11648] openlog()s 'logopt' keyword broken in syslog module In-Reply-To: <1300848156.85.0.89651150439.issue11648@psf.upfronthosting.co.za> Message-ID: <1300872803.36.0.599266198543.issue11648@psf.upfronthosting.co.za> Georg Brandl added the comment: Now that keyword support was introduced, I'd rather fix the documentation to use the new name. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 12:12:56 2011 From: report at bugs.python.org (Eric Smith) Date: Wed, 23 Mar 2011 11:12:56 +0000 Subject: [docs] [issue11648] openlog()s 'logopt' keyword broken in syslog module In-Reply-To: <1300848156.85.0.89651150439.issue11648@psf.upfronthosting.co.za> Message-ID: <1300878776.21.0.127437450571.issue11648@psf.upfronthosting.co.za> Eric Smith added the comment: I agree with Georg, unfortunately. And I say "unfortunately" because neither "logopt" nor "logoption" is a good name. The "log" part adds nothing. The man page for syslog calls this "option", which would be my preferred name. But changing it now would be a hassle. Also, we clearly need a test for this, since apparently none failed when it was changed to the longer name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 23 13:29:31 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 23 Mar 2011 12:29:31 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1300883371.1.0.631842213042.issue11230@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Mar 24 09:13:51 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 24 Mar 2011 09:13:51 +0100 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: <4D89F610.EB2A.0033.0@central.unicor.gov> References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> <4D89F610.EB2A.0033.0@central.unicor.gov> Message-ID: Hi Manuel, On Wed, Mar 23, 2011 at 18:30, Manuel Martinez wrote: > Hello Sandro, > > The damaged pages are in the Python 3.2 Library Reference PDF. The HTML > version looks ok. > I downloaded it a couple of times and the same problem occurred in the same > pages. Ok now I see: it's the table that gets too hide, over the page limit. I'll try to give it a look at fixing it asap. 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 Thu Mar 24 19:09:04 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 24 Mar 2011 19:09:04 +0100 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> <4D89F610.EB2A.0033.0@central.unicor.gov> Message-ID: Hi Georg, sorry to bring you in :) On Thu, Mar 24, 2011 at 09:13, Sandro Tosi wrote: > Hi Manuel, > > On Wed, Mar 23, 2011 at 18:30, Manuel Martinez > wrote: >> Hello Sandro, >> >> The damaged pages are in the Python 3.2 Library Reference PDF. The HTML >> version looks ok. >> I downloaded it a couple of times and the same problem occurred in the same >> pages. > > Ok now I see: it's the table that gets too hide, over the page limit. > I'll try to give it a look at fixing it asap. The problem is: the codec table has long text, and latex longtables tries to write them on a single line, but that generates ugly tables, going over the page border. It seems the easiest way (from latex POV) is to use columns of "type" p{length}, but it doesn't seem to allow dynamic length. Did you ever face this kind of problem? is there something inside sphinx that could help us resolve this problem? Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Thu Mar 24 20:03:52 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 24 Mar 2011 19:03:52 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1300993432.23.0.754717533817.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Please leave the deployed code for named tuple as-is. Doctest may > have issues with trailing whitespace, but that is doctest's problem, > not named tuple's. I am curious, what was the reason to add trailing whitespace in the named tuple template? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 24 20:15:37 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Mar 2011 19:15:37 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1300994137.07.0.793699407423.issue10225@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I am curious, what was the reason to add > trailing whitespace in the named tuple template? To make it hard to doctest ;-) I had a thought that it made the template more readable, but the better solution was to just use real newlines instead of '\n'. The template has been considerably beautified for python 3.3, but I don't want to go back in time and muck with stable code just to accommodate adding a doctest in old docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 24 21:51:24 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Mar 2011 20:51:24 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset a729dfdbd24b by Eli Bendersky in branch 'default': Issue #11634: Remove misleading paragraph from a comment http://hg.python.org/cpython/rev/a729dfdbd24b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 24 21:56:50 2011 From: report at bugs.python.org (Roundup Robot) Date: Thu, 24 Mar 2011 20:56:50 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 44749e501982 by Eli Bendersky in branch '2.7': Issue #11634: Remove misleading paragraph from a comment http://hg.python.org/cpython/rev/44749e501982 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 24 21:57:54 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 24 Mar 2011 20:57:54 +0000 Subject: [docs] [issue11634] misleading comment on PyBytes_FromStringAndSize In-Reply-To: <1300804882.95.0.132860096.issue11634@psf.upfronthosting.co.za> Message-ID: <1301000274.39.0.6055207817.issue11634@psf.upfronthosting.co.za> Eli Bendersky added the comment: Patch reviewed by Nick Coghlan and committed ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 24 22:27:32 2011 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 24 Mar 2011 21:27:32 +0000 Subject: [docs] [issue9056] Adding additional level of bookmarks and section numbers in python pdf documents. In-Reply-To: <1277175637.31.0.472126376822.issue9056@psf.upfronthosting.co.za> Message-ID: <1301002052.71.0.0844828855082.issue9056@psf.upfronthosting.co.za> Sandro Tosi added the comment: The number of items in the bookmark is controlled by \setcounter{tocdepth}{1} in sphinxmanual.cls, that's included in every latex file (the source of the PDF documentation). The cls file is coming directly from sphinx, so Georg: what is the purpose of limiting the bookmarks depth to 1? can we consider (somehow) to special-case if for python? ---------- nosy: +georg.brandl, sandro.tosi versions: +Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 09:42:54 2011 From: report at bugs.python.org (Graham Wideman) Date: Fri, 25 Mar 2011 08:42:54 +0000 Subject: [docs] [issue11669] Clarify Lang Ref "Compound statements" footnote In-Reply-To: <1301042574.67.0.975748752077.issue11669@psf.upfronthosting.co.za> Message-ID: <1301042574.67.0.975748752077.issue11669@psf.upfronthosting.co.za> New submission from Graham Wideman : In Language Ref section 7 "Compound Statements": http://docs.python.org/release/3.1.3/reference/compound_stmts.html there's a footnote regarding what happens to unhandled exceptions in a try-except statement: [1] The exception is propagated to the invocation stack only if there is no *finally* clause that negates the exception. This is very unclearly worded, especially since the reader in need of this footnote is probably familiar with the *except* clause being the one to "negate" an exception, and may well think this footnote is in error. This footnote could provide a more convincing explanation: [1] The exception is propagated to the invocation stack unless there is a finally clause which happens to raise another exception. That new exception causes the old exception to be lost. ---------- assignee: docs at python components: Documentation messages: 132072 nosy: docs at python, gwideman priority: normal severity: normal status: open title: Clarify Lang Ref "Compound statements" footnote type: behavior versions: Python 2.5, 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 Fri Mar 25 11:08:19 2011 From: report at bugs.python.org (Larry Hastings) Date: Fri, 25 Mar 2011 10:08:19 +0000 Subject: [docs] [issue11670] configparser read_file now iterates over f, docs still say it calls readline In-Reply-To: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> Message-ID: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> New submission from Larry Hastings : The documentation for configparser.RawConfigParser.read_file() states: "Read and parse configuration data from the file or file-like object in f (only the readline() method is used)." This was true in Python 3.1 and before. However in 3.2 the implementation of read_file changed. It no longer calls readline(). Instead, it iterates over the file object. Whoever made this change neglected to * fix the docs, or apparently * tell anybody. I've got the commit bit, so I'd be happy to fix this. I'd like to add it to the What's New In Python 3.2 as well; there's a section about configparser changes that would be perfect. Is it permissible to change the What's New document ex post facto like this? (Adding rhettinger so he can answer this.) ---------- assignee: docs at python components: Documentation messages: 132075 nosy: docs at python, larry, rhettinger priority: low severity: normal stage: needs patch status: open title: configparser read_file now iterates over f, docs still say it calls readline type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 11:13:20 2011 From: report at bugs.python.org (Larry Hastings) Date: Fri, 25 Mar 2011 10:13:20 +0000 Subject: [docs] [issue11670] configparser read_file now iterates over f, docs still say it calls readline In-Reply-To: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> Message-ID: <1301047999.93.0.817480210345.issue11670@psf.upfronthosting.co.za> Larry Hastings added the comment: By the same token, readfp is now deprecate in favor of the new spelling read_file. That change *is* mentioned in configparser. If I'm touching What's New In Python 3.2, mind if I add a mention of that too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 16:28:50 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 15:28:50 +0000 Subject: [docs] [issue8982] argparse docs cross reference Namespace as a class but the Namespace class is not documented In-Reply-To: <1276350269.78.0.816004374409.issue8982@psf.upfronthosting.co.za> Message-ID: <1301066930.16.0.423517202883.issue8982@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 16:50:09 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Mar 2011 15:50:09 +0000 Subject: [docs] [issue11670] configparser read_file now iterates over f, docs still say it calls readline In-Reply-To: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> Message-ID: <1301068209.24.0.476227219469.issue11670@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this is worthy of being in whatsnew. Feel free to update the other docs though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 17:08:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 16:08:53 +0000 Subject: [docs] [issue11670] configparser read_file now iterates over f, docs still say it calls readline In-Reply-To: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> Message-ID: <1301069333.95.0.742722192002.issue11670@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: docs at python -> lukasz.langa nosy: +lukasz.langa versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 17:10:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 16:10:34 +0000 Subject: [docs] [issue11669] Clarify Lang Ref "Compound statements" footnote In-Reply-To: <1301042574.67.0.975748752077.issue11669@psf.upfronthosting.co.za> Message-ID: <1301069434.29.0.584844329108.issue11669@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +needs review, patch stage: -> patch review versions: -Python 2.5, Python 2.6, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 17:50:26 2011 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 25 Mar 2011 16:50:26 +0000 Subject: [docs] [issue11670] configparser read_file now iterates over f, docs still say it calls readline In-Reply-To: <1301047699.5.0.476245530251.issue11670@psf.upfronthosting.co.za> Message-ID: <1301071826.31.0.723707143468.issue11670@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Ouch, this would be my fault. I agree with Raymond, at this point I think we should only update the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 18:54:50 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 25 Mar 2011 17:54:50 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1301075690.32.0.336390166852.issue10617@psf.upfronthosting.co.za> Ezio Melotti added the comment: I put the list under the table and grouped a few more ABCs. If this patch is OK I'll commit it. ---------- Added file: http://bugs.python.org/file21394/issue10617-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 19:11:52 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 25 Mar 2011 18:11:52 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1301076712.35.0.849909706295.issue10617@psf.upfronthosting.co.za> Changes by Ezio Melotti : Added file: http://bugs.python.org/file21395/10617-2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 19:22:18 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 18:22:18 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1301077338.49.0.950257229684.issue10617@psf.upfronthosting.co.za> ?ric Araujo added the comment: What about making the class names in the table not links? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 20:10:08 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 19:10:08 +0000 Subject: [docs] =?utf-8?q?=5Bissue11644=5D_Cross-link_2to3_documentation?= =?utf-8?q?=2C_what=E2=80=99s_new_and_pyporting_howto?= In-Reply-To: <1300838396.67.0.863213339568.issue11644@psf.upfronthosting.co.za> Message-ID: <1301080208.57.0.769388823405.issue11644@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also the fifth piece in http://docs.python.org/release/3.2/howto/pyporting#universal-bits-of-advice Resources are here, but lack links. ---------- resolution: out of date -> stage: -> needs patch status: pending -> open title: 2to3 documentation should mention that the sample file requires 2.6 or better -> Cross-link 2to3 documentation, what?s new and pyporting howto versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 25 22:07:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Mar 2011 21:07:53 +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: <1301087273.74.0.187684652247.issue8617@psf.upfronthosting.co.za> ?ric Araujo added the comment: Tarek, if you don?t have time for a patch, I am interested in making one. ---------- nosy: +eric.araujo title: Non-existent variables documented -> Better document user site-packages in site module doc versions: +Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 01:53:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 26 Mar 2011 00:53:45 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> New submission from ?ric Araujo : Python 2 has a -b command-line option which is undocumented. It is used by the warnings machinery to decide to warn about (-b) or raise an error (-bb) if someone uses str(bytes) or str(buffer) (explanation courtesy of grep and Python/pythonrun.c). ---------- assignee: docs at python components: Documentation keywords: easy messages: 132195 nosy: docs at python, eric.araujo priority: normal severity: normal stage: needs patch status: open title: -b option undocumented versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 02:05:45 2011 From: report at bugs.python.org (R. David Murray) Date: Sat, 26 Mar 2011 01:05:45 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301101545.9.0.171132672565.issue11681@psf.upfronthosting.co.za> R. David Murray added the comment: Are you sure? (see issue 10471). I don't see how -b could do anything in python2, since bytes and string are the same there (and, indeed, from command line experimentation it doesn't seem to). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 02:08:35 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 26 Mar 2011 01:08:35 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301101715.24.0.427747077258.issue11681@psf.upfronthosting.co.za> ?ric Araujo added the comment: The code definitely is in 2.7. Python/_warnings.c:861: if (Py_BytesWarningFlag > 1) Python/_warnings.c:863: else if (Py_BytesWarningFlag) Python/_warnings.c:867: PyList_SET_ITEM(filters, pos++, create_filter(PyExc_BytesWarning, Python/sysmodule.c:1257: SetFlag(Py_BytesWarningFlag); Python/pythonrun.c:81:int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */ Include/pydebug.h:14:PyAPI_DATA(int) Py_BytesWarningFlag; Include/pyerrors.h:178:PyAPI_DATA(PyObject *) PyExc_BytesWarning; Modules/main.c:285: Py_BytesWarningFlag++; Objects/bytearrayobject.c:1003: if (Py_BytesWarningFlag) { Objects/bytearrayobject.c:1004: if (PyErr_WarnEx(PyExc_BytesWarning, Objects/bytearrayobject.c:1028: if (Py_BytesWarningFlag && op == Py_EQ) { Objects/bytearrayobject.c:1029: if (PyErr_WarnEx(PyExc_BytesWarning, Objects/exceptions.c:2018: * BytesWarning extends Warning Objects/exceptions.c:2020:SimpleExtendsException(PyExc_Warning, BytesWarning, Objects/exceptions.c:2110: PRE_INIT(BytesWarning) Objects/exceptions.c:2178: POST_INIT(BytesWarning) Lib/warnings.py:399: simplefilter(bytes_action, category=BytesWarning, append=1) Lib/test/test_bytes.py:25: with test.test_support.check_warnings(('', BytesWarning)): Lib/test/exception_hierarchy.txt:50: +-- BytesWarning Include/pydebug.h:14:PyAPI_DATA(int) Py_BytesWarningFlag; Include/pyerrors.h:178:PyAPI_DATA(PyObject *) PyExc_BytesWarning; Doc/library/warnings.rst:164:* :exc:`BytesWarning` is ignored unless the :option:`-b` option is given once or ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 02:12:01 2011 From: report at bugs.python.org (R. David Murray) Date: Sat, 26 Mar 2011 01:12:01 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301101921.76.0.438312087535.issue11681@psf.upfronthosting.co.za> R. David Murray added the comment: rdmurray at hey:~/python/p27>cat temp.py x = bytes('abc') print x print str(x) rdmurray at hey:~/python/p27>./python -bb temp.py abc abc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 02:17:57 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 26 Mar 2011 01:17:57 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301102277.2.0.79774475881.issue11681@psf.upfronthosting.co.za> ?ric Araujo added the comment: test_bytes has a branch for -b and passes without it, with -b and with -bb. I really don?t know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 14:40:40 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 26 Mar 2011 13:40:40 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1301146840.29.0.570416261396.issue10665@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW latin-1 chars are fine (e.g. ? or ?). The right command to build the pdfs is `make latex` and then `make all-pdf` in build/latex/. Alexander, now you could also make a remote hg repo, and use it to generate up-to-date patches that can be reviewed directly. I left a few more comments on rietveld about the last patch. ---------- _______________________________________ Python tracker _______________________________________ From Clive.Darke at qa.com Tue Mar 22 14:39:58 2011 From: Clive.Darke at qa.com (Darke, Clive) Date: Tue, 22 Mar 2011 13:39:58 +0000 Subject: [docs] Wrong API name in Python 3.2 doc Python/C API Reference Manual Message-ID: <3DF93BC1E6EB2E45AD12B4DBF431E372C9B02BCABA@CSUKLEEXMB01.corp.group.local> Under "Initialization, Finalization, and Threads", "Non-Python created threads": "OS facilities such as posix_atfork() would need to be used " should be: "OS facilities such as pthread_atfork() would need to be used" (So far as I know there is no such function as posix_atfork()) Forgive me if this report is not in the required format. Clive Darke Product Consultant QA Vale House Pynes Hill Exeter Devon EX2 5AZ Email clive.darke at qa.com Web http://www.qa.com/ ________________________________ QA works with organisations to transform performance through learning. We are dedicated to making our clients more successful through the provision of world-class training services. To find out more visit www.qa.com The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. QA Ltd. Rath House, 55-65 Uxbridge Road, Slough, Berkshire,SL1 1SG. QA Ltd. is a company registered in England with company registration number:2413137 Scanned by ICRITICAL -------------- next part -------------- An HTML attachment was scrubbed... URL: From N.D.Efford at leeds.ac.uk Tue Mar 22 20:47:28 2011 From: N.D.Efford at leeds.ac.uk (Nick Efford) Date: Tue, 22 Mar 2011 19:47:28 +0000 (GMT) Subject: [docs] MOBI format for DOCs In-Reply-To: References: Message-ID: On Tue, 22 Mar 2011, Sandro Tosi wrote: > Since Python 3.2, we started to ship documentation in EPUB format, > meant to be read by mobile devices. AFAIK MOBI is used only on Palm > devices, and it seems some are also able to read EPUB. What's exactly > the reason for your request. It seems Palm is going to be less and > less used, do we really need this format? Sandro, MOBI is the native format for the Amazon Kindle. Given the popularity of this device, I think it might be a good idea to support MOBI alongside EPUB. Nick -- Dr Nick Efford, School of | E: N.D.Efford at leeds.ac.uk Computing, University of | T: +44 113 343 6809 Leeds, Leeds, LS2 9JT, UK | W: http://www.comp.leeds.ac.uk/nde/ --------------------------+----------------------------------------- PGP fingerprint: 6ADF 16C2 4E2D 320B F537 8F3C 402D 1C78 A668 8492 From hilocark at gmail.com Wed Mar 23 08:10:46 2011 From: hilocark at gmail.com (Hiroshi Araki) Date: Wed, 23 Mar 2011 16:10:46 +0900 Subject: [docs] Very small bug in python doc Message-ID: At the first line in the section below http://docs.python.org/library/subprocess.html#convenience-functions > This module also defines two shortcut functions: But I can see three functions there, so this must be: > This module also defines three shortcut functions: Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmartinez at central.unicor.gov Wed Mar 23 18:44:59 2011 From: mmartinez at central.unicor.gov (Manuel Martinez) Date: Wed, 23 Mar 2011 13:44:59 -0400 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> Message-ID: <4D89F95C.EB2A.0033.0@central.unicor.gov> Additional info: 3.2 Library Reference (PDF - US). Manuel Martinez 202 305 3919 mmartinez at central.unicor.gov >>> Sandro Tosi 3/22/2011 4:45 PM >>> Hello Manuel, On Fri, Mar 11, 2011 at 13:30, Manuel Martinez wrote: > Pages 116 - 118 of the 3.2 Library Reference is damaged. Can you please tell us what is teh file you're watching, and how you obtained it? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ?This message is intended for official use and may contain SENSITIVE information. If this message contains SENSITIVE information, it should be properly delivered, labeled, stored, and disposed of according to policy.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmartinez at central.unicor.gov Wed Mar 23 18:30:56 2011 From: mmartinez at central.unicor.gov (Manuel Martinez) Date: Wed, 23 Mar 2011 13:30:56 -0400 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> Message-ID: <4D89F610.EB2A.0033.0@central.unicor.gov> Hello Sandro, The damaged pages are in the Python 3.2 Library Reference PDF. The HTML version looks ok. I downloaded it a couple of times and the same problem occurred in the same pages. Manuel Martinez 202 305 3919 mmartinez at central.unicor.gov >>> Sandro Tosi 3/22/2011 4:45 PM >>> Hello Manuel, On Fri, Mar 11, 2011 at 13:30, Manuel Martinez wrote: > Pages 116 - 118 of the 3.2 Library Reference is damaged. Can you please tell us what is teh file you're watching, and how you obtained it? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ?This message is intended for official use and may contain SENSITIVE information. If this message contains SENSITIVE information, it should be properly delivered, labeled, stored, and disposed of according to policy.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rodneyp at physics.uq.edu.au Wed Mar 23 23:47:28 2011 From: rodneyp at physics.uq.edu.au (Rodney Polkinghorne) Date: Thu, 24 Mar 2011 09:47:28 +1100 Subject: [docs] re.split is underspecified Message-ID: Dear maintainers Refer to < http://docs.python.org/library/re.html#re.split >: Split string by the occurrences of pattern. If capturing parentheses are used ... Please add a second sentence, "If string is empty, return a list of an empty string, not an empty list." Ideally, the reference should specify the value returned by split("aba+", "ababaa"). I suggest you replace "occurences" with "leftmost, longest occurences". Regards Rodney Polkinghorne From mmartinez at central.unicor.gov Thu Mar 24 12:17:49 2011 From: mmartinez at central.unicor.gov (Manuel Martinez) Date: Thu, 24 Mar 2011 07:17:49 -0400 Subject: [docs] Damaged pages in Python 3.2 Library Reference In-Reply-To: References: <4D79CF9A.EB2A.0033.0@central.unicor.gov> <4D89F610.EB2A.0033.0@central.unicor.gov> Message-ID: <4D8AF01D.EB2A.0033.0@central.unicor.gov> No rush - I can pretty much figure it out. Something to do for those slow days. Thanks, Manuel Martinez 202 305 3919 mmartinez at central.unicor.gov >>> Sandro Tosi 3/24/2011 4:13 AM >>> Hi Manuel, On Wed, Mar 23, 2011 at 18:30, Manuel Martinez wrote: > Hello Sandro, > > The damaged pages are in the Python 3.2 Library Reference PDF. The HTML > version looks ok. > I downloaded it a couple of times and the same problem occurred in the same > pages. Ok now I see: it's the table that gets too hide, over the page limit. I'll try to give it a look at fixing it asap. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ?This message is intended for official use and may contain SENSITIVE information. If this message contains SENSITIVE information, it should be properly delivered, labeled, stored, and disposed of according to policy.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Mar 26 19:59:36 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Mar 2011 18:59:36 +0000 Subject: [docs] [issue8982] argparse docs cross reference Namespace as a class but the Namespace class is not documented In-Reply-To: <1276350269.78.0.816004374409.issue8982@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 423b50086b67 by Steven Bethard in branch '3.2': Issue #8982: Improve the documentation for the argparse Namespace object. http://hg.python.org/cpython/rev/423b50086b67 New changeset d832756a82d9 by Steven Bethard in branch 'default': Issue #8982: Improve the documentation for the argparse Namespace object. (Merge from 3.2.) http://hg.python.org/cpython/rev/d832756a82d9 New changeset fe72160ea2a3 by Steven Bethard in branch '2.7': Issue #8982: Improve the documentation for the argparse Namespace object. (Merge from 3.2.) http://hg.python.org/cpython/rev/fe72160ea2a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 20:00:52 2011 From: report at bugs.python.org (Steven Bethard) Date: Sat, 26 Mar 2011 19:00:52 +0000 Subject: [docs] [issue8982] argparse docs cross reference Namespace as a class but the Namespace class is not documented In-Reply-To: <1276350269.78.0.816004374409.issue8982@psf.upfronthosting.co.za> Message-ID: <1301166052.04.0.401207901298.issue8982@psf.upfronthosting.co.za> Steven Bethard added the comment: I fixed the docs here so that they're clearer about what the Namespace object is, and also so that they mention the `vars` approach if you want dict-style access. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 20:08:02 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 26 Mar 2011 19:08:02 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301166482.68.0.658004344467.issue11681@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 20:12:40 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 26 Mar 2011 19:12:40 +0000 Subject: [docs] [issue9056] Adding additional level of bookmarks and section numbers in python pdf documents. In-Reply-To: <1277175637.31.0.472126376822.issue9056@psf.upfronthosting.co.za> Message-ID: <1301166760.8.0.19221387764.issue9056@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 21:52:17 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Mar 2011 20:52:17 +0000 Subject: [docs] [issue9343] Document that argparse "parents" must be fully declared before children In-Reply-To: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset d288666c1d58 by Steven Bethard in branch '3.2': Issue #9343: Document that argparse parent parsers must be configured before their children. http://hg.python.org/cpython/rev/d288666c1d58 New changeset 15e98607555d by Steven Bethard in branch '2.7': Issue #9343: Document that argparse parent parsers must be configured before their children. (Merge from 3.2.) http://hg.python.org/cpython/rev/15e98607555d New changeset 8bdc20468cbc by Steven Bethard in branch 'default': Issue #9343: Document that argparse parent parsers must be configured before their children. (Merge from 3.2.) http://hg.python.org/cpython/rev/8bdc20468cbc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 26 21:53:28 2011 From: report at bugs.python.org (Steven Bethard) Date: Sat, 26 Mar 2011 20:53:28 +0000 Subject: [docs] [issue9343] Document that argparse "parents" must be fully declared before children In-Reply-To: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> Message-ID: <1301172808.46.0.651516671512.issue9343@psf.upfronthosting.co.za> Steven Bethard added the comment: I added some documentation in the "parents" section of the argparse docs. ---------- assignee: docs at python -> bethard resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 06:53:06 2011 From: report at bugs.python.org (William Edward Stuart Clemens) Date: Sun, 27 Mar 2011 04:53:06 +0000 Subject: [docs] [issue11691] sqlite3 Cursor.description doesn't set type_code In-Reply-To: <1301199375.2.0.455501522423.issue11691@psf.upfronthosting.co.za> Message-ID: <1301201586.4.0.598790835379.issue11691@psf.upfronthosting.co.za> William Edward Stuart Clemens added the comment: The patch for version 3.3 has a one line difference. ---------- assignee: -> docs at python components: +Documentation, Library (Lib) -None nosy: +docs at python versions: +Python 3.3 Added file: http://bugs.python.org/file21422/sqlite3_type_code_py33.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 11:57:31 2011 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 27 Mar 2011 09:57:31 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1301219850.94.0.471533856973.issue11681@psf.upfronthosting.co.za> Nick Coghlan added the comment: Even "from __future__ import unicode_literals" doesn't make it do anything. Perhaps Christian merged it by mistake in [5341b30b1812]? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 14:47:53 2011 From: report at bugs.python.org (Steven Bethard) Date: Sun, 27 Mar 2011 12:47:53 +0000 Subject: [docs] [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1301230073.1.0.37794455399.issue1446619@psf.upfronthosting.co.za> Steven Bethard added the comment: The problem still exists in current trunk: The slicing semantics have been removed from the expressions reference: http://docs.python.org/py3k/reference/expressions.html#slicings The datamodel and types sections still have the same equations: http://docs.python.org/py3k/reference/datamodel.html#types http://docs.python.org/py3k/library/stdtypes.html#typesseq Here's a synopsis of the problem, in code: >>> # positive step, works as described >>> i, j, k = 2, 8, 2 >>> range(10)[i:j:k] [2, 4, 6] >>> [i + n * k for n in range(0, (j - i) / k)] [2, 4, 6] >>> [range(10)[i] for i in _] [2, 4, 6] >>> # negative step, does not work as described >>> i, j, k = 10, 0, -2 >>> range(10)[i:j:k] [9, 7, 5, 3, 1] >>> [i + n * k for n in range(0, (j - i) / k)] [10, 8, 6, 4, 2] >>> [range(10)[i] for i in _] Traceback (most recent call last): File "", line 1, in IndexError: list index out of range >>> # actual behavior trims 10 to 9 (is the same as 9:0:-2) >>> # that is, it trims to len(s) - 1, not len(s) >>> range(10)[9:0:-2] [9, 7, 5, 3, 1] I propose to ignore the definition in the datamodel section, since it's talking about extended slicing in general, and doesn't mention anything about negative indices. I propose the attached patch to fix the definition in the types section, which simply changes the statement: If i or j is greater than len(s), use len(s) to say: If *i* or *j* is greater than len(s), use len(s) if *k* is positive, or len(s) - 1 if *k* is negative. ---------- keywords: +patch versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file21428/extended_slicing_docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 14:48:59 2011 From: report at bugs.python.org (Steven Bethard) Date: Sun, 27 Mar 2011 12:48:59 +0000 Subject: [docs] [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1301230139.19.0.435248856023.issue1446619@psf.upfronthosting.co.za> Changes by Steven Bethard : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 14:56:30 2011 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 27 Mar 2011 12:56:30 +0000 Subject: [docs] [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1301230590.91.0.43594207578.issue1446619@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 16:20:43 2011 From: report at bugs.python.org (Steven Bethard) Date: Sun, 27 Mar 2011 14:20:43 +0000 Subject: [docs] [issue9694] argparse: Default Help Message Lists Required Args As Optional In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1301235643.57.0.25546309368.issue9694@psf.upfronthosting.co.za> Steven Bethard added the comment: So it strikes me that there already exists an officially supported way to rename your option groups. Just only create your own option groups (never use the default ones) and only put arguments there, e.g.: ------------------------- temp.py -------------------------- parser = argparse.ArgumentParser(description = 'Do something', add_help=False) flags = parser.add_argument_group('flag arguments') flags.add_argument('-h', '--help', action='help') flags.add_argument('--reqarg', '-r', help='This is required', required=True) flags.add_argument('--optarg','-o', help="This is optional", required=False) args = parser.parse_args() ------------------------------------------------------------ $ python temp.py --help usage: temp.py [-h] --reqarg REQARG [--optarg OPTARG] Do something flag arguments: -h, --help --reqarg REQARG, -r REQARG This is required --optarg OPTARG, -o OPTARG This is optional ------------------------------------------------------------ The documentation for action='help' needs to be added, as pointed out in Issue# 10772. So basically, the API for customizing group names is already there. So I'm changing this to a documentation request - there should be an example in the docs showing how to change the default group names as above. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 20:34:10 2011 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 27 Mar 2011 18:34:10 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301219850.94.0.471533856973.issue11681@psf.upfronthosting.co.za> Message-ID: <4D8F831E.4040200@egenix.com> Marc-Andre Lemburg added the comment: Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Even "from __future__ import unicode_literals" doesn't make it do anything. > > Perhaps Christian merged it by mistake in [5341b30b1812]? It looks more like some parts were left out in the merge by accident: The 2.7 code only raises the warning for bytearrays, not for bytes and buffers, whereas 3.2 issues the warning for all bytes and bytearray (but not buffers; which makes sense, since Python 3 no longer has a text buffer interface). ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 27 23:59:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 27 Mar 2011 21:59:45 +0000 Subject: [docs] [issue10772] Several actions for argparse arguments missing from docs In-Reply-To: <1293327184.11.0.454888760887.issue10772@psf.upfronthosting.co.za> Message-ID: <1301263185.35.0.42739891225.issue10772@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +eric.araujo stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 00:26:47 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Mar 2011 22:26:47 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1301264807.8.0.0384578548259.issue11643@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If the docs literally use "X.Y", so that that can be grepped, then attaching a grep result would make this even easier for someone on Windows without grep. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 00:49:39 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 27 Mar 2011 22:49:39 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1301266179.89.0.969380790127.issue11643@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, this was literal. grep result on 3.1: c-api/intro.rst:73:path and then use ``#include ``; this will break on c-api/intro.rst:534:directory named :file:`lib/python{X.Y}` relative to the parent directory c-api/intro.rst:540::file:`/usr/local/lib/python{X.Y}`. (In fact, this particular path is also faq/general.rst:356:titled "Python X.Y Release Schedule", where X.Y is a version that hasn't been howto/urllib2.rst:156:``Python-urllib/x.y`` (where ``x`` and ``y`` are the major and minor version install/index.rst:240:| Unix (pure) | :file:`{prefix}/lib/python{X.Y}/site-packages` | :file:`/usr/local/lib/python{X.Y}/site-packages` | \(1) | install/index.rst:242:| Unix (non-pure) | :file:`{exec-prefix}/lib/python{X.Y}/site-packages` | :file:`/usr/local/lib/python{X.Y}/site-packages` | \(1) | install/index.rst:265:Windows, choose :menuselection:`Start --> Programs --> Python X.Y --> install/index.rst:386:| pure module distribution | :file:`{prefix}/lib/python{X.Y}/site-packages` | :option:`--install-purelib` | install/index.rst:388:| non-pure module distribution | :file:`{exec-prefix}/lib/python{X.Y}/site-packages` | :option:`--install-platlib` | install/index.rst:634:the search path will be set to ``['', '/www/python/lib/pythonX.Y/', install/index.rst:635:'/www/python/lib/pythonX.Y/plat-linux2', ...]``. library/site.rst:42::file:`/usr/local`. The Python X.Y library is then installed in library/site.rst:43::file:`/usr/local/lib/python{X.Y}` (where only the first three characters of library/site.rst:45:a subdirectory :file:`/usr/local/lib/python{X.Y}/site-packages` with three library/site.rst:65: /usr/local/lib/pythonX.Y/site-packages/bar library/site.rst:66: /usr/local/lib/pythonX.Y/site-packages/foo library/pydoc.rst:67:``http://docs.python.org/X.Y/library/`` where ``X`` and ``Y`` are the library/logging.rst:442:found for logger X.Y.Z" is printed to the console. This message is intended library/logging.rst:464:done using loggers with names matching "foo.x.y", then the code:: library/stdtypes.rst:2324:'/usr/local/lib/pythonX.Y/os.pyc'>``. There are also things like ?python2.3?: extending/building.rst:97: gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/local/include -I/usr/local/include/python2.2 -c demo.c -o build/temp.linux-i686-2.2/demo.o faq/extending.rst:240::file:`/usr/lib/python2.{x}/config/` directory, which contains various files faq/general.rst:500: python2.2 /db2pickley.py database.db database.pck install/index.rst:362:them to go in :file:`/usr/local/lib/python2.{X}` rather than install/index.rst:363::file:`/usr/lib/python2.{X}`. This can be done with :: install/index.rst:370:modules in :file:`/usr/local/lib/python2.{X}`, but those modules would have to install/index.rst:371:be installed to, say, :file:`/mnt/{@server}/export/lib/python2.{X}`. This could install/index.rst:590: ['', '/usr/local/lib/python2.3', '/usr/local/lib/python2.3/plat-linux2', install/index.rst:591: '/usr/local/lib/python2.3/lib-tk', '/usr/local/lib/python2.3/lib-dynload', install/index.rst:592: '/usr/local/lib/python2.3/site-packages'] install/index.rst:703: :file:`{prefix}/lib/python1.5/site-packages/distutils`, so the system library/sysconfig.rst:243: platlib = "/usr/local/lib/python3.2/site-packages" library/sysconfig.rst:244: platstdlib = "/usr/local/lib/python3.2" library/sysconfig.rst:245: purelib = "/usr/local/lib/python3.2/site-packages" library/sysconfig.rst:247: stdlib = "/usr/local/lib/python3.2" library/re.rst:1115: File "/usr/local/lib/python3.2/re.py", line 132, in match tutorial/interpreter.rst:13:The Python interpreter is usually installed as :file:`/usr/local/bin/python3.2` tutorial/interpreter.rst:17: python3.2 tutorial/interpreter.rst:97: $ python3.2 tutorial/interpreter.rst:151: #! /usr/bin/env python3.2 (Please ignore distutils and install docs, they?re frozen except for bugfixes, there?s no value in working on them with the replacement coming Really Soon Now?.) Do docs people agree this automation would be something useful? FYI: https://pypi.python.org/pypi/grin/1.2.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 01:24:15 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 27 Mar 2011 23:24:15 +0000 Subject: [docs] [issue9694] argparse: Default Help Message Lists Required Args As Optional In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1301268255.31.0.0461031872798.issue9694@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 10:45:06 2011 From: report at bugs.python.org (Weeble) Date: Mon, 28 Mar 2011 08:45:06 +0000 Subject: [docs] [issue1665333] Documentation missing for OptionGroup class in optparse Message-ID: <1301301906.66.0.913711802254.issue1665333@psf.upfronthosting.co.za> Weeble added the comment: I think the documentation for get_option_group is not right. I've created a new bug: http://bugs.python.org/issue11699 ---------- nosy: +weeble _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 12:46:39 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Mar 2011 10:46:39 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset cc04b591d768 by Ezio Melotti in branch '2.7': #10617: add class directives to collections ABCs. http://hg.python.org/cpython/rev/cc04b591d768 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 17:38:06 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 28 Mar 2011 15:38:06 +0000 Subject: [docs] [issue11699] Documentation for get_option_group is wrong In-Reply-To: <1301301829.71.0.0713641718569.issue11699@psf.upfronthosting.co.za> Message-ID: <1301326686.75.0.0103221854165.issue11699@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eric.araujo, georg.brandl, lunar_yorn, nnorwitz versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 18:27:30 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Mar 2011 16:27:30 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c5de208d205c by Ezio Melotti in branch '3.1': #10617: add class directives to collections ABCs. http://hg.python.org/cpython/rev/c5de208d205c New changeset 3daca2b76297 by Ezio Melotti in branch '3.2': #10617: merge with 3.1. http://hg.python.org/cpython/rev/3daca2b76297 New changeset 30a026a25167 by Ezio Melotti in branch 'default': #10617: merge with 3.2. http://hg.python.org/cpython/rev/30a026a25167 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 18:35:20 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 28 Mar 2011 16:35:20 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1301330120.77.0.615806716591.issue10617@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 Mar 28 20:40:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 28 Mar 2011 18:40:45 +0000 Subject: [docs] =?utf-8?q?=5Bissue10617=5D_Collections_ABCs_can=E2=80=99t_?= =?utf-8?q?be_linked_to?= In-Reply-To: <1291399583.54.0.437580491631.issue10617@psf.upfronthosting.co.za> Message-ID: <1301337645.52.0.116033533612.issue10617@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks Ezio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 28 22:09:38 2011 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Mar 2011 20:09:38 +0000 Subject: [docs] [issue11676] imp.load_module and submodules - doc issue, or bug? In-Reply-To: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za> Message-ID: <1301342978.63.0.112386099351.issue11676@psf.upfronthosting.co.za> Brett Cannon added the comment: I say it's a documentation bug. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core, Library (Lib) nosy: +brett.cannon, docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 00:27:48 2011 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 Mar 2011 22:27:48 +0000 Subject: [docs] [issue11704] functools.partial doesn't create bound methods In-Reply-To: <1301348051.58.0.203467592285.issue11704@psf.upfronthosting.co.za> Message-ID: <1301351268.63.0.969295707351.issue11704@psf.upfronthosting.co.za> Nick Coghlan added the comment: True, this could be documented better - flagging as a docs bug. (It is mentioned at the bottom of http://docs.python.org/library/functools.html#partial-objects, but that could be referenced better from the main documentation of the function higher up in the page) There's actually more to it than just an oversight though - partial() fills in positional arguments from the left, so using one as a method would require specification of a carefully crafted selection of positional and keyword arguments to ensure the instance was bound and passed in at the right point. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 00:29:53 2011 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 28 Mar 2011 22:29:53 +0000 Subject: [docs] [issue11704] functools.partial doesn't create bound methods In-Reply-To: <1301348051.58.0.203467592285.issue11704@psf.upfronthosting.co.za> Message-ID: <1301351393.51.0.831691063465.issue11704@psf.upfronthosting.co.za> Alex Gaynor added the comment: Indeed I completely missed the section at the bottom. A note in the above section would be a useful addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 00:52:05 2011 From: report at bugs.python.org (Dave Peck) Date: Mon, 28 Mar 2011 22:52:05 +0000 Subject: [docs] [issue11676] imp.load_module and submodules - doc issue, or bug? In-Reply-To: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za> Message-ID: <1301352725.37.0.377927770377.issue11676@psf.upfronthosting.co.za> Dave Peck added the comment: Definitely could agree with this assessment, but it is surprising given the lack of parallel behavior between 'import' and 'imp'. Note that imp.load_module(subpackage) _does_ modify the parent module's attributes -- but it will never put the subpackage attribute itself on parent. That's the part that made me think it shouldn't work this way and that its more bug than documentation. (That, and the specific use of the imp module in Google's dev_appserver.py which indicates that others have the same expectation of load_module() that I did.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 01:41:26 2011 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 28 Mar 2011 23:41:26 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: <1301355686.1.0.336304503108.issue11639@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 02:16:56 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Mar 2011 00:16:56 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset bfa2a8d91859 by Vinay Sajip in branch '2.6': Issue #11639: Configuration function documentation referred to logging.XXX rather than logging.config.XXX. http://hg.python.org/cpython/rev/bfa2a8d91859 New changeset f494339674e7 by Vinay Sajip in branch '2.7': Issue #11639: Configuration function documentation referred to logging.XXX rather than logging.config.XXX. http://hg.python.org/cpython/rev/f494339674e7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 02:22:41 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Mar 2011 00:22:41 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 1a5aab273332 by Vinay Sajip in branch '2.7': Issue #11639: Configuration function documentation referred to logging.XXX rather than logging.config.XXX. http://hg.python.org/cpython/rev/1a5aab273332 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 02:24:37 2011 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 29 Mar 2011 00:24:37 +0000 Subject: [docs] [issue11639] Documentation for *Config functions in logging module should be in logging.config In-Reply-To: <1300830341.3.0.391550111742.issue11639@psf.upfronthosting.co.za> Message-ID: <1301358277.21.0.67408054157.issue11639@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed status: open -> closed versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 05:53:11 2011 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 29 Mar 2011 03:53:11 +0000 Subject: [docs] [issue11676] imp.load_module and submodules - doc issue, or bug? In-Reply-To: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za> Message-ID: <1301370791.9.0.566317724485.issue11676@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 10:50:30 2011 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 29 Mar 2011 08:50:30 +0000 Subject: [docs] [issue11690] Devguide: Add "communication" FAQ In-Reply-To: <1301188192.33.0.9529618781.issue11690@psf.upfronthosting.co.za> Message-ID: <1301388630.47.0.852353399926.issue11690@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: -> docs at python components: +Devguide, Documentation -None nosy: +docs at python title: Add "communication" FAQ to devguide -> Devguide: Add "communication" FAQ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 14:31:47 2011 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Mar 2011 12:31:47 +0000 Subject: [docs] [issue11710] Landing pages in docs for standard library packages In-Reply-To: <1301401907.02.0.216152132906.issue11710@psf.upfronthosting.co.za> Message-ID: <1301401907.02.0.216152132906.issue11710@psf.upfronthosting.co.za> New submission from Nick Coghlan : http://docs.python.org/py3k/urllib errors out rather than returning an index page for the modules that are part of the urllib package. This index page could also link to the HOWTO at http://docs.python.org/py3k/howto/urllib2.html The following packages have the same problem: xml, http, xmlrpc, concurrent These ones look OK: logging, curses, html, tkinter These index pages don't necessarily need to be linked from the contents page, but they should exist so that manually typed URLs for these packages do something useful rather than erroring out with a 404. ---------- assignee: docs at python components: Documentation messages: 132481 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Landing pages in docs for standard library packages versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 19:07:40 2011 From: report at bugs.python.org (Brett Cannon) Date: Tue, 29 Mar 2011 17:07:40 +0000 Subject: [docs] [issue11676] imp.load_module and submodules - doc issue, or bug? In-Reply-To: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za> Message-ID: <1301418460.37.0.541362110187.issue11676@psf.upfronthosting.co.za> Brett Cannon added the comment: It's actually not surprising that imp works this way: it predates packages. Because the semantics (I assume) have been like this for ages I say we document the current behavior (it's easy to work around) and simply continue to replace imp functionality with importlib ones that are more modern and reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 21:28:42 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Mar 2011 19:28:42 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> New submission from Terry J. Reedy : l=[1,3,2] l.sort(cmp=lambda x,y:y-x, key=lambda x: x) print(l) With CPython 2.7 this 1) could raise an exception like TypeError: conflicting arguments passed; 2) could ignore cmp= and print [1,2,3] on the basis that the new should override the old; 3) does ignore key= and prints [3,2,1] (why does not matter now), but as near as I can tell, this is not documented. Suggestion: in 5.6.4. Mutable Sequence Types, in footnote 8, after "key specifies a function of one argument that is used to extract a comparison key from each list element: key=str.lower. The default value is None." add "Ignored if *cmp* is also given." ---------- assignee: docs at python components: Documentation keywords: easy, patch messages: 132507 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Doc list.sort(cmp=,key=) result. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 21:41:37 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Mar 2011 19:41:37 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301427697.35.0.75576784151.issue11712@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 22:05:33 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Tue, 29 Mar 2011 20:05:33 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301429133.85.0.663605161916.issue11155@psf.upfronthosting.co.za> Westley Mart?nez added the comment: Well it's been quite some time and no response yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 22:18:18 2011 From: report at bugs.python.org (Erik Cederstrand) Date: Tue, 29 Mar 2011 20:18:18 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301429898.45.0.538727866702.issue11155@psf.upfronthosting.co.za> Erik Cederstrand added the comment: I'm not sure if I was supposed to respond. The patch looks straight-forward to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 22:19:11 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 29 Mar 2011 20:19:11 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301429951.57.0.379449383693.issue11155@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 22:25:35 2011 From: report at bugs.python.org (Erik Cederstrand) Date: Tue, 29 Mar 2011 20:25:35 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301430335.41.0.948133103632.issue11155@psf.upfronthosting.co.za> Erik Cederstrand added the comment: Just checked on Python 2.7.1 with the same result. Test script attached. ---------- Added file: http://bugs.python.org/file21459/q.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 22:26:18 2011 From: report at bugs.python.org (Erik Cederstrand) Date: Tue, 29 Mar 2011 20:26:18 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301430378.52.0.426537463048.issue11155@psf.upfronthosting.co.za> Changes by Erik Cederstrand : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 29 23:28:11 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 29 Mar 2011 21:28:11 +0000 Subject: [docs] [issue9331] sys.setprofile is not described as CPython implementation detail In-Reply-To: <1279820617.97.0.227411152808.issue9331@psf.upfronthosting.co.za> Message-ID: <1301434090.93.0.402221941238.issue9331@psf.upfronthosting.co.za> Sandro Tosi added the comment: As Benjamin just confirmed on #python-dev, sys.setprofile is not a cpython impl detail, hence closing this issue. ---------- nosy: +benjamin.peterson, sandro.tosi resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 30 01:01:21 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Mar 2011 23:01:21 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301439680.97.0.275329548315.issue11712@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On pydev, Mathew Woodcraft says the actual rule is 4) Neither 'wins': cmp is applied to the output of key. which is consistent with my experiment also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 30 01:40:25 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Mar 2011 23:40:25 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301442025.35.0.879345977704.issue11712@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There's no need to guess what it does ;-) We don't document by experiment when source and test suites are available. Mathew was correct, it works as documented: the key function is applied at the outset (as it always does) and then cmp function is used whenever a comparison is made (as it always does). There is no special change in behavior when the two are used together; they are effectively orthogonal (the actual implementation is a bit more complicated). IMO, the docs are correct as-is. There is some question about whether to specifically elaborate on what happens when both are used together. For the most part, users are better-off using either key-functions or cmp-functions but not both at the same time. We may be doing them a disservice by suggesting otherwise. This has been out for several years now and no one has either noticed or cared, so I recommend closing with no change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 30 02:15:21 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Mar 2011 00:15:21 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301444121.31.0.845299514982.issue11712@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 2.7 doc actually says that the two arguments to cmp are list items, rather than list items or keys "cmp specifies a custom comparison function of two arguments (list items)". And this "In general, the key and reverse conversion processes are much faster than specifying an equivalent cmp function." sort of suggests one or the other (but not both). That said, given the absence of overt problems, I agree with > We may be doing them a disservice by suggesting otherwise. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 30 02:40:02 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Mar 2011 00:40:02 +0000 Subject: [docs] [issue11712] Doc list.sort(cmp=,key=) result. In-Reply-To: <1301426922.02.0.157603577623.issue11712@psf.upfronthosting.co.za> Message-ID: <1301445602.28.0.536581457666.issue11712@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 30 10:12:11 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 30 Mar 2011 08:12:11 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301472731.51.0.735029707296.issue11155@psf.upfronthosting.co.za> Ezio Melotti added the comment: Technically this is a backward-incompatible change, because it breaks code that uses obj=foo explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 31 01:39:31 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Wed, 30 Mar 2011 23:39:31 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1301528371.1.0.096264592172.issue11155@psf.upfronthosting.co.za> Westley Mart?nez added the comment: In that case, I've made a patch that changes the documentation so that "item" is now "obj". for Queue.put and Queue.put_nowait. ---------- Added file: http://bugs.python.org/file21484/doc-11155.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 31 04:46:47 2011 From: report at bugs.python.org (Jeff Ramnani) Date: Thu, 31 Mar 2011 02:46:47 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1301539607.17.0.249416839408.issue8158@psf.upfronthosting.co.za> Jeff Ramnani added the comment: You are correct. I have added 'description' to the docstring of the OptionParser class for 2.7 and default (python3 tip). Here is the patch for python3 tip. ---------- keywords: +patch Added file: http://bugs.python.org/file21486/issue8151-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 31 04:48:36 2011 From: report at bugs.python.org (Jeff Ramnani) Date: Thu, 31 Mar 2011 02:48:36 +0000 Subject: [docs] [issue8158] Docstring of optparse.OptionParser incomplete In-Reply-To: <1268763667.28.0.98928586354.issue8158@psf.upfronthosting.co.za> Message-ID: <1301539716.58.0.0857479771096.issue8158@psf.upfronthosting.co.za> Jeff Ramnani added the comment: Attaching the same patch for 2.7. ---------- Added file: http://bugs.python.org/file21487/issue8151-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 31 12:08:02 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Mar 2011 10:08:02 +0000 Subject: [docs] [issue11726] linecache becomes specific to Python scripts in Python 3 In-Reply-To: <1301566082.59.0.198488725536.issue11726@psf.upfronthosting.co.za> Message-ID: <1301566082.59.0.198488725536.issue11726@psf.upfronthosting.co.za> New submission from STINNER Victor : linecache document doesn't tell that the module reads the #coding:xxx cookie to get the encoding of the Python file. linecache reads this cookie since 41665 (May 09 2007). "The linecache module allows one to get any line from any file, ..." => "any file"! And the example uses /etc/passwd which is not a Python file. Not only it reads the #coding:xxx cookie, but updatecache() tries also a PEP 302 loader to read the file. linecache should be marked as very specific to Python scripts, or it should be patched to become more generic (don't read the cookie / use loader by default). Note: the locale encoding may change between to calls to the linecache module. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 132641 nosy: docs at python, haypo priority: normal severity: normal status: open title: linecache becomes specific to Python scripts in Python 3 versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 31 18:03:09 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 31 Mar 2011 16:03:09 +0000 Subject: [docs] [issue11726] linecache becomes specific to Python scripts in Python 3 In-Reply-To: <1301566082.59.0.198488725536.issue11726@psf.upfronthosting.co.za> Message-ID: <1301587389.04.0.461318807515.issue11726@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From dh.electro at gmail.com Mon Mar 28 01:15:52 2011 From: dh.electro at gmail.com (Dhaval Patel) Date: Mon, 28 Mar 2011 00:15:52 +0100 Subject: [docs] Error in The Python Tutorial Message-ID: Hi I am learning Python. As a part of my learning process, I found your tutorial very helpful. Today I have found error in section 4.4. breakand continueStatements, and elseClauses on Loops >>> for n in range(2, 10):... for x in range(2, n):... if n % x == 0:... print n, 'equals', x, '*', n/x... break... else:... # loop fell through without finding a factor... print n, 'is a prime number'...2 is a prime number3 is a prime number4 equals 2 * 25 is a prime number6 equals 2 * 37 is a prime number8 equals 2 * 49 equals 3 * 3 The first output 2 is a prime number is not coming out I think when it goes in first inner for loop for x in range(2,2): range (2,2) is [] so it is not printing 2 is a prime number is not coming out I just want to make sure it my understanding is correct or there is mistake in document. Thanks -- Dhaval Patel -------------- next part -------------- An HTML attachment was scrubbed... URL: From RegisFrey at darkfirestudios.com Mon Mar 28 04:36:39 2011 From: RegisFrey at darkfirestudios.com (Regis Frey) Date: Sun, 27 Mar 2011 22:36:39 -0400 Subject: [docs] General FAQ - How Stable, rewording Message-ID: http://docs.python.org/faq/general.html#how-stable-is-python "Python 2 code will generally not run unchanged in Python 3." would read more clearly as "Python 2 code often requires changes to run in Python 3." -- Regis Frey darkfirestudios.com From contactme at kurtmckee.org Mon Mar 28 06:30:56 2011 From: contactme at kurtmckee.org (Kurt McKee) Date: Mon, 28 Mar 2011 04:30:56 +0000 Subject: [docs] Typo in cProfile documentation Message-ID: <310332436-1301286658-cardhu_decombobulator_blackberry.rim.net-799514591-@bda081.bisx.prod.on.blackberry> Howdy! Just wanted to let you know that there's a simple typo at: http://docs.python.org/dev/library/profile.html The note in section 26.3.1 uses the word "resonably" which should be spelled "reasonably". Thank you for the excellent documentation, it's marvelous! Sincerely, Kurt McKee From markjballard at googlemail.com Tue Mar 29 23:47:56 2011 From: markjballard at googlemail.com (Mark Ballard) Date: Tue, 29 Mar 2011 22:47:56 +0100 Subject: [docs] Suggested improvement for Python Tutorial part 7.2 - 'Reading and writing files' Message-ID: Hello May I, a mere beginner, be so bold as to suggest a modification of your excellent Python Tutorial? I think certain modifications of section 7.2 ( http://docs.python.org/tutorial/inputoutput.html) would be of great assistance to beginners. First of all, the order in which the different file operations are presented could be changed for greater comprehension. Section 7.2 begins the beginners' introduction to file objects (after a quick introduction to opening/creating files) by giving a rather sizable description of read functions, with examples. Since the beginner at this stage hasn't learned the first thing about writing to files, she is unlikely to have any test files on which to perform the given read functions. This section on reading files is therefore redundant until the beginner has got to the section further on that describes how to write files, after which she must return to the start of the section to do the read samples and effectively read the section backwards. It would be more helpful to have the write tutorial before the read tutorial. In addition to this confusion of ordering, I had some trouble following the given read and write examples. Please refer to this example transcript of my attempt to follow the instructions in section 7.2: * STEP 1 - I open a file for reading and writing and write to the file >>> f = open('/tmp/workfile', 'r+') >>> print f >>> f.read() '' >>> f.write('this is first line of file\n') * STEP 2 - I attempt to read what I've written, but without success >>> f.readline() '' >>> f.readlines() [] * STEP 3 - Bemused, I try writing and reading some more >>> f.write('this is a test') >>> f.readlines() [] * BREAKOUT - Unable to find any explanation in 7.2 I go for help elsewhere After some time, I find it in the Python Tutor mail list (here: http://mail.python.org/pipermail/tutor/2003-July/024154.html) * STEP 4 - Using f.close() I successfully read what I've written But only one of my previously written lines is there >>> f.close() >>> f = open('/tmp/workfile', 'r+') >>> f.readlines() ['this is first line of file\n'] * STEP 5 - Bemused, I try writing another line And use the knowledge gleaned from the Python Tutor Mail list to reset the file pointer >>> f.write('this is second line\n') >>> f.readlines() [] >>> f.seek(0) >>> f.readlines() ['this is first line of file\n'] * STEP 6 - But where are the other lines I've written? >>> f.readlines() [] * STEP 7 - Bemused, I write yet another line to the file, reset the pointer and read it back >>> f.write('this is what where?\n') >>> f.seek(0) >>> f.readlines() ['this is first line of file\n', 'this is what where?\n'] >>> For what to me is an inexplicable reason, my last attempt at writing to this file seemed to be successful: it read back. But all my previous attempts to write a second line have been lost in the ether. Now I'm sure I'll work this out eventually. But perhaps the tutorial could clarify some of these points. I would like to suggest that one way to improve 7.2 would be to include at the beginning of the section, after a simple introduction of write and read with basic one line examples, a description of the file pointer and why its important in reading back what one has written. It may then use multiple line writes and reads to demonstrate how these differ. And perhaps then some word on these phantom writes? Kind regards Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From j at dannynavarro.net Wed Mar 30 16:42:30 2011 From: j at dannynavarro.net (Danny Navarro) Date: Wed, 30 Mar 2011 16:42:30 +0200 Subject: [docs] assertRegexpMatches arguments swapped in docs Message-ID: Hi, I noticed that the ``assertRegexpMatches`` of the unittest module works by passing first the regex and then the text to be tested. However in the docs the text comes before the regex. http://docs.python.org/library/unittest.html#unittest.TestCase.assertRegexpMatches I'm on 2.7.1, BTW. Cheers, -- Danny Navarro ?| ?http://dannynavarro.net