From report at bugs.python.org Fri Oct 1 03:10:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 01:10:25 +0000 Subject: [docs] [issue10001] ~Py_buffer.obj field is undocumented, though not hidden In-Reply-To: <1285868807.58.0.617972550499.issue10001@psf.upfronthosting.co.za> Message-ID: <1285895424.84.0.760711862577.issue10001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The recommended way is to use PyBuffer_FillInfo() (and then fill in any additional data if necessary), which will set the pointer and incref it itself. I agree all this is a bit poorly documented. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, pitrou stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 09:26:14 2010 From: report at bugs.python.org (Lenard Lindstrom) Date: Fri, 01 Oct 2010 07:26:14 +0000 Subject: [docs] [issue10001] ~Py_buffer.obj field is undocumented, though not hidden In-Reply-To: <1285895424.84.0.760711862577.issue10001@psf.upfronthosting.co.za> Message-ID: <4CA58D10.1070008@telus.net> Lenard Lindstrom added the comment: This will work for bf_getbuffer, though having PyObject_GetBuffer set the obj field before passing it to the callback might be safer. Also, this does not address the case with wrapper types like memoryview. What happens if ~Py_buffer.obj is not visited in tp_traverse? Should this be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:53:28 2010 From: report at bugs.python.org (Radu Grigore) Date: Fri, 01 Oct 2010 15:53:28 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1285948407.25.0.673369734917.issue9921@psf.upfronthosting.co.za> Radu Grigore added the comment: I would say something like the following. The function join(path1, path2) is almost like os.sep.join(path1, path2), but (1) trailing path separators in path1 are ignored and (2) the result is simply path2 when path2 is an absolute path. The call join(path1, path2, path3) is equivalent to join(join(path1, path2), path3), and similarly for more than three paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:31:18 2010 From: report at bugs.python.org (Amber Jain) Date: Fri, 01 Oct 2010 16:31:18 +0000 Subject: [docs] [issue9986] PDF files of python docs have text missing In-Reply-To: <1285772054.59.0.857308007062.issue9986@psf.upfronthosting.co.za> Message-ID: <1285950678.27.0.781339899194.issue9986@psf.upfronthosting.co.za> Amber Jain added the comment: Reported to sphinx tracker at bitbucket: http://bitbucket.org/birkenfeld/sphinx/issue/531/pdf-files-of-python-docs-have-text-missing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:45:09 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 18:45:09 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Please see http://docs.python.org/genindex-T.html Thread (class in threading), [1] This two links point to same place. I think latter should point http://docs.python.org/library/threading.html#thread-objects or class threading.Thread(group=None, target=None, name=None, args=(), kwargs={}) bellow. # Latter doesn't have perma link. ---------- assignee: docs at python components: Documentation messages: 117824 nosy: docs at python, ocean-city priority: normal severity: normal status: open title: Two links point to same place versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:55:04 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 20:55:04 +0000 Subject: [docs] [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Hello. While I was reading HTML help, I felt some links were not pointing to *before* what I wanted to read. When I selected "sort (list method)" in keyword pane, it jumped to *Note* section, but I was not sure where I was. Table above was actually what I wanted to read. With attached patch, I am happy. ---------- assignee: docs at python components: Documentation files: py27_doc_index.patch keywords: patch messages: 117833 nosy: docs at python, ocean-city priority: normal severity: normal status: open title: ".. index::" position versions: Python 2.7 Added file: http://bugs.python.org/file19090/py27_doc_index.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:04:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:04:36 +0000 Subject: [docs] [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285967076.25.0.302901639904.issue10010@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on the patch. I suspect there is the same problem for other links. ---------- nosy: +eric.araujo versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:14:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:14:37 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1285967677.34.0.756996376336.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. Some remarks: > :attr:`~Option.dest` variable, that already contains the default value I would have used ?which? here, but I?m not a native speaker. > not replaced (contrary to what one can think) I?d have used a comma, not parens. > This behaviour is clear ?makes sense? sounds better to me. > think that with a default value :attr:`~Option.dest` is a list I suggest a comma after ?value?. > any additional option is appended to that list s/option/value/ Let me use this reply to welcome you in the bug tracker. I hope you get warn fuzzy feelings when your patches are accepted or your comments acted upon. I?m also looking forward for a better Python-Debian relationship. (Cultural note: It?s not usual to say hello and regards in messages on this tracker. I did it too at first but was told it was unnecessary.) :) ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, eric.araujo stage: -> patch review versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:16:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:16:26 +0000 Subject: [docs] [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1285967786.56.0.637346055162.issue5501@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m assuming this is a feature new in 2.7 and 3.2, please add 3.1 if this is wrong. ---------- nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 05:31:02 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 02 Oct 2010 03:31:02 +0000 Subject: [docs] [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285990262.73.0.63696127669.issue10010@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in py3k(r85156), release31-maint(r85157) and release27-maint(r85158). ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From havens at cs.sfu.ca Sun Oct 3 00:39:08 2010 From: havens at cs.sfu.ca (Bill Havens) Date: Sat, 2 Oct 2010 15:39:08 -0700 Subject: [docs] 100 fold inaccuracy in time.clock() function in MacOS Message-ID: <2B003C3D-D22B-40CD-A46F-C5EC455045E9@cs.sfu.ca> Dear docs I am teaching Python to undergrads here at SFU. I discovered that the time.clock() function yields the correct processor time on Windows machines in seconds but in MacOS 10.6.4 it produces the time in divided by 100. So a full minute real time elapsed yields 0.60 seconds. This is repeatable it seems. Surely the underlying C function is the same in Darwin as other unix implementations. Have you seen this issue before? Perhaps the docs for this function could be updated if this is expected behaviour. regards, Bill Havens ________________________________________________________ Dr. William S. (Bill) Havens http://www.cs.sfu.ca/~havens Professor Emeritus School of Computing Science http://www.cs.sfu.ca/ Simon Fraser University http://www.sfu.ca/ Burnaby, British Columbia, Canada V5A 1S6 phone: +1.604.518.1624 fax: +1.604.733.0711 From vojta.rylko at seznam.cz Sun Oct 3 17:26:45 2010 From: vojta.rylko at seznam.cz (=?ISO-8859-2?Q?Vojt=ECch_Rylko?=) Date: Sun, 03 Oct 2010 17:26:45 +0200 Subject: [docs] xml.dom.pulldom strange behavior Message-ID: <4CA8A0B5.1030609@seznam.cz> Hi, I have file with 10 000 records of same element item (always same): $ head test.xml
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
And run simply program for printing content of element section: $ python pulldom.py test.xml | head Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Seems work fine: $ python pulldom.py test.xml | wc -l 10000 But (in two cases of 10 000) gives me just "Twi" not Twitter: $ python pulldom.py test.xml | grep -v Twitter Twi Twi Why? This example program demonstrate big problems in my real application - xml.dom.pulldom is cutting content of some elements. Thanks for any advice Vojta Rylko --------------------------- Python 2.5.4 (r254:67916, Feb 10 2009, 14:58:09) [GCC 4.2.4] on linux2 --------------------------- pulldom.py: --------------------------- file=open(sys.argv[1]) events = pulldom.parse(file) for event, node in events: if event == pulldom.START_ELEMENT: if node.tagName == 'item': events.expandNode(node) print node.getElementsByTagName('section').item(0).firstChild.data From report at bugs.python.org Sun Oct 3 18:52:40 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 03 Oct 2010 16:52:40 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286124760.54.0.47815958814.issue10020@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:20:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 19:20:39 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286133639.04.0.232350053617.issue10020@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> ghaering nosy: +ghaering versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 23:31:25 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 03 Oct 2010 21:31:25 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286141485.28.0.836283606545.issue10020@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Without SQLITE_OMIT_LOAD_EXTENSION, builds will break on Mac OS X 10.5 and 10.6 and maybe other platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 23:48:33 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 03 Oct 2010 21:48:33 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286142513.75.0.302662564073.issue10020@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Fixed in r85208 by adding a note to the docs. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 00:45:45 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 03 Oct 2010 22:45:45 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286145945.14.0.0723976619296.issue10020@psf.upfronthosting.co.za> Doug Hellmann added the comment: Thanks, Gerhard! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:49:48 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Oct 2010 14:49:48 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1286203788.23.0.351977738526.issue8913@psf.upfronthosting.co.za> R. David Murray added the comment: Alexander closed issue 7789 in favor of this one, which is fine, but I want to respond to Eric's rejection there of including info about datetime in the 'format mini language' section of the docs. His point was that only the builtin types were documented there, but if the goal is to get people to actually use this facility, it would be helpful if some mention were made there of other stdlib types that support __format__. Some set of 'see also' links, perhaps in a footnote? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:57:18 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 14:57:18 +0000 Subject: [docs] [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1286204238.56.0.976943296627.issue8913@psf.upfronthosting.co.za> Eric Smith added the comment: I'm okay with that. Grepping Lib shows that date/datetime/time and Decimal are the only types that implement __format__. Decimal largely implements the same language as float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:39:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 16:39:22 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286210362.04.0.717555922511.issue10021@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:46:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 04 Oct 2010 16:46:10 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286210770.75.0.573601463236.issue10021@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +eric.smith, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:54:42 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 16:54:42 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286211282.49.0.727238009224.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. I don't see this as any different from: >>> class X: ... def __getattribute__(self, a): return 'foo' ... >>> getattr(X(), '$#@') 'foo' ---------- _______________________________________ Python tracker _______________________________________ From benjamin at python.org Mon Oct 4 18:58:43 2010 From: benjamin at python.org (Benjamin Peterson) Date: Mon, 4 Oct 2010 11:58:43 -0500 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286211282.49.0.727238009224.issue10021@psf.upfronthosting.co.za> References: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> <1286211282.49.0.727238009224.issue10021@psf.upfronthosting.co.za> Message-ID: 2010/10/4 Eric Smith : > > Eric Smith added the comment: > > Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. You can always use "str.isidentifier()" (I don't remember if there's a capi). -- Regards, Benjamin From report at bugs.python.org Mon Oct 4 19:02:58 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 17:02:58 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286211778.53.0.0157490166428.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: Ah, but I don't need to in order to comply with the PEP! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:10:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 17:10:35 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286211778.53.0.0157490166428.issue10021@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 4, 2010 at 1:02 PM, Eric Smith wrote: .. > Ah, but I don't need to in order to comply with the PEP! This is true and this is the reason I changed this issue from bug to doc. I seem to remember this having been discussed before, but I cannot find the right thread. There are at least two reasons cpython docs should mention this: 1. From current documentation, users are likely to expect a value error from format(".$#@", ..) rather than an attribute error. 2. Naive proxy objects may implement __getattribute__ that blindly inserts attribute name into database queries leading to all kinds of undesired behaviors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:37:28 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 17:37:28 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286213848.48.0.64883231003.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: I agree it should be documented as a CPython specific behavior. I should also add a CPython specific test for it, modeled on your code (if one doesn't already exist). I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:45:59 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 17:45:59 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286214359.01.0.480284435115.issue5088@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi ?ric, thanks a lot for your review. Your comments are just fine, so I'm attaching a new patch that contains them. Yes, it's really nice to see one's work being accepted, and I do recognize I have a lot to learn about python procedures (either written or not :) so be sure I won't be demotivated by some initial "problems". About the Debian-Python relationship, I have absolutely no control over interpreters packages in Debian, but I do care so much about Python that I thought giving my hand here would be quite right (and who knows, maybe one day, I'll be a core developer too :) . Cheers, Sandro ---------- Added file: http://bugs.python.org/file19129/issue5088-py3k-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:47:53 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 17:47:53 +0000 Subject: [docs] [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1286214473.23.0.326211617882.issue5501@psf.upfronthosting.co.za> Sandro Tosi added the comment: Sorry ?ric, I don't get it: do you mean that the fact that "freeze_support() can be called without issues on Unix or OS X" is a new feature? or I misread it completely? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:13:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:13:48 +0000 Subject: [docs] [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1286216027.85.0.985536933467.issue5501@psf.upfronthosting.co.za> ?ric Araujo added the comment: Rephrased: Is this relevant for 3.1? (Bug and doc fixes go into 3.2, 3.1 and 2.7, but here only 3.2 and 2.7 are selected, so I asked if the bugfix/new feature/behavior in question was something new in 3.2 and thus not in 3.1.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:15:23 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 18:15:23 +0000 Subject: [docs] [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1286216123.63.0.99540236541.issue9093@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello Georg, is this bug been fixed with r83608-10 ? from the commit diffs it seems so, but maybe there's something else you want to do. Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:18:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:18:47 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286216326.97.0.601251057396.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: Forgot this one: > `appended` I don?t remember the default reST role being used in the Python docs; I don?t even remember what it is. Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. > contrary to what one can think Still not a native speaker, but wouldn?t ?may think? be more suited here? Apart from that, +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:26:41 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 18:26:41 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1286216326.97.0.601251057396.issue5088@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Mon, Oct 4, 2010 at 20:18, ?ric Araujo wrote: > ?ric Araujo added the comment: > > Forgot this one: > >> `appended` > I don?t remember the default reST role being used in the Python docs; I don?t even remember what it is. ?Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. I think I looked in other part of the optparse.rst file how it's done and used that, but I'm fine either ways. >> contrary to what one can think > Still not a native speaker, but wouldn?t ?may think? be more suited here? ah ok, it might me more correct, dunno (not native too) > Apart from that, +1. Thanks! but what should I do: prepare a new patch with this 2 quite little changes or leave that to the committer? Regards, Sandro ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:37:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:37:57 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286217477.65.0.664276720255.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I think I looked in other part of the optparse.rst file how it's done and used that Alright, let?s leave it alone then. >>> contrary to what one can think >> Still not a native speaker, but wouldn?t ?may think? be more suited here? >ah ok, it might me more correct, dunno (not native too) It has to do with the degree of probability you assign to the thought. Unless someone adds something, I?ll commit your patch in some days. I?ll change ?can?, don?t bother doing another patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:38:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:38:11 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286217491.01.0.383181178508.issue5088@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:45:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 21:45:52 +0000 Subject: [docs] [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In http://docs.python.org/dev/extending/newtypes.html, you can read: ?To enable object creation, we have to provide a tp_new implementation. In this case, we can just use the default implementation provided by the API function PyType_GenericNew(). We?d like to just assign this to the tp_new slot, but we can?t, for portability sake, On some platforms or compilers, we can?t statically initialize a structure member with a function defined in another C module, so, instead, we?ll assign the tp_new slot in the module initialization function just before calling PyType_Ready()? But the thing is, we ourselves (CPython) do exactly what is discouraged here, both in built-in types and dynamically loaded extensions. So is this piece of advice still necessary? ---------- assignee: docs at python components: Documentation messages: 117984 nosy: docs at python, loewis, pitrou priority: normal severity: normal status: open title: Outdated advice in C-API tutorial? type: resource usage versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 09:21:56 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 Oct 2010 07:21:56 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286263315.71.0.650569429119.issue10021@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I seem to remember this having been discussed before, but I cannot find the right thread. It came up in the issue 7951 discussion, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 10:33:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 05 Oct 2010 08:33:54 +0000 Subject: [docs] [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1286267634.34.0.605380449998.issue10024@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The advice is still necessary, AFAIK. The issue is Windows, in particular producing function pointers across DLL boundaries. In Python core, this is not an issue, since the references will all be inside pythonXY.dll. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:16:19 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 11:16:19 +0000 Subject: [docs] [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286277379.34.0.859500575236.issue10026@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please read http://docs.python.org/library/xml.etree.elementtree.html?highlight=elementtree#xml.etree.ElementTree.iterparse At START_ELEMENT, the element is not guaranteed to be fully populated; you should handle the END_ELEMENT event instead. This should be documented for the pulldom module as well, though. ---------- assignee: -> docs at python nosy: +amaury.forgeotdarc, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:38:17 2010 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Rylko?=) Date: Tue, 05 Oct 2010 11:38:17 +0000 Subject: [docs] [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286278697.14.0.224791721873.issue10026@psf.upfronthosting.co.za> Vojt?ch Rylko added the comment: Program below also splits two of 10 000 elements into two rows. Is it acceptable behavior? OUTPUT (ill part) ============= PROGRAM ============= for event, node in events: if event == pulldom.CHARACTERS: print node.data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 14:41:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 12:41:10 +0000 Subject: [docs] [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286282468.37.0.322079216796.issue10026@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, sax parsers may split CHARACTER events. See also the discussion: http://www.mail-archive.com/xml-sig at python.org/msg00234.html Again, the END_ELEMENT event is guaranteed to return the complete node. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 15:57:49 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Oct 2010 13:57:49 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286287068.37.0.181484689621.issue10021@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should not be classified as an "implementation detail". Either we should document it and cause other implementations to support it or check it ourselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:32:47 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 05 Oct 2010 14:32:47 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286289167.85.0.640694408537.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: I agree that it being an implementation detail is not a good thing. I think we should just document the current CPython behavior as the language standard: once parsed, any string after a dot is passed to getattr. I can't see why we should pay the penalty of validating it as an identifier when the behavior is well defined and matches my getattr example in msg 117965. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:26:46 2010 From: report at bugs.python.org (Max) Date: Tue, 05 Oct 2010 18:26:46 +0000 Subject: [docs] [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> New submission from Max : The sample code explaining zip function is incorrect at http://docs.python.org/py3k/library/functions.html?highlight=zip#zip: def zip(*iterables): # zip('ABCD', 'xy') --> Ax By iterables = map(iter, iterables) while iterables: yield tuple(map(next, iterables)) See http://stackoverflow.com/questions/3865640/understanding-zip-function for discussion. ---------- assignee: docs at python components: Documentation messages: 118025 nosy: docs at python, max priority: normal severity: normal status: open title: bug in sample code in documentation type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:37:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:37:12 +0000 Subject: [docs] [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303832.08.0.14190314011.issue10029@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The relevant comment at Stack Overflow is: """ It looks like it's a bug in the documentation. The 'equivalent' code working in python2, but not in python3, where it has an infinite loop. And the latest version of the documentation has the same problem: http://docs.python.org/release/3.1.2/library/functions.html Look like change r61361 was the problem, as it merged changes from python 2.6 without verifying that they were correct for python 3. """ ---------- nosy: +belopolsky, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:38:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:38:02 +0000 Subject: [docs] [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303882.29.0.637709628971.issue10029@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:43:13 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 Oct 2010 18:43:13 +0000 Subject: [docs] [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286304193.06.0.673678167926.issue10029@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:51:58 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 05 Oct 2010 18:51:58 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286304718.38.0.0553177581032.issue10029@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: The code was taken from the itertools.izip documentation for Python 2, where it did work. In Python 2, next() raises StopIteration which is propagated up and causes the izip() to stop. In Python 3, map is itself a generator and the StopIteration terminates the map operation instead of terminating the zip operation. ---------- nosy: +stutzbach resolution: -> accepted stage: -> needs patch title: bug in sample code in documentation -> "Equivalent to" code for zip is wrong in Python 3 versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:57:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:57:39 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286305059.73.0.576255335527.issue10029@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Note that the following variant where maps are replaced with list comprehensions seems to work: def zip(*iterables): # zip('ABCD', 'xy') --> Ax By iterables = [iter(i) for i in iterables] while iterables: yield tuple([next(j) for j in iterables]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:18:11 2010 From: report at bugs.python.org (Darren Dale) Date: Tue, 05 Oct 2010 20:18:11 +0000 Subject: [docs] [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> New submission from Darren Dale : Old-style relative imports have been strongly discouraged in some sections of the python documentation. This was discussed on the python-dev mailing list. Executive summary: "The issue is implementing a PEP with nice support for relative imports, and then documenting that it should never be used." To which Guido responded: --- "Isn't this mostly historical? Until the new relative-import syntax was implemented there were various problems with relative imports. The short-term solution was to recommend not using them. The long-term solution was to implement an unambiguous syntax. Now it is time to withdraw the anti-recommendation. Of course, without going overboard -- I still find them an acquired taste; but they have their place." --- It was suggested I open a ticket and suggest specific changes. They are listed below: The faq at http://docs.python.org/py3k/faq/programming.html#what-are-the-best-practices-for-using-import-in-a-module could go from: "Never use relative package imports. If you?re writing code that?s in the package.sub.m1 module and want to import package.sub.m2, do not just write from . import m2, even though it?s legal. Write from package.sub import m2 instead. See PEP 328 for details." to: "Although the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. See PEP 328 for details." The programming faq for python-2.7 at http://docs.python.org/faq/programming.html#what-are-the-best-practices-for-using-import-in-a-module could go from: "Never use relative package imports. If you?re writing code that?s in the package.sub.m1 module and want to import package.sub.m2, do not just write import m2, even though it?s legal. Write from package.sub import m2 instead. Relative imports can lead to a module being initialized twice, leading to confusing bugs. See PEP 328 for details." to: "Although the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. Support for relative imports has recently been improved, and the use of the old-style relative imports is strongly discouraged. See PEP 328 for details." There is also this warning against relative imports in PEP 8, that could go from: - Relative imports for intra-package imports are highly discouraged. Always use the absolute package path for all imports. Even now that PEP 328 [7] is fully implemented in Python 2.5, its style of explicit relative imports is actively discouraged; absolute imports are more portable and usually more readable. to: - While the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. Now that PEP 328 [7] is fully implemented in Python 2.5 and later, the older style of implicit relative imports is strongly discouraged. ---------- assignee: docs at python components: Documentation messages: 118031 nosy: docs at python, dsdale24 priority: normal severity: normal status: open title: Withdraw anti-recommendation of relative imports from documentation versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:30:20 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 22:30:20 +0000 Subject: [docs] [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1286317820.19.0.419972522579.issue10031@psf.upfronthosting.co.za> R. David Murray added the comment: Note that of the versions still getting doc updates, only 2.7 still supports the old style relative imports. ---------- nosy: +r.david.murray type: -> behavior versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:47:52 2010 From: report at bugs.python.org (Jason Baker) Date: Tue, 05 Oct 2010 22:47:52 +0000 Subject: [docs] [issue10034] Readline doc issue In-Reply-To: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> Message-ID: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> New submission from Jason Baker : There's an error in the documentation for readline here: http://docs.python.org/library/readline.html#example The first example doesn't import readline. ---------- assignee: docs at python components: Documentation messages: 118040 nosy: Jason.Baker, docs at python priority: normal severity: normal status: open title: Readline doc issue versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 01:44:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 23:44:23 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286322263.93.0.596447100186.issue10029@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: -loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:09:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 06 Oct 2010 05:09:02 +0000 Subject: [docs] [issue10034] Readline doc issue In-Reply-To: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> Message-ID: <1286341742.33.0.335847581011.issue10034@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85240. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:11:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 06 Oct 2010 05:11:54 +0000 Subject: [docs] [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286341914.75.0.501067744818.issue10026@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 11:01:20 2010 From: report at bugs.python.org (Douglas Leeder) Date: Wed, 06 Oct 2010 09:01:20 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286355680.96.0.059419388778.issue10029@psf.upfronthosting.co.za> Changes by Douglas Leeder : ---------- nosy: +Douglas.Leeder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 17:36:58 2010 From: report at bugs.python.org (Nik Tautenhahn) Date: Wed, 06 Oct 2010 15:36:58 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> New submission from Nik Tautenhahn : Hi, before 2.7, an import json json.loads('"abc"') yielded u"abc". in 2.7 I get "abc" (a byte string). I would have expected an entry in "news" or "What's new in 2.7" why this change happened. In addition, all examples at http://docs.python.org/library/json are wrong for Python 2.7 if json.loads is involved. Any insight on this? best regards, Nik ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 118069 nosy: docs at python, llnik priority: normal severity: normal status: open title: Returntype of json.loads() on strings type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 17:42:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 06 Oct 2010 15:42:01 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1286379721.01.0.377482350173.issue10038@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 17:46:04 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 06 Oct 2010 15:46:04 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1286379964.12.0.0320817912142.issue10038@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: This is related to this issue from simplejson: http://code.google.com/p/simplejson/issues/detail?id=28 This problem is why I still use simplejson 1.x; moving forward to simplejson 2.x or Python's json is unlikely. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 23:56:22 2010 From: report at bugs.python.org (Nik Tautenhahn) Date: Wed, 06 Oct 2010 21:56:22 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1286402181.99.0.250735760549.issue10038@psf.upfronthosting.co.za> Nik Tautenhahn added the comment: Well, then at least the documentation and the "What's changed" need to be updated. Furthermore, if such decisions are made, it would be at least nice to have some general "decode-hook" for json.JSONDecoder - the "object_hook" is only used for dict-objects - why is there no hook for strings or a general hook which is used on any objects? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 06:20:44 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 07 Oct 2010 04:20:44 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286402181.99.0.250735760549.issue10038@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: As I understand it, the decision to return str instead of unicode values for the "simplejson" module was simply inherited by the standard library. As such, it still needs to be evaluated in the context of the standard library, because of the incompatibility it introduces. I still maintain that it's a bug, and should be treated as such. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 11:23:29 2010 From: report at bugs.python.org (Nik Tautenhahn) Date: Thu, 07 Oct 2010 09:23:29 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1286443409.5.0.590311789175.issue10038@psf.upfronthosting.co.za> Nik Tautenhahn added the comment: Yep, the solution should not be "maybe it's str, maybe it's unicode" - I mean, if the decoder gives you a str if there are no fancy characters and unicode if it contains some, this might lead to some confusion... And yes, in my opinion, this is a bug, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 14:31:16 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 07 Oct 2010 12:31:16 +0000 Subject: [docs] [issue10043] UnboundLocalError with local variable set by setattr, caused by code run later In-Reply-To: <1286446430.16.0.85312530766.issue10043@psf.upfronthosting.co.za> Message-ID: <1286454676.64.0.0604361872436.issue10043@psf.upfronthosting.co.za> Eric Smith added the comment: It's a well documented behavior. Surely you ran across this link while researching your problem? http://docs.python.org/reference/executionmodel.html#naming-and-binding The paragraph beginning "The following constructs bind names ..." describes why setattr does not create a binding, although I'll grant that it doesn't mention setattr by name. The paragraph beginning "If a name binding operation occurs anywhere within a code block ..." explains why the assignment affects code that occurs before the binding. If you'd like to improve the docs, please suggest a patch. Also note that you're not creating a local variable with setattr, you're creating a module level (sometimes called global) variable. Perhaps that's part of the misunderstanding? You might want to look into the global (on nonlocal) statement, unless there's some particular reason the name you're creating needs to be dynamically computed. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python resolution: invalid -> stage: -> needs patch status: closed -> open versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 15:03:52 2010 From: report at bugs.python.org (Steven Samuel Cole) Date: Thu, 07 Oct 2010 13:03:52 +0000 Subject: [docs] [issue10043] UnboundLocalError with local variable set by setattr, caused by code run later In-Reply-To: <1286446430.16.0.85312530766.issue10043@psf.upfronthosting.co.za> Message-ID: <1286456632.19.0.823797357358.issue10043@psf.upfronthosting.co.za> Steven Samuel Cole added the comment: thank you very much for the clarification. i did indeed not come across the page you've linked to, mainly because i did not really know what to google for. actually, i do not recall ever looking into the python language reference in 6+ years of python coding. googling for 'python UnboundLocalError setattr' returns this bug report as top result at the moment, as your link leads to more indepth information, the main objective of saving / alleviating others the research work seems achieved. i will nonetheless try to make time to get get my head around the python doc conventions and processes and submit a patch. thanks for pointing out the difference between a local variable and one with module scope. however, it is not relevant for my situation: i have a long list of strings coming in (database column names, not under my influence) which i need to access _like_ a local variable. if you can think of a smarter approach to turn parameter strings into variables of whatever scope, i'm all ears, but i have a feeling that's actually what setattr(...) is meant for. as a quick fix for the UnboundLocalError, sticking to working with module attributes worked for me. instead of changing the value of a dynamically created variable in the conventional way my_var = None (which is where the error occurred in my code), it might help to use setattr(...) even if the variable name is known: setattr(modules[__name__], 'my_var', None) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 17:53:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 07 Oct 2010 15:53:55 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286466835.32.0.427565011987.issue10029@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As Daniel pointed out, the "equivalent to" code in builtins section comes from 2.x itertools documentation where and equivalent generator definition is presented for each function. While these definitions are helpful when used for documenting a module oriented towards more advanced users, I doubt that exposing novices who are looking up builtins to the yield keyword and generators is a good idea. The zip() example is particularly problematic. Conceptually, zip is a very simple function, but the "equivalent to" code is not easy to decipher. The reliance on StopIteration exception escaping from map to break out of the infinite loop is clever, but not obvious. Moreover, as this bug demonstrates, this trick relies on subtle details that changed in 3.x. I suggest removing the "equivalent to" code from the zip section and replacing it with an example showing how to use zip with a for loop similar to the example illustrating enumerate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 18:00:16 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 07 Oct 2010 16:00:16 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286467216.79.0.633474583586.issue10029@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: > I suggest removing the "equivalent to" code from the zip section and > replacing it with an example showing how to use zip with a for loop > similar to the example illustrating enumerate. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 19:10:51 2010 From: report at bugs.python.org (Max) Date: Thu, 07 Oct 2010 17:10:51 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286471451.76.0.119082489793.issue10029@psf.upfronthosting.co.za> Max added the comment: Personally, I find it impossible in some cases to understand exactly what a function does just from reading a textual description. In those cases, I always refer to the equivalent code if it's given. In fact that's the reason I was looking going the zip equivalent function! I would feel it's a loss if equivalent code disappear from the docs. I understand sometimes the code requires maintenance, but I'd rather live with some temporary bugs than lose the equivalent code. As to subtleties of how it works, that's not really a concern, if that's the only way to understand the precise meaning of whatever it explains. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 21:37:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 07 Oct 2010 19:37:17 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286480237.64.0.444141117326.issue10029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll update the docs with an equivalent that works and that has a comment showing when the StopIteration is raised and caught. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 7 23:34:55 2010 From: report at bugs.python.org (Jason Baker) Date: Thu, 07 Oct 2010 21:34:55 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> New submission from Jason Baker : There's an issue with the documentation on the atexit module[1]. It states: "Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when os._exit() is called." This isn't necessarily true. For instance, if I start the following script: from atexit import register from time import sleep @register def end(): print 'atexit' while True: sleep(1) ...and then do a "kill -SIGINT ", the atexit function gets called. It would be helpful to have a more detailed description of the rules on how this works. [1] http://docs.python.org/library/atexit.html#module-atexit ---------- assignee: docs at python components: Documentation messages: 118141 nosy: Jason.Baker, docs at python priority: normal severity: normal status: open title: Correction to atexit documentation versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 03:27:14 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 08 Oct 2010 01:27:14 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1286501233.84.0.473119245089.issue10046@psf.upfronthosting.co.za> R. David Murray added the comment: It is possible this behavior changed after the docs were written. I'm adding a couple of people to nosy who might have some insight into that possibility. It could be either a change in finalization procedures or a change in signal handling semantics, I think. ---------- nosy: +Rhamphoryncus, pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 04:38:28 2010 From: report at bugs.python.org (Adam Olsen) Date: Fri, 08 Oct 2010 02:38:28 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1286505508.03.0.802549911877.issue10046@psf.upfronthosting.co.za> Adam Olsen added the comment: Signals can directly kill a process. Try SIGTERM to see this. SIGINT is caught and handled by Python, which just happens to default to a graceful exit (unless stuck in a lib that prevents that.) Try pasting your script into an interactive interpreter session and you'll see that it doesn't exit at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 08:36:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 08 Oct 2010 06:36:31 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1286519791.3.0.657024928531.issue10046@psf.upfronthosting.co.za> Georg Brandl added the comment: One could also argue that on SIGINT, the program is not "killed" but "interrupted" by the signal :) What about "... killed by an unhandled signal ..."? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 13:06:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 08 Oct 2010 11:06:30 +0000 Subject: [docs] [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The urllib.request documentation intermingles old 2.x urllib (FancyURLopener, etc.) with urllib2-inherited (*Handler, build_opener, etc.) primitives without making any distinction. This makes it rather confusing for the reader to figure out which ones to use. Ideally, the use of the old primitives should also be discouraged. ---------- assignee: docs at python components: Documentation messages: 118179 nosy: docs at python, orsenthil, pitrou priority: normal severity: normal stage: needs patch status: open title: urllib.request documentation confusing versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 16:40:39 2010 From: report at bugs.python.org (Jason Baker) Date: Fri, 08 Oct 2010 14:40:39 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1286548838.09.0.0381065752251.issue10046@psf.upfronthosting.co.za> Jason Baker added the comment: I like that phrasing. I think it would be a good idea to mention that this includes SIGINT by default, just to be explicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 20:25:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 08 Oct 2010 18:25:26 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286480237.64.0.444141117326.issue10029@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 7, 2010 at 3:37 PM, Raymond Hettinger wrote: .. > I'll update the docs with an equivalent that works and that has a comment showing when the > StopIteration is raised and caught. > In this case, I wonder if "equivalent to" code should be added to the section for enumerate() and map(). Also since any() and all() have "equivalent to" code, I think min(), max() and sum() deserve it as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 21:02:33 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 08 Oct 2010 19:02:33 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286564553.4.0.921126839186.issue10029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Refuse the temptation to hypergeneralize ;-) Also refuse the temptation to double the size of the docs (more != better). In the case of min/max, the pure python versions may add some value in showing that the first match is what is returned. But the code will also be a bit convoluted because it needs paths for key-argument case and for the screwy interpretation of 1 arg vs multiple args. The pure python code is there for any() and all() to show the early out feature and to suggest how you could roll-your-own if you want different behavior (such as returning the value of the first exception). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 8 23:59:48 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Oct 2010 21:59:48 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286575187.91.0.362431922311.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You initial link I only see one entry, Thread (class in threading), which points to http://docs.python.org/library/threading.html#threading.Thread as it should. I do not see a duplicate link nearby. I have no idea what ', [1]' is supposed to mean. What does puzzle me is that Thread [neader, no link] module points to http://docs.python.org/c-api/init.html#index-64 it seems like the entry should have more. This entry is gone in 3.1. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 00:55:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Oct 2010 22:55:20 +0000 Subject: [docs] [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286578520.62.0.554078688413.issue10021@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a bug report in that there is a discrepancy between the grammar in the doc and the behavior. Laxiness can lead to portability problems if CPython is lax compared to a normal reading of the spec and another implementation takes the spec seriously. I agree that implementation details that lead to an exception here and not there, or vice versa, are best avoided. For getattr: ''' getattr(object, name[, default]) Return the value of the named attributed of object. name must be a string. ''' the doc is careful to just say that name must be a string, not specifically an identifier. Given that, I suppose "attribute_name ::= identifier" should be changed to match so that string formats can always (all implementations) also access non-identifier attributes. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 01:29:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 08 Oct 2010 23:29:21 +0000 Subject: [docs] [issue7642] Minor improvement to os.system doc In-Reply-To: <1262745991.38.0.384719539781.issue7642@psf.upfronthosting.co.za> Message-ID: <1286580561.47.0.952785498538.issue7642@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. (Before committing, one space should be changed to two spaces after a full stop in the first diff hunk.) ---------- assignee: georg.brandl -> docs at python nosy: +docs at python stage: -> patch review title: [patch] Minor improvement in os.system doc -> Minor improvement to os.system doc versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 01:55:23 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 08 Oct 2010 23:55:23 +0000 Subject: [docs] [issue10043] UnboundLocalError with local variable set by setattr, caused by code run later In-Reply-To: <1286446430.16.0.85312530766.issue10043@psf.upfronthosting.co.za> Message-ID: <1286582123.46.0.60230979674.issue10043@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The usual way to set a module variable by name, rather than setattr(modules[__name__], 'name', 'value') is >>> globals()['name'] = 2 >>> name 2 Issues of working with external names, such as from database columns, has been discussed several times on python-list and the corresponding newsgroups. Please post there is you want to discuss that. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 03:38:12 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 09 Oct 2010 01:38:12 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286588292.52.0.185874932406.issue10008@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: > You initial link > I only see one entry, Thread (class in threading), which points to > http://docs.python.org/library/threading.html#threading.Thread > as it should. I do not see a duplicate link nearby. It used to be there. Please see http://docs.python.org/release/2.7/genindex-T.html But ZipFile seems to have same issue, and still there. Please see http://docs.python.org/genindex-Z.html >Thread [neader, no link] > module Hmm, I cannot see this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 19:56:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 09 Oct 2010 17:56:08 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286646968.72.0.0980725530183.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: *Your initial post* only lists one index entry, and *does not* describe a problem. Thread module is in the file you have pointed to twice, in its alphabetical position. I have no idea what you think is wrong with the z section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 20:02:00 2010 From: report at bugs.python.org (Jan Kratochvil) Date: Sat, 09 Oct 2010 18:02:00 +0000 Subject: [docs] [issue10057] Unclear if exception should be set In-Reply-To: <1286647320.48.0.566967627744.issue10057@psf.upfronthosting.co.za> Message-ID: <1286647320.48.0.566967627744.issue10057@psf.upfronthosting.co.za> New submission from Jan Kratochvil : http://docs.python.org/py3k/c-api/object.html PyObject_GetItem Return element [...] or NULL on failure. Found element => return its pointer. Found no element => return NULL (with no exception set). But it is unclear whether the function can also: Error happened => return NULL with an exception set. It affects multiple versions of the doc, did not check which all. ---------- assignee: docs at python components: Documentation messages: 118281 nosy: docs at python, jankratochvil priority: normal severity: normal status: open title: Unclear if exception should be set versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 20:17:13 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 09 Oct 2010 18:17:13 +0000 Subject: [docs] [issue10057] Unclear if exception should be set In-Reply-To: <1286647320.48.0.566967627744.issue10057@psf.upfronthosting.co.za> Message-ID: <1286648232.88.0.827710073832.issue10057@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I find it quite clear. "failure" not only means that no item was found, but also that the operation failed, i.e. raised an exception. In general, a NULL pointer returned from a function that returns PyObject* *always* means that there is an exception. There is no need to repeat that every time. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 9 20:30:38 2010 From: report at bugs.python.org (Jan Kratochvil) Date: Sat, 09 Oct 2010 18:30:38 +0000 Subject: [docs] [issue10057] Unclear if exception should be set In-Reply-To: <1286647320.48.0.566967627744.issue10057@psf.upfronthosting.co.za> Message-ID: <1286649038.62.0.732237880991.issue10057@psf.upfronthosting.co.za> Jan Kratochvil added the comment: OK, I am not used to Python, thanks. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 01:37:58 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 09 Oct 2010 23:37:58 +0000 Subject: [docs] [issue10058] Unclear PyString_AsStringAndSize return value In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> New submission from Nikolaus Rath : http://docs.python.org/c-api/string.html says about the return value of AsStringAndSize: "If length is NULL, the resulting buffer may not contain NUL characters; if it does, the function returns -1 and a TypeError is raised." "If string is not a string object at all, PyString_AsStringAndSize() returns -1 and raises TypeError." This makes me wonder what the return code is if a) the function succeeds and b) it encounteres some other problem (i.e. out of memory when it tries to encode a unicode string into its default encoding). I guess that the return value is 0 on success and -1 on all errors, but it would be nice if the documentation would be clear about this. ---------- assignee: docs at python components: Documentation messages: 118294 nosy: Nikratio, docs at python priority: normal severity: normal status: open title: Unclear PyString_AsStringAndSize return value type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 02:06:30 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 10 Oct 2010 00:06:30 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286669190.0.0.757225138291.issue10008@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Well, please see r85262 (10/6). This issue seems to be recently solved in release27-maint. And http://docs.python.org/ was updated after that, so when I posted this issue, the issue was actually there, but when you saw that site, (probably after 10/6, the issue was gone) http://docs.python.org/release/2.7/ was created when officially Python2.7 was released, so we can see this issue still there. Like time machine. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 05:49:47 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 10 Oct 2010 03:49:47 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: Message-ID: <20101010034935.GA3487@remy> Senthil Kumaran added the comment: On Fri, Oct 08, 2010 at 06:25:26PM +0000, Alexander Belopolsky wrote: > In this case, I wonder if "equivalent to" code should be added to the > section for enumerate() and map(). Also since any() and all() have > "equivalent to" code, I think min(), max() and sum() deserve it as > well. I think, you are asking for consistency in docs, right? As a sidenote those explanations should be okay, but merging it with the explanation of the functions may add to confusion (like the zip example did in this case). Even I am +1 on removing that complex equivalent code in the zip documentation, as it can confusing to the newcomer. But I am also okay with moving that 'equivalent to code' further down in the explanation. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 07:12:18 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 Oct 2010 05:12:18 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286687537.95.0.977934080685.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If I understand, the issue you were concerned about has been fixed. If so, please close this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 07:57:14 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 10 Oct 2010 05:57:14 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286690234.07.0.896769863116.issue10029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Max, thanks for reporting this. I've replaced the sample code, making it work correctly and more clearly showing the logic. See r85345 and r85346. Daniel, we need to sync-up on the meaning of marking a report as "accepted". Traditionally it denotes an approved patch, not a agreement that the bug is valid. ---------- resolution: accepted -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 07:58:21 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 10 Oct 2010 05:58:21 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286690300.22.0.141371120723.issue10029@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 08:22:21 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 10 Oct 2010 06:22:21 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286691741.42.0.860197208608.issue10008@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Yes, but http://docs.python.org/genindex-Z.html ZipFile (class in zipfile), [1] still has same issue, no? [1] (and [2], [3], if exist) should suggest alternatives, but it doesn't now. I'll attach the patch to detect this kind of duplication. I you say, probably this happens when same directive appears in rst file. For example, .. module:: zipfile .. class:: ZipFile .. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=False) Maybe I should have posted this issue to Sphinx tracker. ---------- Added file: http://bugs.python.org/file19181/search_pydoc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 08:28:42 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 10 Oct 2010 06:28:42 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286692122.8.0.412844015573.issue10029@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: > Daniel, we need to sync-up on the meaning of marking a report as > "accepted". Traditionally it denotes an approved patch, not a agreement > that the bug is valid. Woops! Thanks for the correction. For what it's worth, a quick search of issues with Resolution: accepted and Stage: needs patch suggests that ?ric Araujo has perhaps been using the same misinterpretation as I have. I'm not sure if I got the behavior from him, if he got it from me, or if we both arrived there independently. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 08:44:58 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 10 Oct 2010 06:44:58 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286693098.63.0.492712690639.issue10008@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Umm, I tried, but I couldn't post new issue with error. I believe Sphinx guys also look at this tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 09:10:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 10 Oct 2010 07:10:25 +0000 Subject: [docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286694625.26.0.220118184236.issue10029@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please pass the word along if you get a chance :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 10:41:45 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 10 Oct 2010 08:41:45 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286700105.68.0.334288200018.issue9921@psf.upfronthosting.co.za> Brian Brazil added the comment: That doesn't cover the os.path.join('', 'x') case, and I'm not sure it makes os.path.join('x//', 'y') clear - though that doesn't matter as much. How about making (2) "the result is simply path2 when path1 is empty or path2 is an absolute path? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 16:56:00 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 10 Oct 2010 14:56:00 +0000 Subject: [docs] [issue10064] link to page with documentation bugs In-Reply-To: <1286722559.84.0.874686130461.issue10064@psf.upfronthosting.co.za> Message-ID: <1286722559.84.0.874686130461.issue10064@psf.upfronthosting.co.za> New submission from anatoly techtonik : Link to bugtracker on http://docs.python.org/dev/bugs.html leads to main roundup page. It make more sense to redirect to a page that lists only documentation bugs. Extra points: - sort the landing page that Easy, then issues with Patches come first - provide a link to Documentation HOWTO from an issue page ---------- assignee: docs at python components: Documentation messages: 118334 nosy: docs at python, techtonik priority: normal severity: normal status: open title: link to page with documentation bugs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 21:31:48 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Sun, 10 Oct 2010 19:31:48 +0000 Subject: [docs] [issue10065] future_builtins' docstring lacks some functions In-Reply-To: <1286739108.25.0.226461556953.issue10065@psf.upfronthosting.co.za> Message-ID: <1286739108.25.0.226461556953.issue10065@psf.upfronthosting.co.za> New submission from Andreas St?hrk : Title says all, attached is a patch against release27-maint that adds them. ---------- assignee: docs at python components: Documentation files: future_builtins_docstring.patch keywords: patch messages: 118343 nosy: Trundle, docs at python priority: normal severity: normal status: open title: future_builtins' docstring lacks some functions versions: Python 2.7 Added file: http://bugs.python.org/file19183/future_builtins_docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 10 21:55:19 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 10 Oct 2010 19:55:19 +0000 Subject: [docs] [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1286740519.53.0.509694486664.issue10008@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When I initially wrote "I have no idea what ', [1]' is supposed to mean. ", you should have believed that and explained ;-). I now understand that most index entries have one link, which we might call the [0] link. When the entry should have more than one link, the index entry text is followed by '[1]' and, if needed, '[2]', '[3]', and so on. These place-holder labels should each have different links, or should not be there at all. So "ZipFile (class in zipfile" and "[1]" are two separate texts that should have two different links, but the two links are the same, and that, I agree, is wrong. Another example with duplicate links: tracer() (in module turtle), [1] 3.1.2 and 3.2a2 indexes have Zipfile error but not tracer error (because '[1]' is not present). Doc people: the attached patch is a diagnostic patch rather than a fixup patch. I do not know whether the problem is in .rst sources or Sphinx. ---------- assignee: docs at python -> keywords: +patch nosy: +georg.brandl stage: -> needs patch type: -> behavior versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 11 17:49:05 2010 From: report at bugs.python.org (Rafe H. Kettler) Date: Mon, 11 Oct 2010 15:49:05 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286812145.54.0.592904954887.issue9921@psf.upfronthosting.co.za> Rafe H. Kettler added the comment: I think Brian's second solution ("the result is simply path2 when path1 is empty or path2 is an absolute path?") is a strong one. If that were tacked on towards the end it would add some clarity to the docs for people who will end up using this behavior or want a more in-depth explanation. At the same time, I think putting it towards the end (as more of a side note, like the bit about behavior on Windows with drive names) lets less sophisticated users (like me) ignore that piece of documentation. ---------- nosy: +Rafe.H..Kettler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 11 17:58:07 2010 From: report at bugs.python.org (Radu Grigore) Date: Mon, 11 Oct 2010 15:58:07 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286812687.1.0.477203999734.issue9921@psf.upfronthosting.co.za> Radu Grigore added the comment: posixpath.py's comment says ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 11 18:01:05 2010 From: report at bugs.python.org (Radu Grigore) Date: Mon, 11 Oct 2010 16:01:05 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286812864.97.0.116057405068.issue9921@psf.upfronthosting.co.za> Radu Grigore added the comment: Realizing I still don't know what os.join.path does, I looked at the source. The comment in posixpath.py is: # Ignore the previous parts if a part is absolute. # Insert a '/' unless the first part is empty or already ends in '/'. I find this clear and it directly corresponds to the implementation. On the other hand, the source of ntpath.join() is a nightmare, and there's no similarly simple comment there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 11 18:33:12 2010 From: report at bugs.python.org (Rafe H. Kettler) Date: Mon, 11 Oct 2010 16:33:12 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286814792.06.0.851080035144.issue9921@psf.upfronthosting.co.za> Rafe H. Kettler added the comment: Radu, while the comments are not as clear for ntpath, the behavior is the same. So, the comment you detailed from posixpath could be adapted to Windows by replacing '/' with 'a separator' or something of that nature. That said, the comment in posixpath could be adapted to clear english like so: join() inserts a separator unless the first part is empty or already ends in a separator. If a part is absolute, join() ignores the previous parts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 11 18:51:24 2010 From: report at bugs.python.org (Radu Grigore) Date: Mon, 11 Oct 2010 16:51:24 +0000 Subject: [docs] [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1286815884.57.0.552954047391.issue9921@psf.upfronthosting.co.za> Changes by Radu Grigore : ---------- nosy: -rgrig _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 11:20:14 2010 From: report at bugs.python.org (Daniel Abel) Date: Tue, 12 Oct 2010 09:20:14 +0000 Subject: [docs] [issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section In-Reply-To: <1286875214.59.0.114835470036.issue10067@psf.upfronthosting.co.za> Message-ID: <1286875214.59.0.114835470036.issue10067@psf.upfronthosting.co.za> New submission from Daniel Abel : Both the 2.x and 3.x documentation for itertools has izip_longest (zip_longest for 3.x) in the "Iterators terminating on the shortest input sequence" section. However, according to izip_longest's documentation, it terminates when the _longest_ iterator is exhausted. Possible fixes might be: - put izip_longest in a new "Iterators terminating on the longest input sequence" section - rename section to "Iterators terminating on one of the input sequences" ---------- assignee: docs at python components: Documentation messages: 118407 nosy: abeld, docs at python priority: normal severity: normal status: open title: itertools' docs put izip_longest in the "terminating on the shortest input sequence" section versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From HTFelfer at TWin.at Sun Oct 3 22:55:37 2010 From: HTFelfer at TWin.at (Hans Felfer) Date: Sun, 3 Oct 2010 22:55:37 +0200 Subject: [docs] example for str.format Message-ID: <4BCA714E79754B2FAB1E0BF7D854A21F@htfelferhaupt> I spent do many time for find format for fload str.format('X{0:.2f} Y{1:.3f} Z{2:.3f}',a,b,c) -------------- next part -------------- An HTML attachment was scrubbed... URL: From davitadze.tengiz at gmail.com Mon Oct 4 15:02:44 2010 From: davitadze.tengiz at gmail.com (Tengiz Davitadze) Date: Mon, 4 Oct 2010 17:02:44 +0400 Subject: [docs] HELP with Georgian language Message-ID: I am beginning of using Unicode in python. can you please help me to figure out how to paste Georgian letters or how to import Georgian Unicode into python regards -- Tengiz Davitadze { Future in Quantum } -------------- next part -------------- An HTML attachment was scrubbed... URL: From guzl86 at qq.com Tue Oct 5 16:47:31 2010 From: guzl86 at qq.com (=?gb2312?B?ucXWvsDa?=) Date: Tue, 5 Oct 2010 22:47:31 +0800 Subject: [docs] how to using it? Message-ID: <000001cb649c$3ec477d0$bc4d6770$@com> Hi: ?a[i:j, k:l]? in the python 2.5 documentation. But I don?t know how to using it. There is a error if I run this codes: >>> a = "abcdefghigklmn" >>> a[1:3, 4:7] Traceback (most recent call last): File "", line 1, in TypeError: string indices must be integers Please give me a right code . Thank you very much. Guzl 2010-10-5 22:45:33 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ocean-city at m2.ccsnet.ne.jp Sun Oct 10 14:36:39 2010 From: ocean-city at m2.ccsnet.ne.jp (Hirokazu Yamamoto) Date: Sun, 10 Oct 2010 21:36:39 +0900 Subject: [docs] Visited links in Header/Footer are not visible in IE6 Message-ID: <4CB1B357.4060006@m2.ccsnet.ne.jp> Hello. As subject says, visited links in header/footer in index.html are not visible in IE6 (Windows). Screenshot attached. I believe priority is very low, because IE6 is legacy browser. I confirmed this can be workarounded by removing a:visited { color: #355f7c; text-decoration: none; } from _static/default.css. And I'm not sure this is correct or not. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 3044 bytes Desc: not available URL: From David.Villa at uclm.es Tue Oct 12 12:12:07 2010 From: David.Villa at uclm.es (David Villa) Date: Tue, 12 Oct 2010 12:12:07 +0200 Subject: [docs] Translation of "Socket Programming HOWTO" Message-ID: Hi: I translated the "Socket Programming HOWTO"[1] some years ago [2]. I would know the exact license of that document because I would extend the translation with my own content and publish it. Thank you. [1] http://docs.python.org/dev/howto/sockets.html [2] http://wiki.python.org/moin/HowTo/Sockets From report at bugs.python.org Tue Oct 12 15:32:10 2010 From: report at bugs.python.org (Rafe H. Kettler) Date: Tue, 12 Oct 2010 13:32:10 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> New submission from Rafe H. Kettler : I think that the documentation for ftplib is a bit too concise and assumes that the reader in an expert in the protocol when the point of the module is to abstract out such details. For example, for the error documentation, the exceptions are only explained by the error code the server can return to trigger them. So, while the explanation of error_perm, for example, should say something about permissions, it just says "raised when an error code in the range 500?599 is received." This is particularly unclear for those with no knowledge of the internals of the protocol. Also, in the documentation for RetrLines(), the documentation mentions the options LIST, NLST, and MLSD without explaining what they are. I know that when I first started using ftplib I had to experiment with each option to determine what they do, and I think it would be better if this was clear in the docs from the start. This can become particularly unclear for less FTP-savvy users. I can propose a patch to the documentation if needed. ---------- assignee: docs at python components: Documentation messages: 118423 nosy: Rafe.H..Kettler, docs at python, orsenthil priority: normal severity: normal status: open title: ftplib documentation is unclear type: feature request versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 15:59:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 12 Oct 2010 13:59:39 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286891979.36.0.379452667451.issue10072@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 19:12:45 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 12 Oct 2010 17:12:45 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286903565.63.0.0152440606512.issue10072@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: A patch would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 19:17:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 12 Oct 2010 17:17:12 +0000 Subject: [docs] [issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section In-Reply-To: <1286875214.59.0.114835470036.issue10067@psf.upfronthosting.co.za> Message-ID: <1286903832.36.0.428280910368.issue10067@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +rhettinger versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:17:08 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 12 Oct 2010 18:17:08 +0000 Subject: [docs] [issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section In-Reply-To: <1286875214.59.0.114835470036.issue10067@psf.upfronthosting.co.za> Message-ID: <1286907428.45.0.946924635877.issue10067@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I saw that when I put in in. It doesn't fit the overall category but it does belong in the same general grouping and the notes make the semantics clear, so there is no harm in it and I like the current presentation better than the alternatives. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:17:43 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 12 Oct 2010 18:17:43 +0000 Subject: [docs] [issue10067] itertools' docs put izip_longest in the "terminating on the shortest input sequence" section In-Reply-To: <1286875214.59.0.114835470036.issue10067@psf.upfronthosting.co.za> Message-ID: <1286907463.7.0.855144427549.issue10067@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:55:24 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 18:55:24 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286909724.95.0.458613578145.issue10072@psf.upfronthosting.co.za> Rafe Kettler added the comment: I've drafted up a patch. For those of you who don't want to read the diff, it changes all references to FTP reply codes with short explanations of what they do. Also, in the docs for retrlines() and nlst() the commands LIST, NLST, and MLSD are explained. Attached is the patch. ---------- Added file: http://bugs.python.org/file19201/ftplib-patch.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:55:42 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 18:55:42 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286909742.14.0.0970977148687.issue10072@psf.upfronthosting.co.za> Changes by Rafe Kettler : ---------- keywords: +patch Added file: http://bugs.python.org/file19202/ftplib-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:56:14 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 18:56:14 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286909774.99.0.580831899593.issue10072@psf.upfronthosting.co.za> Changes by Rafe Kettler : Removed file: http://bugs.python.org/file19201/ftplib-patch.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 20:57:00 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 18:57:00 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286909820.33.0.970395013297.issue10072@psf.upfronthosting.co.za> Changes by Rafe Kettler : Added file: http://bugs.python.org/file19203/ftplib-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 21:10:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 12 Oct 2010 19:10:50 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286910649.96.0.969171403855.issue10072@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. Before committing, spaces after full stops should be doubled. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 21:22:44 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 19:22:44 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286911364.04.0.840021550517.issue10072@psf.upfronthosting.co.za> Changes by Rafe Kettler : Removed file: http://bugs.python.org/file19203/ftplib-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 12 21:23:10 2010 From: report at bugs.python.org (Rafe Kettler) Date: Tue, 12 Oct 2010 19:23:10 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1286911390.9.0.937296258938.issue10072@psf.upfronthosting.co.za> Rafe Kettler added the comment: Double spaced after the sentence ending periods. ---------- Added file: http://bugs.python.org/file19204/ftplib-patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 01:05:35 2010 From: report at bugs.python.org (Retro) Date: Tue, 12 Oct 2010 23:05:35 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> New submission from Retro : There's a typo in the docs. Please follow http://docs.python.org/py3k/library/string.html#format-specification-mini-language and find the below text, and fix the word 'Postive' to 'Positive', indicated between >>> and <<<: 'g' General format. For a given precision p >= 1, this rounds the number to p significant digits and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude. The precise rules are as follows: suppose that the result formatted with presentation type 'e' and precision p-1 would have exponent exp. Then if -4 <= exp < p, the number is formatted with presentation type 'f' and precision p-1-exp. Otherwise, the number is formatted with presentation type 'e' and precision p-1. In both cases insignificant trailing zeros are removed from the significand, and the decimal point is also removed if there are no remaining digits following it. >>>Postive<<< and negative infinity, positive and negative zero, and nans, are formatted as inf, -inf, 0, -0 and nan respectively, regardless of the precision. A precision of 0 is treated as equivalent to a precision of 1. ---------- assignee: docs at python components: Documentation messages: 118482 nosy: Retro, docs at python priority: normal severity: normal status: open title: Documentation: 'Postive' should be 'Positive' versions: 3rd party, 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 Oct 13 01:07:39 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 12 Oct 2010 23:07:39 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286924859.68.0.817487802966.issue10078@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85395. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 01:19:09 2010 From: report at bugs.python.org (Retro) Date: Tue, 12 Oct 2010 23:19:09 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286925549.79.0.0217778110848.issue10078@psf.upfronthosting.co.za> Retro added the comment: Please commit this fix to the trunk, as well as to the Python 2.5, Python 2.6, and Python 2.7 branches. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 01:19:33 2010 From: report at bugs.python.org (Retro) Date: Tue, 12 Oct 2010 23:19:33 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286925573.64.0.717415887069.issue10078@psf.upfronthosting.co.za> Changes by Retro : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 01:19:49 2010 From: report at bugs.python.org (Retro) Date: Tue, 12 Oct 2010 23:19:49 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286925589.55.0.0770673408046.issue10078@psf.upfronthosting.co.za> Changes by Retro : ---------- resolution: fixed -> remind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 01:21:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 12 Oct 2010 23:21:48 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286925708.2.0.901806614168.issue10078@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done for all branches that are maintained. ---------- resolution: remind -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 18:10:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 13 Oct 2010 16:10:08 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1286986208.43.0.9177500722.issue10078@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 13 22:01:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 13 Oct 2010 20:01:31 +0000 Subject: [docs] [issue10078] Documentation: 'Postive' should be 'Positive' In-Reply-To: <1286924735.29.0.0342537376676.issue10078@psf.upfronthosting.co.za> Message-ID: <1287000091.65.0.1603624556.issue10078@psf.upfronthosting.co.za> Georg Brandl added the comment: @OP: In general, we do apply such changes to all branches they can be fixed in. Since this is done by merging from py3k to the other branches, it can be done later than the commit to py3k, or in batches. Please leave that branch management to us. ---------- nosy: +georg.brandl versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 08:36:19 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 14 Oct 2010 06:36:19 +0000 Subject: [docs] [issue7642] Minor improvement to os.system doc In-Reply-To: <1262745991.38.0.384719539781.issue7642@psf.upfronthosting.co.za> Message-ID: <1287038179.04.0.140722232907.issue7642@psf.upfronthosting.co.za> Georg Brandl added the comment: Unfortunately, the rewrap makes it much more complicated to see what the patch changes (i.e. the whole second part of the hunk only adds Windows versions). Please leave that to the committer in the future. Otherwise, committed in r85450; I also removed mention of the unsupported Win9x family. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 08:43:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 14 Oct 2010 06:43:32 +0000 Subject: [docs] [issue10046] Correction to atexit documentation In-Reply-To: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za> Message-ID: <1287038612.36.0.538180973139.issue10046@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85452. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 08:44:25 2010 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 14 Oct 2010 06:44:25 +0000 Subject: [docs] [issue7642] Minor improvement to os.system doc In-Reply-To: <1287038179.04.0.140722232907.issue7642@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Thu, Oct 14, 2010 at 08:36, Georg Brandl wrote: > > Georg Brandl added the comment: > > Unfortunately, the rewrap makes it much more complicated to see what ?the patch changes (i.e. the whole second part of the hunk only adds Windows versions). ?Please leave that to the committer in the future. Sorry about that :( I'll just leave a note on the tracker if the changed paragraphs are in need of wrap (but I guess the committer would notice anyhow ;) . > Otherwise, committed in r85450; I also removed mention of the unsupported Win9x family. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 08:48:56 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 14 Oct 2010 06:48:56 +0000 Subject: [docs] [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1287038936.31.0.997988648847.issue9093@psf.upfronthosting.co.za> Georg Brandl added the comment: This is indeed fixed already. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 10:42:45 2010 From: report at bugs.python.org (=?utf-8?q?K=C3=A1lm=C3=A1n_Gergely?=) Date: Thu, 14 Oct 2010 08:42:45 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> New submission from K?lm?n Gergely : socket.fromfd()'s behaviour is somewhat counter-intutive and should contain a note to warn the user that it'll leave the original FD open. This is important if someone forgets to manually close the file descriptor as it might lead to FD leaks (and kernel memory leaks). This is especially the case when there is no python object associated with the FD, so no destruction will take place. patch applies to this: http://docs.python.org/py3k/archives/python-3.1.2-docs-html.tar.bz2 The only thing it does is that it adds a note section with the following message: "The original file descriptor will not be closed." synapse ---------- assignee: docs at python components: Documentation files: fromfd_doc.patch keywords: patch messages: 118637 nosy: docs at python, synapse priority: normal severity: normal status: open title: socket.fromfd() documentation problem type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file19230/fromfd_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 10:44:37 2010 From: report at bugs.python.org (=?utf-8?q?K=C3=A1lm=C3=A1n_Gergely?=) Date: Thu, 14 Oct 2010 08:44:37 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287045877.13.0.369182259515.issue10099@psf.upfronthosting.co.za> K?lm?n Gergely added the comment: Forgot to add that the changes should be applied to all versions if accepted. synapse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 12:53:09 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 14 Oct 2010 10:53:09 +0000 Subject: [docs] [issue10100] fromfd is now available on all platforms In-Reply-To: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> Message-ID: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : fromfd is marked as Availability: Unix, but in Python 3 it is also available on Windows: C:\>c:\python31\python.exe Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.fromfd The following lines can also be removed from testFromFd: if not hasattr(socket, "fromfd"): return # On Windows, this doesn't exist ---------- assignee: docs at python components: Documentation messages: 118646 nosy: docs at python, stutzbach priority: normal severity: normal stage: needs patch status: open title: fromfd is now available on all platforms type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 12:53:13 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 14 Oct 2010 10:53:13 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287053593.65.0.252326222866.issue10099@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 14 15:16:36 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 14 Oct 2010 13:16:36 +0000 Subject: [docs] [issue10065] future_builtins' docstring lacks some functions In-Reply-To: <1286739108.25.0.226461556953.issue10065@psf.upfronthosting.co.za> Message-ID: <1287062196.32.0.478624405456.issue10065@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in revision 85479. ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:50:08 2010 From: report at bugs.python.org (Paul Bolle) Date: Fri, 15 Oct 2010 06:50:08 +0000 Subject: [docs] [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> New submission from Paul Bolle : 0) I ran into some (small) problems with the documentation added by revision 62195 (see issue 815646 for background). 1) A small patch that addresses two problems with the Python 2.7 documentation should be attached: - link three occurrences of "GIL" to the GIL entry in the glossary; and - add some example code to clarify the usage of PyFile_IncUseCount() andPyFile_DecUseCount(). 2) That patch also adds a link to the "Thread State and the Global Interpreter Lock" section to the GIL entry in the Documentation index. That is a separate problem. But fixing that minor problem could also be of help to people (like me) that need to better understand the GIL aspects of those two functions. ---------- assignee: docs at python components: Documentation files: python-2.7-Doc-gil.patch keywords: patch messages: 118742 nosy: docs at python, pebolle priority: normal severity: normal status: open title: Minor problems with PyFileObject documentation (Doc/c-api/file.rst) versions: Python 2.7 Added file: http://bugs.python.org/file19241/python-2.7-Doc-gil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:52:42 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 06:52:42 +0000 Subject: [docs] [issue10100] fromfd is now available on all platforms In-Reply-To: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> Message-ID: <1287125562.29.0.936168350795.issue10100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: You already changed the test in r84449! The doc still needs updating. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 10:59:49 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 08:59:49 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287133189.07.0.631257704063.issue10099@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I think, the original docs *is* pretty intuitive. It says "Duplicate the file descriptor fd and build a socket object". No one will think that the this method will close the original fd. Person using this method might of course, explicitly close the original fd in some other part of the code (as he may use it after creating the socket object too). If at all anything is required, a line may be "The original file descriptor is unaffected", but again that seems redundant to me. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:02:52 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 09:02:52 +0000 Subject: [docs] [issue10100] fromfd is now available on all platforms In-Reply-To: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> Message-ID: <1287133372.07.0.589189996487.issue10100@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Docs changed committed in revision 85514. ---------- nosy: +orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:17:30 2010 From: report at bugs.python.org (=?utf-8?q?Gergely_K=C3=A1lm=C3=A1n?=) Date: Fri, 15 Oct 2010 09:17:30 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287134249.94.0.837599769533.issue10099@psf.upfronthosting.co.za> Gergely K?lm?n added the comment: You are perfectly right, the docs are pretty clear. Although fromfd means (or at least to me) to "attach object to fd" and not "duplicate then attach to the duplicate". If someone forgets this particular behaviour and thinks that the function works as the name implies they're in trouble. Gergely Kalman ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:43:47 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 09:43:47 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287135827.68.0.753412957838.issue10099@psf.upfronthosting.co.za> Senthil Kumaran added the comment: So, I assume that we just leave it as such and close the issue. I was thinking if anything needs to be updated for function __doc__ but even there 'the duplicate' word is explained. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 13:10:11 2010 From: report at bugs.python.org (Paul Bolle) Date: Fri, 15 Oct 2010 11:10:11 +0000 Subject: [docs] [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1287141011.04.0.885614255791.issue8340@psf.upfronthosting.co.za> Changes by Paul Bolle : ---------- nosy: +pebolle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:53:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 13:53:12 +0000 Subject: [docs] [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1287150792.25.0.354562469584.issue10108@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:00:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:00:06 +0000 Subject: [docs] [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287151206.09.0.435306209219.issue10099@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: invalid -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:04:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:04:57 +0000 Subject: [docs] [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287151497.86.0.249367781937.issue10111@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:26:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:26:25 +0000 Subject: [docs] [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1287156385.84.0.317978393039.issue8340@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:31:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:31:17 +0000 Subject: [docs] [issue8267] Tutorial section on dictionary keys recommends sort instead of sorted In-Reply-To: <1269976733.25.0.679757604507.issue8267@psf.upfronthosting.co.za> Message-ID: <1287156677.49.0.662325772558.issue8267@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85529. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:36:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:36:08 +0000 Subject: [docs] [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1287160567.48.0.515998454764.issue7303@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed markup a bit and committed in r85538. Thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:53:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:53:39 +0000 Subject: [docs] [issue4968] Clarify inspect.is method docs In-Reply-To: <1232162769.03.0.624026715862.issue4968@psf.upfronthosting.co.za> Message-ID: <1287161619.83.0.806775659691.issue4968@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed suggestions with a few changes in r85541. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:01:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:01:21 +0000 Subject: [docs] [issue7790] struct_time documentation entry should point to the table defining the tuple In-Reply-To: <1264538314.16.0.129243655657.issue7790@psf.upfronthosting.co.za> Message-ID: <1287162081.66.0.676243575715.issue7790@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, moved the table down in r85542. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:20:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:20:22 +0000 Subject: [docs] [issue7450] document that os.chmod accepts an octal digit mode In-Reply-To: <1260201260.24.0.734078851389.issue7450@psf.upfronthosting.co.za> Message-ID: <1287163222.49.0.165887148935.issue7450@psf.upfronthosting.co.za> Georg Brandl added the comment: We now have the S_IXXX constants documented explicitly, so I don't think this change is needed. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:53:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:53:14 +0000 Subject: [docs] [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287165194.86.0.0350283020424.issue10111@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85545. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:01:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 19:01:28 +0000 Subject: [docs] [issue10058] Unclear PyString_AsStringAndSize return value In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287169288.28.0.247584361258.issue10058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not much familiar with the C api but I presume that all functions return -1 on error and that this is documented somewhere in the beginning. I also presume that functions that return values thru passed in pointers and that are documented as returning an integer type return 0 on success. And ditto on some general note somewhere. I do not think that such should be repeated for each function. So without further justification, I would be inclined to close this. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:21:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:21:55 +0000 Subject: [docs] [issue10058] Unclear PyString_AsStringAndSize return value In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287170515.2.0.22900522496.issue10058@psf.upfronthosting.co.za> Georg Brandl added the comment: Same here. There is only ever one return value on error unless documented otherwise, since the type of error is already contained in the exception that is set on return. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:37:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:37:25 +0000 Subject: [docs] [issue10064] link to page with documentation bugs In-Reply-To: <1286722559.84.0.874686130461.issue10064@psf.upfronthosting.co.za> Message-ID: <1287171445.13.0.538274447198.issue10064@psf.upfronthosting.co.za> Georg Brandl added the comment: The reference you're referring to is in the section about bugs in Python: """ Bug reports for Python itself should be submitted via the Python Bug Tracker (http://bugs.python.org/). """ and it is placed below the section dealing with documentation bugs. As such, this request is a "works for me". ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:46:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:46:34 +0000 Subject: [docs] [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1287171994.29.0.751778799201.issue10072@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed after review in r85548. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 04:00:17 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 16 Oct 2010 02:00:17 +0000 Subject: [docs] [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287194417.21.0.0527383572279.issue10058@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Georg, this is an important piece of information, but I think it is not yet clearly stated in the documentation. Here is what http://docs.python.org/c-api/intro.html says about return codes: "In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns an error indicator ? usually NULL or -1. A few functions return a Boolean true/false result, with false indicating an error. Very few functions return no explicit error indicator or have an ambiguous return value, and require explicit testing for errors with PyErr_Occurred()." If this is meant to say that a function returns *only* -1 or NULL in case of an error, *unless documented otherwise* I suggest that the wording be changed to reflect that. Maybe like this: "In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns either NULL or -1 (depending on what is compatible with the function's type). If a functions documentation does not say otherwise, the function can be assumed to follow this convention. Nevertheless, a few functions return a Boolean true/false result, with false indicating an error, and very few functions return no explicit error indicator or have an ambiguous return value, and require explicit testing for errors with PyErr_Occurred()." Wouldn't that be a reasonable change? ---------- title: Unclear PyString_AsStringAndSize return value -> C-API Intro should be more explicit about error return codes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 06:40:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Oct 2010 04:40:35 +0000 Subject: [docs] [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287204034.18.0.272092469837.issue10058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Assuming it is true, the rewrite strikes me as an improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 16:09:04 2010 From: report at bugs.python.org (Retro) Date: Sat, 16 Oct 2010 14:09:04 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> New submission from Retro : Please read the first sentence of the docs for the built-in function getattr() here: http://docs.python.org/library/functions.html?highlight=getattr#getattr Fix the word 'attributed' to 'attribute', because the former is a typo. A side question. When you document an object's API in the docstring, you write it like this: getattr(object, name[, default]) -> value Don't you find it nicer if that would look like this: getattr(object, name, [default]) -> value Note the cosmetic fix between the arguments 'name' and 'default'. Do you find my fix acceptable? If yes, please fix docstrings in Python that document the object's API from the '...name[, default]...' format to '...name, [default]...' format. ---------- assignee: docs at python components: Documentation messages: 118869 nosy: Retro, docs at python priority: normal severity: normal status: open title: Documentation typo fix and a side question versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:48:48 2010 From: report at bugs.python.org (Paul Bolle) Date: Sat, 16 Oct 2010 15:48:48 +0000 Subject: [docs] [issue10124] obvious typo in cporting HOWTO In-Reply-To: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> Message-ID: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> New submission from Paul Bolle : 0) There's an obvious typo in the cporting HOWTO: [...] It?s also important to remember that PyBytes and PyUnicode in 3.0 are not interchangeable like PyString and PyString are in 2.x. [...] That PyString and PyString are interchangeable is obviously not what the author wanted to tell. 1) I'll attach a patch to change this into what I suppose the author had in mind. (If I knew for sure I wouldn't have read that HOWTO in the first place.) ---------- assignee: docs at python components: Documentation files: python-2.7-Doc-pystring.patch keywords: patch messages: 118875 nosy: docs at python, pebolle priority: normal severity: normal status: open title: obvious typo in cporting HOWTO Added file: http://bugs.python.org/file19251/python-2.7-Doc-pystring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 18:28:50 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 16:28:50 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287246530.52.0.263551577672.issue10122@psf.upfronthosting.co.za> R. David Murray added the comment: No, that would be incorrect syntax (if you omit the optional argument you should also omit the comma that precedes it). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 18:29:36 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 16:29:36 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287246576.88.0.399969925251.issue10122@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> behavior versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 20:51:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Oct 2010 18:51:37 +0000 Subject: [docs] [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287255097.83.0.0906821721421.issue10122@psf.upfronthosting.co.za> Georg Brandl added the comment: Typo fixed in r85572. Otherwise, as David says. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 20:53:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Oct 2010 18:53:42 +0000 Subject: [docs] [issue10124] obvious typo in cporting HOWTO In-Reply-To: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> Message-ID: <1287255222.18.0.216695966722.issue10124@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is what was intended; rather str and unicode. Fixed in r85573. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From jesse at wefu.org Wed Oct 13 10:55:16 2010 From: jesse at wefu.org (Jesse Weinstein) Date: Wed, 13 Oct 2010 01:55:16 -0700 Subject: [docs] Example for itertools.groupby() Message-ID: <1286960116.10515.13.camel@zareason> I noticed that itertools.groupby() lacks an example of it's use. (as shown in the table at the top of: http://docs.python.org/library/itertools.html ). Here's one quick one I hacked up: [''.join([z for z in y]) for (x,y) in itertools.groupby("What's up, brown cow?",str.isalpha) if x] will print the words in the string. In a form more matching the existing examples: itertools.groupby("Hello, world!",str.isalpha) -> (True, "Hello"), (False, ", "), (True, "world"), (False, "!") Feel free to use it if you wish. I renounce any copyright interests I may have in it (if it's even long enough to avoid "de minimis"). Jesse Weinstein From roy at panix.com Fri Oct 15 02:57:26 2010 From: roy at panix.com (Roy Smith) Date: Thu, 14 Oct 2010 20:57:26 -0400 Subject: [docs] namedtuple documentation needs clarification Message-ID: <900E9434-CC39-49FC-8501-558357A39AB7@panix.com> At http://docs.python.org/library/collections.html#collections.namedtuple, the descriptions of the "verbose" and "rename" optional parameters to collections.namedtuple() do not specify the default values. I suspect they both default to False, but it should be explicitly stated. -- Roy Smith roy at panix.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From qin.y.nh at iomosaic.com Fri Oct 15 20:41:54 2010 From: qin.y.nh at iomosaic.com (Yangyong Qin) Date: Fri, 15 Oct 2010 14:41:54 -0400 Subject: [docs] Typo Report Message-ID: In the document: http://docs.python.org/py3k/tutorial/classes.html#a-word-about-names-and -objects You wrote: ======================================= In C++ terminology, normally class members (including the data members) are public (except see below Private Variables ), ... This is obviously a mistake. Please correct it. Best, Yangyong -------------- next part -------------- An HTML attachment was scrubbed... URL: From moloney at ohsu.edu Sat Oct 16 00:03:18 2010 From: moloney at ohsu.edu (Brendan Moloney) Date: Fri, 15 Oct 2010 15:03:18 -0700 Subject: [docs] New parameter not flagged in multiprocessing.Pool Message-ID: <5E25C96030E66B44B9CFAA95D3DE591934FACEBA7A@EX-MB08.ohsu.edu> The parameter 'maxtasksperchild' for the __init__ function of multiprocessing.Pool was added in version 2.7 but this is not noted in the docs. Thanks, Brendan Moloney Senior Research Assistant / Programmer Advanced Imaging Research Center Oregon Health Science University From georg at python.org Sun Oct 17 08:25:47 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 08:25:47 +0200 Subject: [docs] how to using it? In-Reply-To: <000001cb649c$3ec477d0$bc4d6770$@com> References: <000001cb649c$3ec477d0$bc4d6770$@com> Message-ID: <4CBA96EB.4010602@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 05.10.2010 16:47, schrieb ???: > Hi: > > ?|a[i:j, k:l]|? in the python 2.5 documentation. > > But I don?t know how to using it. > > There is a error if I run this codes: > >>>> a = "abcdefghigklmn" > >>>> a[1:3, 4:7] > > Traceback (most recent call last): > > File "", line 1, in > > TypeError: string indices must be integers > > > > Please give me a right code . Hi Guzl, while this syntax itself is supported in Python, it is not defined or supported by any of the core types. If you want to get different ranges of a string concatenated, you'll need to do this explicitly: a[1:3] + a[4:7] regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6lusACgkQN9GcIYhpnLDRZQCfSPoGrdKA9otxHS5ObtT3NeXk nm4AnAg6cDkt3mlZIwVud36B5+E4NgJb =NtmF -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 08:34:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 06:34:47 +0000 Subject: [docs] [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287297287.51.0.347809803759.issue10058@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a change in that spirit in r85606. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 08:35:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 06:35:48 +0000 Subject: [docs] [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1287297348.38.0.816788444443.issue10024@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 08:22:46 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 08:22:46 +0200 Subject: [docs] Typo Report In-Reply-To: References: Message-ID: <4CBA9636.5020309@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.10.2010 20:41, schrieb Yangyong Qin: > In the document: > > > > http://docs.python.org/py3k/tutorial/classes.html#a-word-about-names-and-objects > > > > You wrote: > > ======================================= > > In C++ terminology, normally class members (including the data members) > are /public/ (except see below /Private Variables/ > ), ? > > > > This is obviously a mistake. Please correct it. Hi Yangyong, I'm not sure what the "obvious" mistake here is -- could you explain a bit more? Thanks, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6ljYACgkQN9GcIYhpnLCc/ACfSHxsCDTMjXT9baVySoTRHOFR Ik4AoJVEE2GlBZQ9OpZ7haXER4qDz34V =ZUbe -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 08:22:08 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 08:22:08 +0200 Subject: [docs] New parameter not flagged in multiprocessing.Pool In-Reply-To: <5E25C96030E66B44B9CFAA95D3DE591934FACEBA7A@EX-MB08.ohsu.edu> References: <5E25C96030E66B44B9CFAA95D3DE591934FACEBA7A@EX-MB08.ohsu.edu> Message-ID: <4CBA9610.2000306@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.10.2010 00:03, schrieb Brendan Moloney: > The parameter 'maxtasksperchild' for the __init__ function of > multiprocessing.Pool was added in version 2.7 but this is not noted in the > docs. Hi Brendan, thanks for the report, this is now fixed and will be online shortly. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6lhAACgkQN9GcIYhpnLAMeQCfccPZRfOxy5TcuINDlP7oUHQv zWgAnjDzjUcLTrnNt44A9ppM3L0mDOhM =3D8E -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 08:24:07 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 08:24:07 +0200 Subject: [docs] namedtuple documentation needs clarification In-Reply-To: <900E9434-CC39-49FC-8501-558357A39AB7@panix.com> References: <900E9434-CC39-49FC-8501-558357A39AB7@panix.com> Message-ID: <4CBA9687.6030200@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.10.2010 02:57, schrieb Roy Smith: > At http://docs.python.org/library/collections.html#collections.namedtuple, the > descriptions of the "verbose" and "rename" optional parameters to > collections.namedtuple() do not specify the default values. I suspect they both > default to False, but it should be explicitly stated. Thanks for the report, fixed in 2.7 branch! regars, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6locACgkQN9GcIYhpnLAcygCfQXHmBdHHnlCeOVHjZrQXi29I mRQAnROy9tzN4UIUZIkH7082M/4RpVA7 =lRyd -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 08:29:27 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 08:29:27 +0200 Subject: [docs] Translation of "Socket Programming HOWTO" In-Reply-To: References: Message-ID: <4CBA97C7.6080705@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.10.2010 12:12, schrieb David Villa: > Hi: > > I translated the "Socket Programming HOWTO"[1] some years ago [2]. I > would know the exact license of that document because I would extend > the translation with my own content and publish it. > > Thank you. > > [1] http://docs.python.org/dev/howto/sockets.html > [2] http://wiki.python.org/moin/HowTo/Sockets Hi David, the Python documentation is distributed under the same license as the rest of Python, the PSF license, which you can view here: http://docs.python.org/license.html In short, it is no problem for you to take the content and publish it as long as you acknowledge the PSF's copyright to the original text. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6l8cACgkQN9GcIYhpnLA58ACdECIwmUHZI93dGuxibNYYQdmg UJwAmwVYCVLp2J4p+04bcf3SlZX7KsnU =bbLu -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 11:19:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:19:13 +0000 Subject: [docs] [issue8556] Confusing string formatting examples In-Reply-To: <1272430647.21.0.217416978231.issue8556@psf.upfronthosting.co.za> Message-ID: <1287307153.0.0.455073929131.issue8556@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85609. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:23:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:23:16 +0000 Subject: [docs] [issue8686] "This isn't defined beyond that" phrase is not friendly to non-native English speakers. In-Reply-To: <1273576436.16.0.861526907899.issue8686@psf.upfronthosting.co.za> Message-ID: <1287307396.67.0.8460264315.issue8686@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed gloss in r85610. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:33:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:33:32 +0000 Subject: [docs] [issue8811] fixing sqlite3 docs for py3k In-Reply-To: <1274731029.07.0.155563755489.issue8811@psf.upfronthosting.co.za> Message-ID: <1287308012.01.0.214535517123.issue8811@psf.upfronthosting.co.za> Georg Brandl added the comment: This was mostly fixed already, committed rest in r85611. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:35:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:35:04 +0000 Subject: [docs] [issue8818] urlsplit and urlparse add extra slash when using scheme In-Reply-To: <1274798419.99.0.107317054505.issue8818@psf.upfronthosting.co.za> Message-ID: <1287308104.74.0.0809248944865.issue8818@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:38:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:38:14 +0000 Subject: [docs] [issue8855] Shelve documentation lacks security warning In-Reply-To: <1275180833.97.0.966181786946.issue8855@psf.upfronthosting.co.za> Message-ID: <1287308294.62.0.333761424637.issue8855@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85612, will be merged to the other maintained branches. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 11:43:26 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:43:26 +0200 Subject: [docs] hmac.digest() return value In-Reply-To: <4C0D7AB3.4000309@lavabit.com> References: <4C0D7AB3.4000309@lavabit.com> Message-ID: <4CBAC53E.4@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 08.06.2010 01:03, schrieb Perseids: > Hi, > > I am new to Python 3, but I believe I have found a little error in the > documentation. The return value of hmac.digest() is a bytes object, and > not a string. See http://docs.python.org/py3k/library/hmac.html . Hi, thanks for your report; this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6xT4ACgkQN9GcIYhpnLB8uACgjdMnFX36OVR1WuGkwK1bcGps JfUAnRADq/6BuUeDKb3VC9Sh/6CNmmAf =euGM -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 11:46:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:46:25 +0000 Subject: [docs] [issue8968] token type constants are not documented In-Reply-To: <1276216063.7.0.11813766705.issue8968@psf.upfronthosting.co.za> Message-ID: <1287308784.91.0.339002134817.issue8968@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85614. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:05:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:05:36 +0000 Subject: [docs] [issue459007] Document sys.path on Windows Message-ID: <1287309935.08.0.504071845213.issue459007@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch, merged with existing info in using/windows.rst in r85615. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:09:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:09:17 +0000 Subject: [docs] [issue5212] Incorrect note about md5 in hmac module documentation In-Reply-To: <1234312792.25.0.547667950303.issue5212@psf.upfronthosting.co.za> Message-ID: <1287310157.65.0.0734865905064.issue5212@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed note in r85617. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:15:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:15:55 +0000 Subject: [docs] [issue9086] Wrong linking terminology in windows FAQ In-Reply-To: <1277546739.53.0.554976149521.issue9086@psf.upfronthosting.co.za> Message-ID: <1287310555.04.0.898354312243.issue9086@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, I removed mention of static linking and used John's terms "load-time" and "run-time" linking in r85618. I also removed the note that pythonXY.dll is only needed in one case, since it's not true. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 12:23:09 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 12:23:09 +0200 Subject: [docs] parser library documentation references non-existent example.py In-Reply-To: References: Message-ID: <4CBACE8D.9030804@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.06.2010 22:24, schrieb Bill Zingler: > Reference: http://docs.python.org/library/parser.html#information-discovery > > This page says to "See file > example.py" several times, but doesn't provide a link to the file or the > complete text of the file. It would be really helpful to have example.py. Hi Bill, thanks for your report. I've now removed the whole example from the development docs, since such use of the parser module should really be replaced by inspecting the AST (and using the ast module), whose interface is much less complicated to use. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6zo0ACgkQN9GcIYhpnLBwsgCeKeXHMjoivEmG98gvNtQlSsv0 s7YAnR03QzhlbjlF9rupOSy67GyH6vKn =k6KZ -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 12:26:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:26:11 +0000 Subject: [docs] [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1287311169.11.0.000797017930108.issue9105@psf.upfronthosting.co.za> Georg Brandl added the comment: Moved pickle warning in r85621. A warning in shelve was already added for issue8855. For the tutorial, I don't think a warning needs to be added. Same goes for logging. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:28:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:28:16 +0000 Subject: [docs] [issue9112] argparse missing documentation for error() method In-Reply-To: <1277798810.6.0.529590004484.issue9112@psf.upfronthosting.co.za> Message-ID: <1287311296.86.0.357893359491.issue9112@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed after review in r85622. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:38:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:38:28 +0000 Subject: [docs] [issue9117] class syntax not fully documented in reference manual In-Reply-To: <1277830360.72.0.109155081636.issue9117@psf.upfronthosting.co.za> Message-ID: <1287311907.81.0.22967382618.issue9117@psf.upfronthosting.co.za> Georg Brandl added the comment: This patch was mostly out-of-date since PEP 3115 metaclasses are now documented; I've merged what was missing in r85626. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 12:07:19 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 12:07:19 +0200 Subject: [docs] audioop module documentation bug In-Reply-To: References: Message-ID: <4CBACAD7.4030403@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 21.06.2010 21:50, schrieb Kalle Karjalainen: > Hello, > > I found a bug in http://docs.python.org/library/audioop.html > > In the example method, def mul_stereo(sample, width, lfactor, rfactor), the result of its first two lines: > > lsample = audioop.tomono(sample, width, 1, 0) > rsample = audioop.tomono(sample, width, 0, 1) > > ... is discarded by the following two lines: > > lsample = audioop.mul(sample, width, lfactor) > rsample = audioop.mul(sample, width, rfactor) > > ... resulting in a sample twice as long being returned as is intended, i.e. "slowing down? of the audio. > > The fix for the third and fourth lines is: > > lsample = audioop.mul(lsample, width, lfactor) > rsample = audioop.mul(rsample, width, rfactor) Hi Kalle, thanks for the report, this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky6ytcACgkQN9GcIYhpnLCEbwCcDOpeNBveWtWryoeolxfs2yG8 mFYAoJa/WhqfaXr2E+ldPSKIC9thUyrS =9iVU -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 12:44:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:44:51 +0000 Subject: [docs] [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1287312291.69.0.422651744494.issue9138@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed Aahz' version, with the last sentence reworded to what I think is more positive than what sounds like "you can break things without doing anything". ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:45:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:45:00 +0000 Subject: [docs] [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1287312299.96.0.0572377960329.issue9138@psf.upfronthosting.co.za> Georg Brandl added the comment: r85627. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:47:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:47:31 +0000 Subject: [docs] [issue9195] Link in docs from "String Formatting Operations" to "Template Strings" In-Reply-To: <1278571007.55.0.304215462236.issue9195@psf.upfronthosting.co.za> Message-ID: <1287312451.47.0.933485977782.issue9195@psf.upfronthosting.co.za> Georg Brandl added the comment: Mostly out of date now that we have str.format(). ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:52:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:52:11 +0000 Subject: [docs] [issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program In-Reply-To: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za> Message-ID: <1287312731.11.0.430580993613.issue5962@psf.upfronthosting.co.za> Georg Brandl added the comment: Added a note about threads to sys.exit(), and changed os._exit() wording to be clear about process exit, in r85629. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:55:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:55:34 +0000 Subject: [docs] [issue1945] Document back ported C functions In-Reply-To: <1201445858.91.0.21119487494.issue1945@psf.upfronthosting.co.za> Message-ID: <1287312934.64.0.564464999933.issue1945@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r85632. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:00:23 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:00:23 +0000 Subject: [docs] [issue9204] The documentation of PyType_Type in py3k mentions types.TypeType In-Reply-To: <1278612596.78.0.246474788536.issue9204@psf.upfronthosting.co.za> Message-ID: <1287313223.03.0.0939811444731.issue9204@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85633. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:03:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:03:28 +0000 Subject: [docs] [issue5121] PyRun_InteractiveLoop disagrees with documentation? In-Reply-To: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> Message-ID: <1287313408.71.0.399070135657.issue5121@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85635. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:06:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:06:24 +0000 Subject: [docs] [issue9237] Add sys.call_tracing to on-line sys module documentation In-Reply-To: <1278973764.17.0.0501374635668.issue9237@psf.upfronthosting.co.za> Message-ID: <1287313584.09.0.227970297506.issue9237@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r85636. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 13:26:58 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:26:58 +0200 Subject: [docs] logging.Formatter processName added in 2.7 In-Reply-To: <4CA092D8.4040107@gmail.com> References: <4CA092D8.4040107@gmail.com> Message-ID: <4CBADD82.7010108@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 27.09.2010 14:49, schrieb Marvin Greenberg: > But the documentation does not say that, although it does say that funcName > was added in 2.5 Hi Marvin, thanks for the note. It was actually added in 2.6, and I've added a note now to that effect. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63YIACgkQN9GcIYhpnLDj1ACgh1WEC42DXmeMXCf2fBMfdrYy 3GUAnRqCcjbUio8qX95wsel5IQXbkTzm =nrOF -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:28:54 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:28:54 +0200 Subject: [docs] little mistake in documentation of dis.opmap in the dis module In-Reply-To: <201009280011.11264.development@alexander-behringer-online.de> References: <201009280011.11264.development@alexander-behringer-online.de> Message-ID: <4CBADDF6.4060300@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.09.2010 00:11, schrieb Alexander Behringer: > Hello, > > I think I have discovered a little mistake in the documentation of the > disassembler module. There it says [1, 2, 3]: > >> dis.opmap >> Dictionary mapping bytecodes to operation names. > > But for me it looks more like a mapping of operation names to bytecodes. > > [1] http://docs.python.org/library/dis.html#dis.opmap > [2] http://docs.python.org/py3k/library/dis.html#dis.opmap > [3] http://docs.python.org/dev/py3k/library/dis.html#dis.opmap Hi Alexander, thanks for the report; this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63fYACgkQN9GcIYhpnLAdMQCeI5PiU2bPIds3rFJ2KjL4ICwj 5zcAnRE2LBtAUsSdnIwvUV5T20+rwwFG =P/8v -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 13:37:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:37:25 +0000 Subject: [docs] [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287315445.17.0.69312360416.issue9730@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85642. ---------- dependencies: -b64decode should accept strings or bytes resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Oct 17 13:15:38 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:15:38 +0200 Subject: [docs] Bug ? In-Reply-To: <5158A412-B1DE-4254-AEC8-337AC25E0D40@cerfacs.fr> References: <5158A412-B1DE-4254-AEC8-337AC25E0D40@cerfacs.fr> Message-ID: <4CBADADA.2010600@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.07.2010 11:43, schrieb Antoine Dechaume: > Hi, > > HERE > > It seems __setstate__ requires an argument, like in the examples > , but the method doc do not > mention it at all. Hi Antoine, thanks for the report, this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky62toACgkQN9GcIYhpnLDCzQCfQ+DKxcAg5EF3Vk4nrzpJh55a vsYAoKu11ktMwUUtq8WEtPPuSKRQwzNq =uTMb -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:18:46 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:18:46 +0200 Subject: [docs] Missing links on page http://docs.python.org/release/2.6/download In-Reply-To: <3CF34B583782C147807E09365F884DA42EDCD9EB62@THSNCOA06MXS02P.ONE-06.GRP> References: <3CF34B583782C147807E09365F884DA42EDCD9EB62@THSNCOA06MXS02P.ONE-06.GRP> Message-ID: <4CBADB96.3050804@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 19.07.2010 14:38, schrieb OPITZ Christian (D3S): > Missing links on page http://docs.python.org/release/2.6/download. > > > > All links are missing the version number 2.6 inside the file names. > > Mailto link is not working. > > Tested with > > Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 > Firefox/3.5.3 Hi Christian, thanks for the report; the download links and mailto links have now been fixed. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky625YACgkQN9GcIYhpnLD0EQCcDA6DG5MwsK1oIKgcDsx7KS5s lMoAniK3bVxzhS822nZlIvdSJI9l7y4/ =SVt5 -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:23:57 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:23:57 +0200 Subject: [docs] Example values for dict() In-Reply-To: References: Message-ID: <4CBADCCD.3060201@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.09.2010 18:27, schrieb Nate Vack: > Hi all, > > The docs on creating new dicts found here: > > http://docs.python.org/library/stdtypes.html#dict > > just warped my mind a little bit. They all create the dict {'one': 2, > 'two', 3} -- creating {'one': 1, 'two': 2} would make a little more > sense. Hi Nate, you're quite right, these examples are unnecessarily twisted. I've fixed them now in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63M0ACgkQN9GcIYhpnLB77wCfVGoZWB35/z0SFBm0DPrJH2vw stMAn3C0EPx0KTP9zMmBzcbDfmfEf4Ot =nOWQ -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:22:34 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:22:34 +0200 Subject: [docs] Algorithm error In-Reply-To: References: Message-ID: <4CBADC7A.7050702@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.09.2010 17:53, schrieb eric.takada at embraer.com.br: > > Hi, > > in section */"4.4 break and continue Statements, and else Clauses on Loops" > /*there is an error in the example code. The "range" in "for x in range(2, n): " > shall be changed to "range(1,n):" in order to produce the output described in > the example, since "range[2,2]" produces a null result. > > Regards, > > Eric Takada Hi Eric, please retry running the example; it is correct as written. Note that the "else" clause belongs to the for loop, and not the if condition, and therefore has different semantics (for example, it is executed in the case that the loop does not run at all.) regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63HoACgkQN9GcIYhpnLDG5QCeIGLEeWz0Zbt0l4hSAnGYEF1r MvEAoIm5wG5GLw0qcHqDnr6jl3ZB3XFc =o1f/ -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:27:45 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:27:45 +0200 Subject: [docs] 2.6 documentation In-Reply-To: References: Message-ID: <4CBADDB1.1060105@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 27.09.2010 20:29, schrieb michael weaser: > i cant download the 2.6 documentation from docs.python.org/release/2.6 > Hi Michael, thanks for the report, these links are now fixed. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63bEACgkQN9GcIYhpnLAwMwCdEOdtsH9Efxk17qTJPDHGghY4 EUIAni7YCy4g3vhzNTn52b5EKKlfeyfE =SMPY -----END PGP SIGNATURE----- From georg at python.org Sun Oct 17 13:31:41 2010 From: georg at python.org (Georg Brandl) Date: Sun, 17 Oct 2010 13:31:41 +0200 Subject: [docs] Documentation for ebook In-Reply-To: References: Message-ID: <4CBADE9D.1010702@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.09.2010 13:12, schrieb Andr?s Orencio Ram?rez P?rez: > Is possible get documentation in ebook format (epub for example) o A5 size? > > It would be fatastic to have a link for download from documentation web page. Hi Andr?s, that is indeed a good idea, and I will add downloads in epub format starting with Python 3.2, at least when the final version is out. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAky63p0ACgkQN9GcIYhpnLD/sACffT2qDgOfUv3elI4SeDyLi8xD 9NAAnRhfOTPcEEoaqgcuf3MakmxD1tPK =L2/A -----END PGP SIGNATURE----- From report at bugs.python.org Sun Oct 17 17:15:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 17 Oct 2010 15:15:57 +0000 Subject: [docs] [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1287328557.81.0.00101696206727.issue10020@psf.upfronthosting.co.za> ?ric Araujo added the comment: Has this been fixed in 3.1 and 2.7 too? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 23:08:37 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 17 Oct 2010 21:08:37 +0000 Subject: [docs] [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287349717.34.0.923775526877.issue9730@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: That fixes the example code, but what about the numerous text that reads "strings" that should read "byte sequences", "bytes", or similar? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 01:13:44 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 23:13:44 +0000 Subject: [docs] [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287357223.83.0.160690543445.issue9730@psf.upfronthosting.co.za> R. David Murray added the comment: I reviewed the doc and tightened up the wording (which was already mostly correct) in r85672. Also fixed one typo and changed it to consistently use 'byte string' (rather than 'bytestring' which was used in one or two places). ---------- _______________________________________ Python tracker _______________________________________ From thairish at mac.com Mon Oct 18 05:44:07 2010 From: thairish at mac.com (Timothy Long) Date: Sun, 17 Oct 2010 23:44:07 -0400 Subject: [docs] Python 3.1.2 Syntax Error Message-ID: <98093A59-1070-4DF6-8898-BE794289ED88@mac.com> Dear Python Volunteers, Let me preface the statement of the problem by saying that I am very new to python and have done any programming in about 10 years. I'm taking an online course via MIT open courseware in which the class uses python. I downloaded 3.1.2 onto my MacBook which is running OS 10.6.4. Initially I tried running some of the basic examples such as x=15 if (x/2)*2 == x: print 'Even' else: print 'Odd' I get an "invalid syntax" message and the single quote after even is highlighted. On the video the professor is able to highlight this series of commands in a separate window and "run>>run module" (following a save request) with no problem. Each time I try, I get the "invalid syntax" error. Similarly, in the Python Shell window, even if I try to do something simple such as >>>print 'x' I get "SyntaxError: invalid syntax" with the second quote highlighted as the offending item. I request your help in determining if there's something I haven't done in downloading this program to my computer or if I need to be running a completely different version of python. Thanks in advance. Tim From report at bugs.python.org Mon Oct 18 11:52:47 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 09:52:47 +0000 Subject: [docs] [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1287395567.01.0.442349101313.issue10048@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: docs at python -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:45:20 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 10:45:20 +0000 Subject: [docs] [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283554637.01.0.167836774867.issue9730@psf.upfronthosting.co.za> Message-ID: <20101018104510.GC10299@remy> Senthil Kumaran added the comment: On Fri, Sep 03, 2010 at 10:57:17PM +0000, Georg Brandl wrote: > That's why I said to use "testsetup" directives -- they are not > visible in the HTML/PDF/... output, but used when running the tests. Do you already have such a directive in sphinx? I think, it would be a good idea to have doctests succeed. And having examples in the docs working 'directly out of text'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:47:15 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 11:47:15 +0000 Subject: [docs] [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287402435.76.0.0358978973498.issue9730@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, Georg mentioned the directive because it exists :) See the turtle docs for some examples, I think. I seem to remember using it when I made those doctests pass on 2.7 (warning: it writes weird stuff on your screen :) ---------- _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Mon Oct 18 15:38:26 2010 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Mon, 18 Oct 2010 15:38:26 +0200 Subject: [docs] Python 3.1.2 Syntax Error In-Reply-To: <98093A59-1070-4DF6-8898-BE794289ED88@mac.com> References: <98093A59-1070-4DF6-8898-BE794289ED88@mac.com> Message-ID: <4CBC4DD2.3020408@netwok.org> Hello Timothy In Python 3, print is a function, not a statement, so you have to put parens to call it. See http://docs.python.org/py3k/whatsnew/3.0 For all practical purposes, you can consider that Python 2 and Python 3 are different programming languages. I guess your course uses Python 2. Have fun learning Python! From report at bugs.python.org Mon Oct 18 20:24:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 18:24:55 +0000 Subject: [docs] [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1287426295.7.0.813504805286.issue10031@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report and suggestions. I agree to the gist of your changes, but I wouldn?t remove the explanation of implicit relative imports (the part starting with ?If you?re writing code?). ---------- keywords: +patch nosy: +eric.araujo stage: -> patch review versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 13:40:40 2010 From: report at bugs.python.org (Ralph Corderoy) Date: Tue, 19 Oct 2010 11:40:40 +0000 Subject: [docs] [issue10145] (4.2).is_integer() is undocumented. In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> New submission from Ralph Corderoy : floats now have an is_integer() method. I think it was added in 2.6 around the same time as as_integer_ratio(). It has a docstring but it isn't mentioned in the documentation. I only idled across it when reading the C source. I'd expect to find it, for example, at http://docs.python.org/library/stdtypes.html?highlight=as_integer_ratio#additional-methods-on-float http://docs.python.org/py3k/library/stdtypes.html?highlight=as_integer_ratio#additional-methods-on-float Can it please be added, and for Py2, mention what version it appeared in. ---------- assignee: docs at python components: Documentation messages: 119133 nosy: docs at python, ralph.corderoy priority: normal severity: normal status: open title: (4.2).is_integer() is undocumented. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 14:53:27 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 12:53:27 +0000 Subject: [docs] [issue10145] (4.2).is_integer() is undocumented. In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287492807.47.0.0626628051445.issue10145@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: docs at python -> nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:19:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 16:19:00 +0000 Subject: [docs] [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287505140.85.0.998161004852.issue10145@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> needs patch title: (4.2).is_integer() is undocumented. -> float.is_integer is undocumented versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:32:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 16:32:02 +0000 Subject: [docs] [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287505922.18.0.0727207780139.issue10145@psf.upfronthosting.co.za> R. David Murray added the comment: Woops, I didn't meant to unassign docs. ---------- assignee: -> docs at python nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 21:19:53 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 19:19:53 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak : Please read the docs here: http://docs.python.org/py3k/reference/expressions#boolean-operations This is the last sentence in the '5.10. Boolean operations' text): ([...] Because not has to >>>invent<<< a value anyway, it does not bother to return a value of the same type as its argument, so e.g., not 'foo' yields False, not ''.) Fix to: ([...] Because not has to >>>invert<<< a value anyway, it does not bother to return a value of the same type as its argument, so e.g., not 'foo' yields False, not ''.) ---------- assignee: docs at python components: Documentation messages: 119160 nosy: Retro, docs at python priority: normal severity: normal status: open title: Python Documentation bugs versions: 3rd party, 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 Tue Oct 19 22:09:20 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 20:09:20 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287518960.68.0.830878305928.issue10147@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: There is one more typo bug I noted in the documentation. Please go here: http://docs.python.org/library/locale#locale.setlocale Fix this text... setlocale() is not >>>thread safe<<< on most systems. ...like this: setlocale() is not >>>thread-safe<<< on most systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:08:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 19 Oct 2010 21:08:30 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287522510.64.0.333949582933.issue10147@psf.upfronthosting.co.za> Georg Brandl added the comment: The first one is not a typo. Fixed the second one (and similar occurrences of "thread safe") in r85731. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 09:19:47 2010 From: report at bugs.python.org (Thomas Guettler) Date: Wed, 20 Oct 2010 07:19:47 +0000 Subject: [docs] [issue10151] Docs: can globals() be updated? In-Reply-To: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> Message-ID: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> New submission from Thomas Guettler : Hi, the documentation of "globals()" is missing a note if you can update the dictionary: http://docs.python.org/library/functions.html?highlight=globals#globals For "locals()" it is documented: http://docs.python.org/library/functions.html?highlight=locals#locals ---------- assignee: docs at python components: Documentation messages: 119192 nosy: docs at python, guettli priority: normal severity: normal status: open title: Docs: can globals() be updated? versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 11:20:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 09:20:09 +0000 Subject: [docs] [issue10151] Docs: can globals() be updated? In-Reply-To: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> Message-ID: <1287566409.4.0.999948366043.issue10151@psf.upfronthosting.co.za> Georg Brandl added the comment: It is documented, however, that globals() returns the dictionary of a module, which can be modified. For locals(), the situation is quite more complicated, which is why the warning there is warranted. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 20:45:40 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 18:45:40 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287600340.22.0.281234729045.issue10149@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> docs at python components: +Documentation -XML nosy: +docs at python stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:10:21 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:10:21 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> New submission from ??????? ???????? (Christos Georgiou) : (Discovered in that StackOverflow answer: http://stackoverflow.com/questions/3940518/3942509#3942509 ; check the comments too) operator.attrgetter in its simplest form (i.e. with a single non-dotted name) needs more time to execute than an equivalent lambda expression. Attached file so3940518.py runs a simple benchmark comparing: a list comprehension of plain attribute access; attrgetter; and lambda. I will append sample benchmark times at the end of the comment. Browsing Modules/operator.c, I noticed that the dotted_getattr function was using PyUnicode_Check and (possibly) splitting on dots on *every* call of the attrgetter, which I thought to be most inefficient. I changed the py3k-daily-snapshot source to make the PyUnicode_Check calls in the attrgetter_new function; also, I modified the algorithm to pre-parse the operator.attrgetter functions for possible dots in the names, in order for the dotted_getattr function to become speedier. The only ?drawback? is that now operator.attrgetter raises a TypeError on creation, not on subsequent calls of the attrgetter object; this shouldn't be a compatibility problem. However, I obviously had to update both Doc/library/operator.rst and Lib/test/test_operator.py . I am not sure whether I should attach a zip/tar file with both the attachments (the sample benchmark and the diff); so I'll attach the diff in a further comment. On the Ubuntu server 9.10 where I made the changes, I ran the so3940518.py sample benchmark before and after the changes. Run before the changes (third column is seconds, less is better): list comp 0.40999999999999925 1000000 map attrgetter 1.3899999999999997 1000000 map lambda 1.0099999999999998 1000000 Run after the changes: list comp 0.40000000000000036 1000000 map attrgetter 0.5199999999999996 1000000 map lambda 0.96 1000000 ---------- assignee: docs at python components: Documentation, Library (Lib), Tests files: so3940518.py messages: 119247 nosy: docs at python, tzot priority: normal severity: normal status: open title: operator.attrgetter slower than lambda after adding dotted names ability versions: Python 3.2 Added file: http://bugs.python.org/file19310/so3940518.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:22:39 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:22:39 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620559.26.0.228445009836.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Here comes the diff to Modules/operator.c, Doc/library/operator.rst and Lib/test/test_operator.py . As far as I could check, there are no leaks, but a more experienced eye in core development could not hurt. Also, obviously test_operatory.py passes all tests. Should this be accepted, I believe it should be backported to 2.7 (at least). I can do that, just let me know. ---------- keywords: +patch Added file: http://bugs.python.org/file19312/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:22:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 21 Oct 2010 00:22:55 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620575.52.0.102749404474.issue10160@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:27:34 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:27:34 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620854.13.0.538934611404.issue10160@psf.upfronthosting.co.za> Changes by ??????? ???????? (Christos Georgiou) : Removed file: http://bugs.python.org/file19312/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:28:48 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:28:48 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620928.13.0.470488767783.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Newer version of the diff, since I forgot some "if(0) fprintf" debug calls that shouldn't be there. ---------- Added file: http://bugs.python.org/file19313/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:40:53 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:40:53 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287621653.02.0.326065744057.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: An explanation to the changes. The old code kept the operator.itemgetter arguments in the ag->attr member. If the argument count (ag->nattrs) was 1, the single argument was kept; if more than 1, a tuple of the original arguments was kept. On every attrgetter_call call, if ag->nattrs was 1, dotted_getattr was called with the plain ag->attr as attribute name; if > 2, dotted_getattr was called for every one of the original arguments. Now, ag->attr is always a tuple, containing either dotless strings or tuples of dotless strings: operator.attrgetter("name1", "name2.name3", "name4") stores ("name1", ("name2", "name3"), "name4") in ag->attr. dotted_getattr accordingly chooses based on type (either str or tuple, ensured by attrgetter_new) whether to do a single access or a recursive one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:42:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Oct 2010 00:42:58 +0000 Subject: [docs] [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1287621778.91.0.765236710772.issue7828@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 04:04:14 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Oct 2010 02:04:14 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287626653.86.0.185298691453.issue10160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. I wasn't aware that it had slowed down after dotted name support had been added. Since it is a mild performance issue, I'm lowering the priority. Will take a further look when I get the chance. A first look at the patch shows that it is bigger than I expected. Isn't it possible to check for a dot on construction and just record the boolean so that a fast, non-splitting path can be used. I'm reluctant to make the code volume grow much for this function. It is already a bit voluminous for the minor convenience it offers. ---------- priority: normal -> low stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 07:33:26 2010 From: report at bugs.python.org (Alex) Date: Thu, 21 Oct 2010 05:33:26 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287639205.87.0.251173550816.issue10160@psf.upfronthosting.co.za> Alex added the comment: Voice of ignorance here: why can't this be implemented in the "naive" way one might in Python, use the existing string splitting algorithms of stringlib, but just leave it in __new__. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 08:56:01 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 06:56:01 +0000 Subject: [docs] [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287644161.72.0.406199879747.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Modules/operator.c grows by ~70 lines, most of it the setup code for ag->attr; also I loop twice over the args of attrgetter_new, choosing fast code that runs once per attrgetter creation than temporary data. Alex's suggestion to make use of Python-level functions to shorten the code of attrgetter_new could obviously work to decrease the source lines. I don't know how fast I would produce such a version if requested, though. Whatever the way attrgetter_new sets up the data, I would suggest that you keep the logic changes in general, i.e. set-up in attrgetter_new and keep a thinner dotted_getattr , since it avoids running the same checks and splitting over and over again for every attrgetter_call invocation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:31:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:31:14 +0000 Subject: [docs] [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1287667874.26.0.323403966816.issue5978@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation -Demos and Tools nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:03:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 18:03:25 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287684205.0.0.673774060736.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From your commit: -Excursus about the use of compound shapes +Compound shapes ----------------------------------------- Having more hyphens than title characters is not an error for reST, but it?s not done in the rest of the document. I suggest ?fixing? that when you do further changes in the file (it?s not worth a commit in itself). Cheers! ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:12:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:12:22 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1287684205.0.0.673774060736.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 2:03 PM, ?ric Araujo wrote: .. > Having more hyphens than title characters is not an error for reST, but it?s not done in the rest of the document. > ?I suggest ?fixing? that when you do further changes in the file (it?s not worth a commit in itself). ?Cheers! There are other ReST imperfections in turtle doc. For example, :class: tag is often missing on class names. (Search for "Turtle" with capital 'T'.) The hyphen fix, however seems easier to commit than to remember. I'll do it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:16:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:16:31 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 2:12 PM, Alexander Belopolsky wrote: > The hyphen fix, however seems easier to commit than to > remember. ? I'll do it now. > Committed in r85778. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:58:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:58:10 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287687489.95.0.88716780852.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I also wonder if the title should be changed from "Turtle graphics for Tk" to simply "Turtle graphics". As explained in issue3884, msg73465 turtle's use of Tk is an implementation detail and the title may be confusing to the target audience. Presumably turtle module is targeted towards young and novice users who don't know and don need to know about Tk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:00:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 19:00:44 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287687644.14.0.10462557389.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1. BTW, aren?t the fixes relevant for 2.7 too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:20:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 20:20:11 +0000 Subject: [docs] [issue10170] Relationship between turtle speed setting and actual speed is not documented In-Reply-To: <1287692411.21.0.472855700629.issue10170@psf.upfronthosting.co.za> Message-ID: <1287692411.21.0.472855700629.issue10170@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : As Terry J. Reedy mentioned in his comment on issue 7061, turtle documentation is lacking information on how speed "codes" 0-10 translate into actual turtle speed. Attached script measures the speed of the two primitive operations that form the basis of turtle functionality at various speed settings. The results below show highly irregular pattern. The columns are: the speed code, time to draw a 200 unit line, time to complete a 360 degrees turn and the ratio of the two times. 0: 0.01 0.01 0.83 1: 1.04 2.05 0.51 2: 0.49 1.06 0.46 3: 0.30 0.72 0.42 4: 0.23 0.54 0.44 5: 0.17 0.44 0.38 6: 0.13 0.39 0.35 7: 0.08 0.32 0.26 8: 0.08 0.28 0.30 9: 0.10 0.27 0.37 10: 0.08 0.23 0.36 >From the source code, it appears that the on-screen speed is controlled by the number of animation steps while each step takes approximately time controlled by the "delay" setting that defaults to 10 milliseconds. The number of steps is determined by somewhat peculiar computations. For a rotation by angle of a degrees at speed setting s, the number of steps is n = 2 + int(a / (3 * s)) and for drawing a line of length d, n = 1 + int(d / (3 * 1.1**s * s)) I am not sure what was the reason for these choices, but I think it would be better if numeric speed code had a more direct relationship to the apparent speed. ---------- assignee: docs at python components: Demos and Tools, Documentation messages: 119334 nosy: belopolsky, docs at python, eric.araujo, georg.brandl, gregorlingl, terry.reedy priority: normal severity: normal status: open title: Relationship between turtle speed setting and actual speed is not documented versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:46:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 20:46:40 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1287687644.14.0.10462557389.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 3:00 PM, ?ric Araujo wrote: .. > +1. [remove reference to Tk from title] > If we do that, I think we should move turtle documentation out of the "Graphical User Interfaces with Tk" chapter. It would be more appropriate to place it under "Program Frameworks". > BTW, aren?t the fixes relevant for 2.7 too? > They probably are, but for a purely educational module such as turtle, I don't see much value in improving it in 2.x releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:55:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 20:55:16 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287694515.77.0.465580593476.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed that Program Frameworks is the most adequate section. For the backport, I don?t see that turtle should have different rules than other modules, but I?m not firmly attached to this, so do as you wish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:02:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:02:21 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287698541.41.0.965673804613.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you like to turn your suggestions (+ hinting at buffer_text someplace) into a patch for Doc/library/pyexpat.rst? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:51:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:51:05 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287701465.77.0.122615919807.issue10147@psf.upfronthosting.co.za> ?ric Araujo added the comment: Adjectives require hyphens but nouns do not. ?thread-safety? should be reverted to ?thread safety?. I haven?t searched for a grammar reference, but you can take Wikipedia as an example: ?Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.? ---------- nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:19:06 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 21 Oct 2010 23:19:06 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287701465.77.0.122615919807.issue10147@psf.upfronthosting.co.za> Message-ID: <4CC0CA66.6050104@egenix.com> Marc-Andre Lemburg added the comment: ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Adjectives require hyphens but nouns do not. ?thread-safety? should be reverted to ?thread safety?. I haven?t searched for a grammar reference, but you can take Wikipedia as an example: ?Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.? Are you sure ? http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns This appears to be more a question of personal style than a grammar rule. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 02:45:27 2010 From: report at bugs.python.org (Maciek J) Date: Fri, 22 Oct 2010 00:45:27 +0000 Subject: [docs] [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287708327.32.0.826524998411.issue10149@psf.upfronthosting.co.za> Maciek J added the comment: I'm not familiar with the rst format, but I hope this works. ---------- keywords: +patch Added file: http://bugs.python.org/file19329/pyexpat.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:01:52 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 22 Oct 2010 08:01:52 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <4CC0CA66.6050104@egenix.com> Message-ID: Bo??tjan Mejak added the comment: All the words that Georg Brandl fixed for this issue are okay as they stand. Please leave them as they are written. Thank you. On Fri, Oct 22, 2010 at 1:19 AM, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > ??ric Araujo wrote: > > > > ??ric Araujo added the comment: > > > > Adjectives require hyphens but nouns do not. ???thread-safety??? should be > reverted to ???thread safety???. I haven???t searched for a grammar reference, > but you can take Wikipedia as an example: ???Thread safety is a computer > programming concept applicable in the context of multi-threaded programs. A > piece of code is thread-safe if it functions correctly during simultaneous > execution by multiple threads.??? > > Are you sure ? > > http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns > > This appears to be more a question of personal style than a > grammar rule. > > ---------- > nosy: +lemburg > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19333/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- All the words that Georg Brandl fixed for this issue are okay as they stand. Please leave them as they are written. Thank you.

On Fri, Oct 22, 2010 at 1:19 AM, Marc-Andre Lemburg <report at bugs.python.org> wrote:

Marc-Andre Lemburg <mal at egenix.com> added the comment:

??ric Araujo wrote:
>
> ??ric Araujo <merwok at netwok.org> added the comment:
>
> Adjectives require hyphens but nouns do not. ?????thread-safety??? should be reverted to ???thread safety???. ??I haven???t searched for a grammar reference, but you can take Wikipedia as an example: ???Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.???

Are you sure ?

http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns

This appears to be more a question of personal style than a
grammar rule.

----------
nosy: +lemburg

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

From report at bugs.python.org Fri Oct 22 15:38:06 2010 From: report at bugs.python.org (Winston C. Yang) Date: Fri, 22 Oct 2010 13:38:06 +0000 Subject: [docs] [issue10172] code block has no syntax coloring In-Reply-To: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> Message-ID: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> New submission from Winston C. Yang : The following code block in http://docs.python.org/tutorial/errors.html has no syntax coloring: import sys try: f = open('myfile.txt') s = f.readline() i = int(s.strip()) except IOError as (errno, strerror): print "I/O error({0}): {1}".format(errno, strerror) except ValueError: print "Could not convert data to an integer." except: print "Unexpected error:", sys.exc_info()[0] raise ---------- assignee: docs at python components: Documentation messages: 119382 nosy: docs at python, wcyang priority: normal severity: normal status: open title: code block has no syntax coloring type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 04:44:48 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 02:44:48 +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: <1287801888.05.0.692868695161.issue10175@psf.upfronthosting.co.za> R. David Murray added the comment: If I understand correctly (I'm not a windows user or developer myself), knowing the bits necessary to compile extension modules is not something very many people need to know. If an extension module supports Windows, there will generally be an installer package containing the binaries available. If there isn't, chances are the extension module doesn't support Windows. That said, improvements in the documentation is rarely a bad idea ;) ---------- assignee: -> docs at python components: +Documentation -Extension Modules nosy: +docs at python, r.david.murray type: compile error -> feature request versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 05:01:35 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 23 Oct 2010 03:01:35 +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: <1287802895.09.0.741994349358.issue10175@psf.upfronthosting.co.za> Jeremy Kloth added the comment: A quick look with Dependency Walker gives me the following: Python 2.4,2.5 -- MSVC .NET 2003 (7.1) Python 2.6,2.7,3.0,3.1 -- MSVC 2008 (9.0) Note these are only for the official python.org builds. Each version can also be built using other MSVC versions. To the best of my knowledge Python 3.2 will also be built using MSVC 2008 as 2010 support hasn't been discussed yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 06:24:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 Oct 2010 04:24:49 +0000 Subject: [docs] [issue10172] code block has no syntax coloring In-Reply-To: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> Message-ID: <1287807889.13.0.545935519007.issue10172@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2.7 only (verified); 3.1 and 3.2 are fine. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:05:25 2010 From: report at bugs.python.org (samwyse) Date: Sat, 23 Oct 2010 14:05:25 +0000 Subject: [docs] [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> New submission from samwyse : PEP 378 states; format(n, "6,f").replace(",", "X").replace(".", ",").replace("X", ".") This is complex and relatively slow. A better technique, which IMHO the proposal should high-lighted, would be: swap_commas_and_periods = bytes.maketrans(b',.', b'.,') format(n, "6,f").translate(swap_commas_and_periods) While performing the maketrans each time a string is formatted is slower than the triple replace, calling it once and caching the result is faster. I have tested with with the 3.1 interpreter; example timings follow. >>> Timer(""" '1,234,567.89'.replace(',', 'X').replace('.', ',').replace('X', '.') """).timeit() 3.0645400462908015 >>> Timer(""" '1,234,567.89'.translate(swap_commas_and_periods) """, """ swap_commas_and_periods = bytes.maketrans(b',.', b'.,') """).timeit() 2.276630409730846 >>> Timer(""" '1,234,567.89'.translate(bytes.maketrans(b',.', b'.,')) """).timeit() 3.760715677551161 ---------- assignee: docs at python components: Documentation messages: 119427 nosy: docs at python, samwyse priority: normal severity: normal status: open title: PEP 378 uses replace where translate may work better type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:30:26 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 14:30:26 +0000 Subject: [docs] [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287844226.63.0.798539777719.issue10178@psf.upfronthosting.co.za> R. David Murray added the comment: The text in question is talking about 'replace' as a general mechanism for 'fixing' the separator character, and as such I don't think introducing translate would enhance the exposition. I suppose it could be added in a footnote. ---------- nosy: +eric.smith, ncoghlan, r.david.murray, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:35:50 2010 From: report at bugs.python.org (samwyse) Date: Sat, 23 Oct 2010 16:35:50 +0000 Subject: [docs] [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287851750.42.0.697699051713.issue10178@psf.upfronthosting.co.za> samwyse added the comment: The text in question is also talking about the problems with using 'replace' to swap pairs of characters, so a better, alternate, process would be valuable, especially for anyone unaware of the translate method. ---------- _______________________________________ Python tracker _______________________________________ From mbmbrk at gmail.com Wed Oct 20 00:40:38 2010 From: mbmbrk at gmail.com (ben med) Date: Tue, 19 Oct 2010 22:40:38 +0000 Subject: [docs] A trivial 2.7 documentation bug Message-ID: <4CBE1E66.9030904@gmail.com> Hello, I noticed a smaal documentation bug in python 2.7 documentation at 7.1. Fancier Output Formatting? in the first example : >>> # The repr() of a string adds string quotes and backslashes: ...hello = 'hello, world\n' >>> hellos = repr(hello) >>> print hellos 'hello, world\n' So the last line I quoted here must be "'hello, world\\n'" as explained in the first line . have a good day Mohamed BEN MOHAMED -------------- next part -------------- An HTML attachment was scrubbed... URL: From hello.dads at gmail.com Sat Oct 23 01:34:47 2010 From: hello.dads at gmail.com (wayne Bell) Date: Sat, 23 Oct 2010 00:34:47 +0100 Subject: [docs] webbrowser.register() Message-ID: Hello The documentation is quite confusing for webbrowser.register() You could add a note advising people that are struggling to add the path for the browser to the PATH variable. Thanks Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: From tamik at welho.com Sat Oct 23 18:19:57 2010 From: tamik at welho.com (tamik) Date: Sat, 23 Oct 2010 19:19:57 +0300 Subject: [docs] Installation-bug Message-ID: <4CC30B2D.6090401@welho.com> Hi I am starting to learn programming with Python but the installation doesn?t go the way it should. First I tried D:\PYTHON-installation. It didn+t work. Oh - it MUST be C then? C:\wxPython ... no C:\PYTHON ... NO C:\PYTHON27\ ... no-no-no... C:\Put a directory on PYTHONPATH here\ ... NO-NO-NO! (Of course I tried first the .py-package before choosing the exe-installation package.) and I have installed the program also into directory C:\Put a directory on PYTHONPATH here\ -named directory. Always the same problem - cannot find python.exe at the end of the installation. I put even SET PYTHONPATH=C:\PYTHON27 and SET wxPython=C:\PYTHON27 into autoexec.bat - but nothing works. It looks like that my only experience of Python will be a small box. The box appears at the end of setup. Why does the box ask that? I do not have that directory (C:\Put a directory on PYTHONPATH here\) (and if I had it, there were no python.exe anyhow). I have C:\PYTHON27-directory chosen by a) writing it (doesn?t work) b) chosen by clicking the directory name (the same result always) I have W95->W98 with that older computer where I tried to install the wxPython. 2) The newer W XP is that much full of stuff that I chose the older computer. 3) I have Vista64, too, but I use it at my office. First the older computer - there is room enough, now. My ONLY wxPython-experience after many hours still is the same (I think to finish with this language wxPython if nothing else is to be experienced?) - and it is this: A small box (setup) appears with text: Unable to execute file: C:\Put a directory on PYTHONPATH here\python.exe Create process failed: code 2 Ok, if You can help me, I would be interested to know more about this language than that. Thanks for help (WHERE is python.exe after installation????) (WHY the program always asks about the directory C:\Put a directory on PYTHONPATH here\ which doesn?t exist, because there is another directory-name. No such directory and no python.exe there, not even in the new other-named directory ? I tried to look python.exe but as yet I have not found it, I?ll continue with that...) I only know how to operate with very-very-old GWBASIC program, that has been the only language for 25 years for me. Now I think, I?ll like to learn Python,JAVA,Jython? - etc... Perhaps I am too old (56y), too? :) I thought to start with Python, but... (problems and tired and frustrated, see above) Help please. Thanks a lot for help! yours sincerely tamik From georg at python.org Sat Oct 23 19:18:17 2010 From: georg at python.org (Georg Brandl) Date: Sat, 23 Oct 2010 19:18:17 +0200 Subject: [docs] A trivial 2.7 documentation bug In-Reply-To: <4CBE1E66.9030904@gmail.com> References: <4CBE1E66.9030904@gmail.com> Message-ID: <4CC318D9.8090109@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 20.10.2010 00:40, schrieb ben med: > Hello, > > I noticed a smaal documentation bug in python 2.7 documentation at > > > 7.1. Fancier Output Formatting? > > > in the first example : > >>>> # The repr() of a string adds string quotes and backslashes: > ... hello = 'hello, world\n' >>>> hellos = repr(hello) >>>> print hellos > 'hello, world\n' > > So the last line I quoted here must be "'hello, world\\n'" as explained in the > first line . > > have a good day Hi Mohamed, did you actually try this example in the interpreter? It is correct as written. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzDGNkACgkQN9GcIYhpnLCnzACfa68XGhIOlM9xaGRDQhk9WdfQ DRUAoKcMlbX+ndrF246cuF7fe1ksyD0C =Am7Y -----END PGP SIGNATURE----- From report at bugs.python.org Sat Oct 23 23:55:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 23 Oct 2010 21:55:10 +0000 Subject: [docs] [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287870910.6.0.995110762573.issue10178@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, the text needs to stand as-is. It is supposed to be a hint of what can be done, nothing more. The technique of t=x; x=y; y=t is somewhat basic and has general applicability -- there's nothing "complex" about it. Also, for short strings such as the one in the example, the translate approach is slower unless the used in a loop where the translation table is already built. BTW, the PEP itself is not primary documentation for users. It is meant to document the design discussion only. Feel free to post your recipe on ASPN or on the newsgroup. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 06:44:49 2010 From: report at bugs.python.org (Dariusz Suchojad) Date: Mon, 25 Oct 2010 04:44:49 +0000 Subject: [docs] [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> New submission from Dariusz Suchojad : Hello, I was wondering if it were possible for the argparse._AttributeHolder._get_kwargs to become a part of the public API. Using this method is a very convenient way to get a hold of the arguments provided by the user and it would be shame to keep it private, I for one use it in several places even though I clearly know the name starts with an underscore, it's just that reimplementing it in my code seems counter-productive, would be very nice if '_get_kwargs' became 'get_kwargs' in some future release. Thanks for considering it! ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 119539 nosy: bethard, docs at python, dsuch priority: normal severity: normal status: open title: Can argparse._AttributeHolder._get_kwargs become a public API? type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 09:34:53 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 25 Oct 2010 07:34:53 +0000 Subject: [docs] [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287992093.19.0.318259102545.issue10190@psf.upfronthosting.co.za> Steven Bethard added the comment: Could you elaborate a little on what you use it for? The argparse module only uses this for pretty __repr__ on the various objects. (And in fact, it looks like it's gotten a little out of sync - "required" is missing from Action, and a number of things are missing from ArgumentParser.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 11:30:15 2010 From: report at bugs.python.org (Dariusz Suchojad) Date: Mon, 25 Oct 2010 09:30:15 +0000 Subject: [docs] [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287999015.89.0.172516432177.issue10190@psf.upfronthosting.co.za> Dariusz Suchojad added the comment: I find that _AttributeHolder is a handy way for passing the command line options around the application. What is lacks though is a documented API for actually fetching the attributes in batches, like .items() or something similar that could be used for iterating over all command line arguments. That's why I thought '_get_kwargs' would be a good candidate particularly because it does exactly what I need in my code, returns a sorted list of key/value parameters. But I'm not really saying that it must be '_get_kwargs', could as well be _AttributeHolder's __dict__ attribute as long as the docs say that it's a part of the public API so that I'm sure I'm not using something that may silently break between releases. ---------- _______________________________________ Python tracker _______________________________________ From rct at r-t.org Mon Oct 25 16:14:40 2010 From: rct at r-t.org (Robert Terzi) Date: Mon, 25 Oct 2010 10:14:40 -0400 Subject: [docs] Standard Library, Brief Tour, os.system() example, small nit Message-ID: <4CC590D0.9020308@r-t.org> http://docs.python.org/tutorial/stdlib.html In section 10.1, Operating System Interface, I have a small nit with the first example for os.system. First it doesn't mention what os.system does, Second the example command is DOS/Windows specific, Third, if run it will change the current time on your DOS/Windows machine. I think that example could easily by improved. My suggestions for a command that I think will work under Windows, *nix, and OS X, are either 'mkdir' or 'set' to get a list of environment variables. Currently the example text is: >>> import os >>> os.system('time 0:02') 0 >>> os.getcwd() # Return the current working directory 'C:\\Python26' >>> os.chdir('/server/accesslogs') My suggestion is: >>> import os >>> os.getcwd() # Return the current working directory 'C:\\Python26' >>> os.chdir('/server/accesslogs') # Change current working directory >>> os.system('mkdir today') # Run the command mkdir in the system shell 0 Alternate >>> os.system('set') # Run the command set in the system shell Thanks, --Rob From joaduo at gmail.com Mon Oct 25 21:15:17 2010 From: joaduo at gmail.com (Joaquin Duo) Date: Mon, 25 Oct 2010 16:15:17 -0300 Subject: [docs] Super function example error? Message-ID: Hi! My name is Joaqu?n Duo I am a free software enthusiast. While I was reading about the super() Buit-in function on: http://docs.python.org/library/functions.html#super i found example of the function raises an error on python 2.7. The example is: class C(B): def method(self, arg): super(C, self).method(arg) In fact I runned it like: class B: def method(self, arg): pass class C(B): def method(self, arg): super(C, self).method(arg) c = C() c.method(10) Raises: Funcion_Super.py", line 8, in method super(C, self).method(arg) TypeError: must be type, not classobj I guess the correction would be class C(B): def method(self, arg): super(type(self), self).method(arg) Cheers! Joaqu?n From report at bugs.python.org Tue Oct 26 00:52:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 22:52:01 +0000 Subject: [docs] [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1288047121.3.0.0307675595873.issue6269@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: nobody -> docs at python nosy: +docs at python versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 12:06:19 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 26 Oct 2010 10:06:19 +0000 Subject: [docs] [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1288087578.97.0.525331191674.issue6269@psf.upfronthosting.co.za> Ray.Allen added the comment: Agree with Jesse, the description in the patch is not quite correct. I think detailed description of the GIL has been given in C API documentation: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock. How about just give this link in threading module documentation? ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:59:20 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 17:59:20 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288115960.59.0.581400771278.issue10200@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +3rd party, 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 Tue Oct 26 20:12:41 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:12:41 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288116761.07.0.737233123128.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: ...Also, please fix a typo here: http://docs.python.org/library/string.html#string.Formatter.parse "This is used by vformat() to break the string >>in to<< either literal text, or replacement fields." Please fix "in to" to "into". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:18:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 18:18:52 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288117132.35.0.473899563652.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch, issue7061.diff, drops "for Tk" from turtle module title and move its doc section under frameworks. I also fixed a couple of markup issues that affected TOC rendering. ---------- keywords: +patch stage: -> commit review Added file: http://bugs.python.org/file19373/issue7061.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:25:23 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:25:23 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288117522.99.0.73885238479.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: There's also a possible typo here: http://docs.python.org/library/string.html#format-specification-mini-language format_spec ::= >>>[<<<[fill>>>]<<>>|<< _______________________________________ From report at bugs.python.org Tue Oct 26 20:25:47 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:25:47 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288117547.85.0.409242359878.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Please fix all of those things. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:28:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 26 Oct 2010 18:28:40 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288117720.17.0.767820923646.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. Remember to adjust the number of signs making the reST title markup. Nice that you?re fixing the ToC; I noticed a handful of issues some days ago and thought about making a patch in a week or two. I?d open another report for them and backport the fixes to 2.7 too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:35:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 26 Oct 2010 18:35:49 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288118149.34.0.520002114721.issue10200@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi Bo?tjan, thanks for the reports and suggestions. A tip about versions. This field is used to mark the versions in which the bug will be fixed, not all versions where the bug is found. 2.5 and 2.6 only get security fixes; 2.7 and 3.1, the current stable versions, also get bug (including doc) fixes; 3.2, the next stable version, also gets new features; 3.3 is used to mean ?won?t happen in 3.2, remind us later?; 3rd party means, well, third-party, for example distutils2 which is managed outside of the standard library and thus does not affect the status of Python releases. Finally, you can send email to docs at python.org for such small typos instead of opening bug reports, as you please. (Another tip: ?please fix? messages don?t really add to the discussion and don?t make the developers have more time. Don?t worry, someone will get to your reports in time.) ---------- keywords: +patch nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:42:46 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:42:46 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288118566.6.0.28087203317.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I am terribly sorry for the red alarm. I didn't mean to. But since the typos are all listed here, I don't want to copy&paste the reports to docs at python.org. Just please fix them. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:29:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:29:43 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288121383.17.0.902681305999.issue10200@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:32:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:32:48 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288121568.1.0.392879967985.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM, if you verified that the label "debugger" is not in use at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:58:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:58:28 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288123108.59.0.85071744005.issue10200@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85849, r85850, and the third one isn't a typo. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 22:35:53 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 20:35:53 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: <1288123108.59.0.85071744005.issue10200@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I forgot to mention to remove the comma in the text "This is used by vformat() to break the string into either literal text, or replacement fields." found at http://docs.python.org/library/string.html#string.Formatter.parse. to be "This is used by vformat() to break the string into either literal text or replacement fields." Please revisit this and remove the comma. On Tue, Oct 26, 2010 at 9:58 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Fixed in r85849, r85850, and the third one isn't a typo. > > ---------- > nosy: +georg.brandl > resolution: -> fixed > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19375/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I forgot to mention to remove the comma in the text "This is used by??vformat()??to break the string into either literal text, or replacement fields." found at??http://docs.python.org/library/string.html#string.Formatter.parse. to be "This is used by??vformat()??to break the string into either literal text or replacement fields." Please revisit this and remove the comma.


On Tue, Oct 26, 2010 at 9:58 PM, Georg Brandl <report at bugs.python.org> wrote:

Georg Brandl <georg at python.org> added the comment:

Fixed in r85849, r85850, and the third one isn't a typo.

----------
nosy: +georg.brandl
resolution: ??-> fixed
status: open -> closed

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

From report at bugs.python.org Tue Oct 26 23:01:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 21:01:54 +0000 Subject: [docs] [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288126914.08.0.80009218368.issue10200@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think that comma is an error; it's more a stylistic issue. You could write it with and without, and both are correct. (Remember that TOOWTDI does absolutely not apply to natural languages.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 04:56:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 02:56:18 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288121568.1.0.392879967985.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Oct 26, 2010 at 3:32 PM, Georg Brandl wrote: .. > LGTM, if you verified that the label "debugger" is not in use at the moment. Good point. I naively hoped that Sphinx would warn me about a reference to an undefined label. Grep found a reference in sys.rst. I will replace that with a :mod:`pdb` reference which seems to be a better fit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 05:14:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 03:14:29 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288149268.89.0.0104872799727.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 85853. Terry, please chime in if I missed anything that you would consider part of this issue. Note that the speed vs. delay may not be just a doc issue. I opened issue 10170 for that. ---------- resolution: -> accepted stage: commit review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 08:45:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 06:45:30 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288161930.03.0.379784153684.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: If you do a full build, you'll get a warning; however, currently documents that reference a label will not be recognized as out of date when that label changes or is removed. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:23:29 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 27 Oct 2010 10:23:29 +0000 Subject: [docs] [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1288175009.44.0.475058011548.issue10108@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:19:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:19:02 +0000 Subject: [docs] [issue9913] Misc/SpecialBuilds.txt is out of date In-Reply-To: <1285084668.56.0.665403194927.issue9913@psf.upfronthosting.co.za> Message-ID: <1288178341.44.0.380775642484.issue9913@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed the file needs updating. Can you do it? I?m not sure the contents of this file should be moved under Doc. There is no build/installation guide on docs.python.org, probably because most users don?t build themselves. Having advanced docs under Misc with a reference in the README seems okay to me. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Wed Oct 27 18:44:11 2010 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Wed, 27 Oct 2010 18:44:11 +0200 Subject: [docs] Python 3.1.2 Syntax Error In-Reply-To: References: <98093A59-1070-4DF6-8898-BE794289ED88@mac.com> <4CBC4DD2.3020408@netwok.org> Message-ID: <4CC856DB.2070706@netwok.org> [reply received off-list quoted here] Le 23/10/2010 20:06, Timothy Long a ?crit : > Thanks very much for the prompt response! My pleasure :) > One follow up question. How easy will it be to pick up python 3 provided I learn python 2? > Wondering if I shouldn't just skip in to the most current version and struggle through on my own... You should find comprehensive answers on http://wiki.python.org/moin/Python2orPython3 Personal advice: Python 3 has a number of great and small improvements over Python 2, and some of the problems I stumbled upon while learning 2.5 don?t exist anymore in 3.1. Other people argue that 3.x won?t be part of their work environment for years and recommend to stick with 2.x. Further inquiries can be directed to the python-list mailing list. A lot of them are probably already answered, too; the archives are public and indexed by search engines. Cheers From report at bugs.python.org Wed Oct 27 22:57:25 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:57:25 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213044.84.0.729232909389.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I completely agree with Fred; this is a regression and a bug in Python 2.7 and should be fixed. I have a doctest in Mailman 3 for example that cannot pass in both Python 2.6 and 2.7 (without IMO ugly hackery). Not only that, but json is documented as converting JSON str to unicode, which it does fine in Python 2.6, 3.1 and 3.2. Why should Python 2.7 be different (and broken)? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:59:23 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:59:23 +0000 Subject: [docs] [issue10038] json.loads() on str erroneously returns str. should return unicode In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213163.6.0.968106215041.issue10038@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: Returntype of json.loads() on strings -> json.loads() on str erroneously returns str. should return unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:59:44 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:59:44 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213184.43.0.0873608999158.issue10038@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: json.loads() on str erroneously returns str. should return unicode -> json.loads() on str should return unicode, not str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:55:44 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 28 Oct 2010 01:55:44 +0000 Subject: [docs] [issue10038] Returntype of json.loads() on strings In-Reply-To: <1288213044.84.0.729232909389.issue10038@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: I'll note that it seems relevant that this package is not considered "externally maintained" by the terms of PEP 360: http://www.python.org/dev/peps/pep-0360/ Given the level of attention this has received from the originator of the code, we should not hesitate to commit technically acceptable changes to the Python repository, ---------- title: json.loads() on str should return unicode, not str -> Returntype of json.loads() on strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 06:13:02 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 28 Oct 2010 04:13:02 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288239182.03.0.434183455986.issue10038@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- title: Returntype of json.loads() on strings -> json.loads() on str should return unicode, not str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 19:58:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 17:58:29 +0000 Subject: [docs] [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288288709.46.0.157026087341.issue10038@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1 for fixing this in-tree. We need a patch, though ;) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:30:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 20:30:55 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288297855.48.0.580918345272.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attaching another small doc improvement: "gon" is better know as "grad" and even under that name requires an explanation. See issue7061a.diff ---------- Added file: http://bugs.python.org/file19404/issue7061a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:31:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 20:31:15 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288297875.87.0.991023449541.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: committed/rejected -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:29:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:29:53 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288304993.24.0.163535990043.issue10224@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Build, Documentation nosy: +docs at python versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:39:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:39:07 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288305547.24.0.704150467458.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I had some success after running 2to3 on Doc/conf.py and Doc/tools. The build succeeded, but I have not compared the output yet. Running doctest, however, still reported lots of errors and hang in turtle.rst. $ sphinx-build -b doctest -d Doc/build3/doctrees -D latex_paper_size= Doc Doc/build3/html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:32:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:32:46 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288319565.5.0.62696760445.issue10147@psf.upfronthosting.co.za> ?ric Araujo added the comment: Marc-Andr?: I do recall it being a grammar rule. Take for example the difference between the compound noun ?a system call? and the compound noun used as adjective ?system-level? (in ?a system-level call?). Again, I?m not on a crusade here, just reacting on my gut feeling about a minor change. I can ask English professors if you want :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:33:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:33:59 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288319639.33.0.789025131893.issue10147@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19333/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:07:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 04:07:13 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288325233.7.0.847599039572.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Incremental build was not that successful. After editing Doc/faq/programming.rst, I get the following in the error log: # Sphinx version: 1.1pre # Python version: 3.2a3+.0 # Docutils version: 0.7 release # Jinja2 version: 2.5.5 Traceback (most recent call last): File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/cmdline.py", line 173, in main app.build(force_all, filenames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/application.py", line 203, in build self.builder.build_update() File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 193, in build_update 'out of date' % len(to_build)) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 249, in build self.write(docnames, list(updated_docnames), method) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 279, in write self.prepare_writing(docnames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/html.py", line 231, in prepare_writing self.load_indexer(docnames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/html.py", line 619, in load_indexer self.indexer.load(f, self.indexer_format) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 131, in load frozen = format.load(stream) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 64, in load return self.loads(f.read()) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 55, in loads if not data or not s.startswith(self.PREFIX) or not \ TypeError: expected an object with the buffer interface ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:51:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 04:51:31 +0000 Subject: [docs] [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288327891.17.0.649718399012.issue10147@psf.upfronthosting.co.za> Georg Brandl added the comment: I can only repeat myself and point to . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:20:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:20:02 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288329602.16.0.115594874287.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: I fixed that bug in Sphinx rev 49747f5b0c70 (which I will push as soon as bitbucket is up again); incremental build now works for me. ---------- versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:26:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 05:26:06 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The following example in Doc/library/urlparse.rst is wrong >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html', params='', query='', fragment='') In the actual output, scheme='www.cwi.nl'. In addition, the preceding text is confusing and probably not grammatical: """ Otherwise, it is not possible to distinguish between netloc and path components, and would the indistinguishable component would be classified as the path as in a relative URL. """ Discovered while working on issue 10225. ---------- assignee: docs at python components: Documentation messages: 119855 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: urlparse example is wrong versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:31:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:31:27 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288330287.09.0.876213805364.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: In r85910, I ported the Python-specific modules in tools/ so that they don't need to be 2to3-converted. Now you can basically easy_install Sphinx on 3.1 and run its sphinx-build without touching the Doc/ tree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:32:19 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:32:19 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288330339.98.0.155629584207.issue10226@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:51:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 05:51:26 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288331485.96.0.298263716884.issue10226@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks like I've been beaten again by make doctest picking up older python, but something is not right here: In Python 2.6.5: >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='www.cwi.nl', netloc='', path='80/%7Eguido/Python.html', params='', query='', fragment='') but in 2.7: >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html', params='', query='', fragment='') and the text preceding the example in the doc does not really tell which is right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:15:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:15:08 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288332907.9.0.835031469356.issue10226@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this is correct: it is the new behavior after the fix for #754016 was committed. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From sholland at mac.com Tue Oct 26 17:26:56 2010 From: sholland at mac.com (Stephen Holland M.D.) Date: Tue, 26 Oct 2010 10:26:56 -0500 Subject: [docs] proposal to improve documentation for parameterized SQLite .execute method Message-ID: <004D9554-C720-4C24-9010-6D2BA88ABEE9@mac.com> Hello! I appreciate all the work that has gone into the python system. I was using the sqlite3 package and found a documentation issue that has to have caused problems for other users and I would like to help improve the documentation. From web page http://docs.python.org/library/sqlite3.html in the initial section regarding the description of parameter substitution and in the section on execute examples are given for using this technique. As a responsible sql writer, I knew that strings that contain spaces need to be quoted in as SQL insert statement. The examples did not contain any space containing strings, so when I tried to use the technique I put quotes around the ? in the .execute method call, as I was using data that had spaces and other punctuation within it. This causes an error. The cursor method automatically quotes the strings, and actually errors out if the ? is quoted. I propose that the examples contain some insertions that include spaces, and additional documentation to describe what other safety steps are done in parameter substitution to the arguments. Steve Holland From chris at chriscurvey.com Tue Oct 26 20:58:15 2010 From: chris at chriscurvey.com (Chris Curvey) Date: Tue, 26 Oct 2010 14:58:15 -0400 Subject: [docs] suggestion for tutorial/datastructures page Message-ID: the page at http://docs.python.org/tutorial/datastructures.html states: list.index(*x*)Return the index in the list of the first item whose value is *x*. It is an error if there is no such item it would be nice to s/error/ValueError/ -- Ignoring that little voice in my head since 1966! -------------- next part -------------- An HTML attachment was scrubbed... URL: From keith.briggs at bt.com Thu Oct 28 15:53:07 2010 From: keith.briggs at bt.com (keith.briggs at bt.com) Date: Thu, 28 Oct 2010 14:53:07 +0100 Subject: [docs] bug at http://docs.python.org/py3k/library/re.html#module-re Message-ID: > (?:...) > A non-grouping version of regular parentheses. Shouldn't that be A non-capturing version of regular parentheses. ? It still groups; it just doesn't capture. Keith From report at bugs.python.org Fri Oct 29 08:40:30 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 06:40:30 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288334430.35.0.313222344826.issue10224@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Did you know break building the 3.x documentation with Python 2? If so, please revert that change. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From georg at python.org Fri Oct 29 08:17:16 2010 From: georg at python.org (Georg Brandl) Date: Fri, 29 Oct 2010 08:17:16 +0200 Subject: [docs] bug at http://docs.python.org/py3k/library/re.html#module-re In-Reply-To: References: Message-ID: <4CCA66EC.2080603@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 28.10.2010 15:53, schrieb keith.briggs at bt.com: >> (?:...) >> A non-grouping version of regular parentheses. > > Shouldn't that be > > A non-capturing version of regular parentheses. > > ? > It still groups; it just doesn't capture. Hi Keith, you're right -- this is now fixed in the development docs. regards, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzKZuwACgkQN9GcIYhpnLCzWgCdGBY0fsYabZJMEkdnufhwg/Zt /f4AoI1s9hAdq2JJCoelUtMKXQz0ngaN =XYUm -----END PGP SIGNATURE----- From report at bugs.python.org Fri Oct 29 08:55:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:55:37 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288335336.84.0.712847798586.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: Nope, these files run just as fine in Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:56:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:56:26 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288335386.25.0.413396397624.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: (The usual build process via Makefile still uses Python 2, and that won't change for 3.2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:05:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:05:15 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288332907.9.0.835031469356.issue10226@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Oct 29, 2010 at 2:15 AM, Georg Brandl wrote: .. > I think this is correct: it is the new behavior after the fix for #754016 was committed. > I agree. I kept the issue open because I cannot parse """ Otherwise, it is not possible to distinguish between netloc and path components, and would the indistinguishable component would be classified as the path as in a relative URL. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:06:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 07:06:13 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288335973.37.0.470788636865.issue10226@psf.upfronthosting.co.za> Georg Brandl added the comment: That's for Senthil to rephrase as intended :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:50:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:50:32 +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: <1288338632.68.0.355674051173.issue10225@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 10:56:06 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 29 Oct 2010 08:56:06 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288335973.37.0.470788636865.issue10226@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: - Otherwise, it is not possible to distinguish between netloc and path - components, and would the indistinguishable component would be classified - as the path as in a relative URL. + If the netloc does not start with '//', the module cannot distinguish it + from path and it would classify it as path component in the relative url. How does this sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:40:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 15:40:56 +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: <1288366856.48.0.449064438819.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a new patch which fixes all but two doctest examples. I suspect that the remaining failures are due to a bug in sphinx. (The examples are executed even though marked up with ::). ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file19413/issue10225a-r27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:50:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 15:50:47 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288367446.91.0.327296532344.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The usual build process via Makefile still uses Python 2, > and that won't change for 3.2. Would you consider changing "doctest" make target to check out sphinx trunk (or 3.x compatible release) and run it with the py3k python? This should not affect regular doc builds and running doctest under anything other than the current version of python makes very little sense. Note that I am still targeting documentation fixes for 3.2. See issue 10225. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:10:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 16:10:31 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288368631.22.0.624896315116.issue10226@psf.upfronthosting.co.za> ?ric Araujo added the comment: // is not part of the netloc in RFC terms, it?s a delimiter between components ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:28:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 16:28:06 +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: <1288369686.4.0.690054193901.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I started porting the patch to 3.x and it looks like I've uncovered another bug in sphinx: $ sphinx-build -b doctest -d build/doctrees . build/doctest library/traceback.rst .. ********************************************************************** File "library/traceback.rst", line 327, in default .. Differences (ndiff with -expected +actual): *** print_tb: - File "", line 10, in ? ^^^ + File "", line 10, in ? ^^^^^^^^^^^ lumberjack() (I added +REPORT_NDIFF to testoutput options for clarity.) I even tried adding +ELLIPSIS to options, but this did not help. The same example works in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:50:14 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 29 Oct 2010 16:50:14 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288371014.59.0.494685224766.issue10224@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:03:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:03:41 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288375421.78.0.577976316799.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed issue7061a.diff r85930. This is probably a backport candidate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:14:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:14:53 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376093.65.0.39345844345.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: While working on issue 10225, I have found several mistakes in turtle.rst examples. It probably makes sense to review these separately and commit as part of this issue rather than bunching with the other issue 10225 changes. There are still two remaining failures that I attribute to sphinx bugs. One is due to an already reported ellipsis bug, and the other is a rather strange failure in the shapetransform example. Georg, can you take a look? File "library/turtle.rst", line 1272, in default Failed example: turtle.shapetransform() Expected: (4.0, -1.0, -0.0, 2.0) Got: (2.82842712474619, -2.121320343559643, 2.8284271247461907, 0.7071067811865472) Note that this test succeeds when it is the only test in a file. ---------- Added file: http://bugs.python.org/file19418/issue7061b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:16:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:16:41 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376201.28.0.767606783598.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Gregor, I suspect that there are doctest mistakes in the turtle.py docstrings, but I cannot figure out how to run it through doctest. Can you help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:29:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:29:31 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376970.68.0.96421020893.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As I suspected, the turtle.shapetransform() stems from sphinx' failure to reinitialize the turtle variable as testsetup dictates. I can work around this by adding >>> turtle = Turtle() above >>> turtle.shape("square") >>> turtle.shapesize(4,2) >>> turtle.shearfactor(-0.5) >>> turtle.shapetransform() (4.0, -1.0, -0.0, 2.0) but I don't think it is a good idea to pollute the documentation this way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 11:37:21 2010 From: report at bugs.python.org (Zbyszek Szmek) Date: Sat, 30 Oct 2010 09:37:21 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288431441.51.0.278424501442.issue10224@psf.upfronthosting.co.za> Changes by Zbyszek Szmek : ---------- nosy: +zbysz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 12:20:02 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 10:20:02 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> New submission from Maciej Fijalkowski : PEP100 (http://www.python.org/dev/peps/pep-0100/) links to python starship. Should it just link to python.org for the newest version of this doc? ---------- assignee: docs at python components: Documentation messages: 119967 nosy: docs at python, fijall priority: normal severity: normal status: open title: PEP100 has broken links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:09:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 11:09:56 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288436996.49.0.970156897537.issue10244@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you say that the link is broken? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:27:18 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 11:27:18 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438038.01.0.512559626789.issue10244@psf.upfronthosting.co.za> Maciej Fijalkowski added the comment: Python starship is down, I thought it's permanently down, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:30:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 11:30:54 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438254.88.0.254266580257.issue10244@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The link works fine for me right now, and the starship is alive and well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:37:20 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 11:37:20 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438640.76.0.928367953213.issue10244@psf.upfronthosting.co.za> Maciej Fijalkowski added the comment: That is really weird, it definitely doesn't for me. Anyway, closing the ticket then. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:54:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 30 Oct 2010 11:54:08 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288439648.52.0.298129894069.issue10244@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, obviously only the first link works (does for me too), the second needs to have a version filled in :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:54:38 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 30 Oct 2010 11:54:38 +0000 Subject: [docs] [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <4CCC077B.3030405@egenix.com> Marc-Andre Lemburg added the comment: Maciej Fijalkowski wrote: > > New submission from Maciej Fijalkowski : > > PEP100 (http://www.python.org/dev/peps/pep-0100/) links to python starship. Should it just link to python.org for the newest version of this doc? The starship link works for me (starship just moved to a new server, so it'll take a while before the DNS changes propogate). Note that the proposal was moved into the PEP list after we introduced PEPs - the proposal itself predates PEPs as we have them now. The link to the older versions are just there for historic reasons. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:51:22 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 14:51:22 +0000 Subject: [docs] [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288450282.22.0.736195691365.issue10226@psf.upfronthosting.co.za> R. David Murray added the comment: How about this: - If the scheme value is not specified, urlparse following the syntax - specifications from RFC 1808, expects the netloc value to start with '//', - Otherwise, it is not possible to distinguish between net_loc and path - component and would classify the indistinguishable component as path as in - a relative url. + Following the syntax specifications in RFC 1808, urlparse recognizes + a netloc only if it is properly introduced by '//'. Otherwise the + input must be presumed to be a relative URL and thus to start with + a path component. However, it seems to me there is a bug here: >>> urlparse.urlparse('www.k.com:80/path') ParseResult(scheme='', netloc='', path='www.k.com:80/path', params='', query='', fragment='') >>> urlparse.urlparse('www.k.com:path') ParseResult(scheme='www.k.com', netloc='', path='path', params='', query='', fragment='') I think the second one is correct and that the first one should produce ParseResult(scheme='www.k.com', netloc='', path='80/path', params='', query='', fragment='') I haven't read all the way through the RFC again, though. But *one* of the above is wrong. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 00:01:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Oct 2010 22:01:59 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288476119.48.0.394724333211.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On initialization: the json doc has 6 examples. Each starts with 'import json' so each is independent. However, I agree that doing the same for turtle examples would be a bit much. On the other hand, I think 24.5.3. *Methods of RawTurtle/Turtle and corresponding functions* should explicitly give the needed code. So I would change "Most of the examples in this section refer to a Turtle instance called turtle." to "The examples below that refer to a Turtle instance called turtle require something like the following to be run first: >>> from turtle import turtle; turtle = Turtle() " The three examples above turtle.shapetransform start with >>> turtle.reset() I presume they need that to run reliably. If it is also needed for the shapetransform example to run correctly, then I would just added it there too. I will post more after I compare my original post to your revision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 02:27:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 31 Oct 2010 00:27:42 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288484862.33.0.884408929185.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: GREGOR, I think we need your help to answer a few of these. Subissues from my opening post not resolved in rev85732 -------------------- "version of python installed with Tk support.": cap 'python' to 'Python' Is there any standard on capitalizing 'Python'? ----------- 24.5.3.1. Turtle motion ?? distance units? pixel or world, depending on mode? presume yes, but should say something here. -------------- I said ''' "turtle.onclick(fun, btn=1, add=None) It seems that 'add=False' would be same as 'add=None' and more consistent with below. "add ? True or False ? if True, a new binding will be added, otherwise it will replace a former binding " ''' In declining to make a change, you said " The add argument is passed unchanged to canvas' bind method which is documented as taking either '' or '+' string:" However, naive users are not supposed to know that, which is why you moved turtle doc out of tk chapter. Anyway, one has to know or guess to look for the doc on the generic widget bind method. There still remains a discrepancy between signature and following doc. If you do not want to change the signature, change the doc. Anyway, the sentence needs to be expanded so it makes sense without reading the generic tkinter bind doc. ""add ? True, False, or None - if True, add the new binding to any that already exist, otherwise replace all former bindings with the new one." Same change is needed for onrelease and ondrag ---------------------- You changed the title "Excursus about the use of compound shapes" to "Compound shapes" but did not, as far as I can see, make the same change in the reference in *24.5.5. The public classes of the module turtle* after "addcomponent(poly, fill, outline=None)" Also, the above should actually be "class turtle.addcomponent(poly, fill, outline=None)" to be consistent with the other entries ---------------------------- ''' 24.5.4. Methods of TurtleScreen/Screen and corresponding functions "Most of the examples in this section refer to a TurtleScreen instance called screen." However, 24.5.4.1. Window control turtle.bgcolor(*args) " and so on throughout the section. ?? I presume that should be "screen.bgcolor(*args)" and so on throughout the section. ''' Not addressed as far as I can see. ------------------------ .delay vs. speed is #10170 ------------ ''' "Remark: in order to be able to register key-events, TurtleScreen must have the focus. (See method listen(). >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkey(f, "Up") >>> screen.listen()" >From the Remark, I expected the two calls to be in the opposite order. Ditto for .onkeypress() ''' Since the .listen doc says "Set focus on TurtleScreen (in order to collect key-events). ", I strongly suspect that 'register' in the remark should be changed to 'collect', 'capture', or 'respond to' for both onkeypress and onkeyrelease. Then the example is correct. --------------- The last 3 sub-issues are still open ''' 24.5.4.5. Settings and special methods ?? .mode: 'world' like standard or logo w/r/t angles? ''' ''' "24.5.4.6. Methods specific to Screen, not inherited from TurtleScreen turtle.exitonclick() Bind bye() method to mouse clicks on the Screen." "If the value ?using_IDLE? in the configuration dictionary is False (default value), also enter mainloop. Remark: If IDLE with the -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE?s own mainloop is active also for the client script." >From Windows shortcut, I cannot tell how IDLE is started, but seems to work. Anything need to be said re IDLE/turtle on windows? My guess is that IDLE is running normally (without -n), so that there is a subprocess, so that 'using_IDLE' is False even though I am using it, just not in the same process. Correct? ''' ''' 24.5.8. Changes since Python 2.6 Sections about 2.x changes should not be in 3.x docs. ''' ----------------------- Thanks for the other half that are fixed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 02:29:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 31 Oct 2010 01:29:20 +0000 Subject: [docs] [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288484862.33.0.884408929185.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Oct 30, 2010 at 8:27 PM, Terry J. Reedy wrote: .. > "version of python installed with Tk support.": cap 'python' to 'Python' > > Is there any standard on capitalizing 'Python'? It looks like it is consistently capitalized in the Python manual. > ----------- > > 24.5.3.1. Turtle motion > > ?? distance units? pixel or world, depending on mode? > presume yes, but should say something here. > -------------- I would just use "distance units" and "angle units" throughout the documentation and explain somewhere how the settings determine the units. .. > There still remains a discrepancy between signature and following doc. If you do not want to change the signature, change the doc. Anyway, the sentence needs to be expanded so it makes sense without reading the generic tkinter bind doc. > > ""add ? True, False, or None - if True, add the new binding to any that already exist, otherwise replace all former bindings with the new one." I would rather change the default to False in both documentation and the code, but let's hear from Gregor first. > > Same change is needed for onrelease and ondrag > ---------------------- > > You changed the title "Excursus about the use of compound shapes" to "Compound shapes" but did not, as far as I can see, make the same change in the reference in *24.5.5. The public classes of the module turtle* after > "addcomponent(poly, fill, outline=None)" I missed that. I'll rename that section to "Public classes". > > Also, the above should actually be > "class turtle.addcomponent(poly, fill, outline=None)" > to be consistent with the other entries I am not sure what you mean. AFAICT, addcomponent is a method and correctly marked as such. .. > and so on throughout the section. > ?? ?I presume that should be > "screen.bgcolor(*args)" and so on throughout the section. > ''' > Not addressed as far as I can see. I cannot find "turtle.bgcolor". Can you post a patch with what you want to change? [skipped issues for which I would appreciate Gregor's input] > ----------------------- > Thanks for the other half that are fixed! I thought I did better than that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:30:40 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 21:30:40 +0000 Subject: [docs] [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1288560639.87.0.395198445231.issue7447@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r86066, r86068 and r86069. ---------- resolution: -> fixed status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:36:27 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 22:36:27 +0000 Subject: [docs] [issue9886] Make operator.itemgetter/attrgetter/methodcaller easier to discover In-Reply-To: <1284725606.32.0.188356028787.issue9886@psf.upfronthosting.co.za> Message-ID: <1288564587.02.0.316320913526.issue9886@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. See r86073. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From zug at ivs.cs.uni-magdeburg.de Sat Oct 30 20:29:21 2010 From: zug at ivs.cs.uni-magdeburg.de (Sebastian Zug) Date: Sat, 30 Oct 2010 20:29:21 +0200 Subject: [docs] Typo in 16.6.1.1. Message-ID: <4CCC6401.3090305@ivs.cs.uni-magdeburg.de> Dear Python documentation team, on page http://docs.python.org/library/multiprocessing.html in chapter "16.6.1.1. The Process class" there is a obvious typo inside the second code example in line 7 from multiprocessing import Process import os def info(title): print title print 'module name:', __name__ print 'parent process:', os.getppid() <-- it means os.getpid() print 'process id:', os.getpid() def f(name): info('function f') print 'hello', name if __name__ == '__main__': info('main line') p = Process(target=f, args=('bob',)) p.start() p.join() Best wishes from Germany Enjoy the weekend Sebastian -- ------------------------------------------------------------- Dipl. Ing. Sebastian Zug Dept. Embedded Systems and Operating Systems (EOS) Institute for Distributed Systems (IVS) Otto-von-Guericke-University of Magdeburg Universit?tsplatz 2 39106 Magdeburg Germany mail: zug at ivs.cs.uni-magdeburg.de Tel.: +49 - 391 - 67 - 11459 Fax: +49 - 391 - 67 - 11161