From report at bugs.python.org Thu Sep 1 00:42:41 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2011 22:42:41 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types Message-ID: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> New submission from Nick Coghlan : Section 4 of the Standard Library reference currently includes the two following sections (amongst others): 4.6. Sequence Types ? str, bytes, bytearray, list, tuple, range 4.9. memoryview type This is crazy - memoryview, a fairly niche type, gets its own second tier section on the main table of contents, while str, one of the most important types in Python, is tucked away under the generic "Sequence Type" heading? I propose that these sections be rearranged as: 4.6 Sequence Types - list, tuple, range 4.7 Text Types - str 4.8 Binary Data Types - bytes, bytearray, memoryview The Set Types and Mapping Types sections would slide down to sections 4.9 and 4.10 to make room for the two new sections. ---------- assignee: docs at python components: Documentation messages: 143284 nosy: docs at python, ncoghlan priority: normal severity: normal status: open title: Rearrange descriptions of builtin types versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 00:43:02 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2011 22:43:02 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314830582.22.0.390208490447.issue12874@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: Rearrange descriptions of builtin types -> Rearrange descriptions of builtin types in the Library reference _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 00:43:21 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2011 22:43:21 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314830601.31.0.0093119502103.issue12874@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 00:45:56 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2011 22:45:56 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314830756.34.0.997672310395.issue12874@psf.upfronthosting.co.za> Nick Coghlan added the comment: Better titles for the proposed new sections: 4.7 Text Data - str 4.8 Binary Data - bytes, bytearray, memoryview ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 00:56:32 2011 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2011 22:56:32 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314831392.02.0.135204174688.issue12874@psf.upfronthosting.co.za> Guido van Rossum added the comment: I agree on the subdivision, but I think they should still be grouped together somehow, since these all really *do* share some interfaces: __getitem__ (with slicing), __iter__, __len__, at least; arguably __contains__; probably some others (see collections/abc.py). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 01:05:35 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2011 23:05:35 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314831935.29.0.869216361793.issue12874@psf.upfronthosting.co.za> Nick Coghlan added the comment: Putting the new sections on tier 2 makes a big difference in discoverability, since that's the lowest level the main ToC page shows. Perhaps just including the phrase "Sequence Type" in the new section titles would provide enough logical grouping? Something like: 4.6 Sequence Types - list, tuple, range 4.7 Text Sequence Type - str 4.8 Binary Data Sequence Types - bytes, bytearray, memoryview ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 01:16:49 2011 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2011 23:16:49 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314831935.29.0.869216361793.issue12874@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: That sounds fine. Or list most of them at tier 2: 4.6 Sequence Types - list, tuple, range, str, bytes and friends 4.6.1 Sequence containers - list, tuple, range 4.6.2 Text Sequence Type - str 4.6.3 Binary Data Sequence Types - bytes, bytearray, memoryview Although including range() here feels a bit odd? (It's a much more specialized type -- actually the same can be said for memoryview.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 02:58:28 2011 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 01 Sep 2011 00:58:28 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314838708.13.0.0598806730673.issue12874@psf.upfronthosting.co.za> Nick Coghlan added the comment: 'Sequence Types - list, tuple, str, bytes, etc' *might* work, but I think part of the problem is that str's brevity is actually a downside in this case. I know I missed it when I was scanning the ToC earlier (I wanted to check if the internal Unicode repr for narrow builds was documented at all - it doesn't appear to be). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 03:09:55 2011 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 01 Sep 2011 01:09:55 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314838708.13.0.0598806730673.issue12874@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: How about "list, tuple, text and binary strings" ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 03:12:28 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Sep 2011 01:12:28 +0000 Subject: [docs] [issue12874] Rearrange descriptions of builtin types in the Library reference In-Reply-To: <1314830561.27.0.909082052318.issue12874@psf.upfronthosting.co.za> Message-ID: <1314839548.74.0.331878917681.issue12874@psf.upfronthosting.co.za> Ezio Melotti added the comment: I believe this is a duplicate of #4966. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 03:40:46 2011 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 01 Sep 2011 01:40:46 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1314841246.1.0.887148940176.issue4966@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bringing a suggestion over from #12874, I think it may be worth splitting the current "Sequence Types" section into 3 pieces that all appear in the top level table of contents for the library reference: 4.6 Sequence Types - list, tuple, range 4.7 Text Sequence Type - str 4.8 Binary Data Sequence Types - bytes, bytearray, memoryview ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 07:17:08 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 01 Sep 2011 05:17:08 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation Message-ID: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> New submission from Eli Bendersky : In the 2.7 docs, re.compile has this signature: re.compile(pattern[, flags]) >From here it isn't clear what the default value of 'flags' is, to be able to write code like this: re.compile(pattern, re.I if options['ignore_case'] else ) Of course, looking at the source shows immediately that the default flag value is 0 (which is kind-of implied by the flags being a bit-OR of flags, but not mentioned explicitly). I saw that in the latest 3K docs, it is documented properly: re.compile(pattern, flags=0) Naturally this applies to other methods of 're' that take 'flags'. I hope I'm not missing something and this really is just a documentation issue. If no objections arise, I will commit a fix to the docs of 're' in 2.7 ---------- assignee: docs at python components: Documentation messages: 143300 nosy: docs at python, eli.bendersky, ezio.melotti, pitrou priority: normal severity: normal status: open title: backport re.compile flags default value documentation versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 07:24:31 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Sep 2011 05:24:31 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation In-Reply-To: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> Message-ID: <1314854671.76.0.585244152204.issue12875@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't think you are missing anything, but using ints instead of flags is discouraged (see #11957). OTOH there's no re.NOFLAGS flag that can be used instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 07:40:30 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Sep 2011 05:40:30 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation In-Reply-To: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> Message-ID: <1314855630.64.0.612117425136.issue12875@psf.upfronthosting.co.za> Ezio Melotti added the comment: Two more things: 1) Python 2 doc used to use the func(arg[, optional1[, optional2]]) notation, and with Python 3 we switched to func(arg, optional1=default1, optional2=default2). The latter is also used in Python 2 now, and the [] are still there in Python 3 in some places; 2) If you are going to fix it, you can probably backport the fix from py3k with "hg diff Doc/library/re.rst -c 106ee4eb5970"; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 08:17:12 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 01 Sep 2011 06:17:12 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation In-Reply-To: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> Message-ID: <1314857832.42.0.429689467144.issue12875@psf.upfronthosting.co.za> Eli Bendersky added the comment: Ezio, "but using ints instead of flags is discouraged (see #11957). OTOH there's no re.NOFLAGS flag that can be used instead." Indeed, there's no re.NOFLAGS, and as I mentioned the 3k docs mention 0 as the default value, thus (in a way) encouraging passing the numeric value. Perhaps re.NOFLAGS should be added (at least in 3.3)? The docs can then be modified to specify it as the default value of 'flags' instead of 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 1 08:17:59 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 01 Sep 2011 06:17:59 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation In-Reply-To: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> Message-ID: <1314857879.21.0.157585017328.issue12875@psf.upfronthosting.co.za> Eli Bendersky added the comment: Regarding backporting 106ee4eb5970 - it's probably a good thing to do but I wouldn't mix it with this issue. ---------- _______________________________________ Python tracker _______________________________________ From georg at python.org Thu Sep 1 09:04:09 2011 From: georg at python.org (Georg Brandl) Date: Thu, 01 Sep 2011 09:04:09 +0200 Subject: [docs] Doc link incorrect In-Reply-To: <4E531CBD.4030109@terranne.com> References: <4E531CBD.4030109@terranne.com> Message-ID: <4E5F2E69.3080008@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 23.08.2011 05:21, schrieb T.Hill: > Found a link that needs to be corrected... On page: > http://docs.python.org/release/2.6/download > > The PLAIN TEXT (zipped) link is: > *http://docs.python.org/ftp/python/doc/2.6/python-2.6-docs-pdf-text.zip* > > Should be changed to: > *http://docs.python.org/ftp/python/doc/2.6/python-2.6-docs-text.zip* > > Note: Removed "-pdf" before "-text". > > Thanks for the documentation... This is now fixed. But really, you should use 2.6.7 and its docs at /release/2.6.7... Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk5fLmkACgkQN9GcIYhpnLBMswCdG76281V0vyPlAwGsPfPud+x+ AIQAoKJ0IqF55DjDkJvZT5od2CGGK9bq =pdj2 -----END PGP SIGNATURE----- From report at bugs.python.org Fri Sep 2 04:34:11 2011 From: report at bugs.python.org (Meador Inge) Date: Fri, 02 Sep 2011 02:34:11 +0000 Subject: [docs] [issue12880] ctypes: clearly document how structure bit fields are allocated Message-ID: <1314930851.91.0.112444630543.issue12880@psf.upfronthosting.co.za> New submission from Meador Inge : As issues like issue6069 and issue11920 allude to, figuring out how 'ctypes' allocates bit-fields is not very clear. The documentation should be enhanced to flesh this out in more detail. As an example, Microsoft documents the VC++ implementation in a reasonably clear manner ( http://msdn.microsoft.com/en-us/library/ewwyfdbe(v=vs.71).aspx ). ---------- assignee: docs at python components: Documentation messages: 143369 nosy: docs at python, meadori, terry.reedy, vladris priority: normal severity: normal stage: needs patch status: open title: ctypes: clearly document how structure bit fields are allocated type: feature request versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 17:45:02 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Sep 2011 15:45:02 +0000 Subject: [docs] [issue12298] Sphinx glitch in library/functions In-Reply-To: <1307635612.57.0.782200385704.issue12298@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 7a05cb3beddf by ?ric Araujo in branch '3.2': Fix a few links in the table of built-in functions (#12298) http://hg.python.org/cpython/rev/7a05cb3beddf New changeset 58dd7addef3a by ?ric Araujo in branch '3.2': Add links from library/functions to other docs. http://hg.python.org/cpython/rev/58dd7addef3a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 17:45:02 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Sep 2011 15:45:02 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 755a57f987ca by ?ric Araujo in branch '3.2': #10454: a few edits to compileall help messages http://hg.python.org/cpython/rev/755a57f987ca New changeset 892e0ee4ca32 by ?ric Araujo in branch 'default': Merge doc changes from 3.2 (#10454, #12298) http://hg.python.org/cpython/rev/892e0ee4ca32 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 18:03:04 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Sep 2011 16:03:04 +0000 Subject: [docs] [issue10454] Clarify compileall command-line options In-Reply-To: <1290096691.96.0.508340552683.issue10454@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4ae85348e3e8 by ?ric Araujo in branch '2.7': Clarify compileall command-line options (#10454). http://hg.python.org/cpython/rev/4ae85348e3e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 18:54:06 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Sep 2011 16:54:06 +0000 Subject: [docs] [issue12298] Sphinx glitch in library/functions In-Reply-To: <1307635612.57.0.782200385704.issue12298@psf.upfronthosting.co.za> Message-ID: <1314982446.23.0.606221638308.issue12298@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I agree that all table entries should link to the entry in the same file. This is fixed in 3.2 and 3.3, with a bit of reST kludgery. I?ll backport to 2.7 if there is no negative feedback. > range() definitely needs a forward reference to 4.6 sequence types > bool() lacks forward references; it could have one to 4.2 Bool ops and 4.11.9 Bool values I have added links in a subsequent commit. > object() -- no where to go. > type(n,b,d) has no forward references as there is no where to go exactly I think this deserves another report. > slice() only has a reference to the glossary; it has no entry in Ch.4. "Slice objects have > read-only data attributes start, stop and step which merely return the argument values (or > their default). They have no other explicit functionality" is slightly wrong since there > is the .indices method. Ditto. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 19:08:35 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Sep 2011 17:08:35 +0000 Subject: [docs] [issue12875] backport re.compile flags default value documentation In-Reply-To: <1314854228.49.0.163476055978.issue12875@psf.upfronthosting.co.za> Message-ID: <1314983314.9.0.117744460503.issue12875@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 to backporting [flags=0]. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 20:09:55 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Sep 2011 18:09:55 +0000 Subject: [docs] [issue12781] Mention SO_REUSEADDR near socket doc examples In-Reply-To: <1313703988.58.0.161821822938.issue12781@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset fe60689d6a2e by Sandro Tosi in branch '2.7': #12781: Mention SO_REUSEADDR flag near socket examples http://hg.python.org/cpython/rev/fe60689d6a2e New changeset c4588cd2d59a by Sandro Tosi in branch '3.2': #12781: Mention SO_REUSEADDR flag near socket examples http://hg.python.org/cpython/rev/c4588cd2d59a New changeset eb9a9a043f13 by Sandro Tosi in branch 'default': #12781: merge with 3.2 http://hg.python.org/cpython/rev/eb9a9a043f13 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 20:10:41 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 02 Sep 2011 18:10:41 +0000 Subject: [docs] [issue12781] Mention SO_REUSEADDR near socket doc examples In-Reply-To: <1313703988.58.0.161821822938.issue12781@psf.upfronthosting.co.za> Message-ID: <1314987041.72.0.785750839705.issue12781@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 2 20:13:00 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 02 Sep 2011 18:13:00 +0000 Subject: [docs] [issue12887] Documenting all SO_* constants in socket module Message-ID: <1314987180.49.0.607596056761.issue12887@psf.upfronthosting.co.za> New submission from Sandro Tosi : spinning off msg142613 - it would be interesting to have in the socket module documentation also an explanation of all the several SO_ flags available; even a compact table could be ok; or even a link to a remote reference for them. ---------- assignee: docs at python components: Documentation messages: 143428 nosy: docs at python, eric.araujo, ezio.melotti, sandro.tosi priority: normal severity: normal stage: needs patch status: open title: Documenting all SO_* constants in socket module versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Fri Sep 2 21:35:34 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 2 Sep 2011 21:35:34 +0200 Subject: [docs] About In-Reply-To: References: Message-ID: On Wed, Aug 31, 2011 at 22:11, Sandro Tosi wrote: > Hi Adam, > > On Wed, Aug 31, 2011 at 05:31, Adam Woodbeck wrote: >> I was reading through the Python docs tonight and ran across the About >> section.? It contained a comprehensive list of people who contributed to the >> Python documentation.? I'm not sure if I qualify, but I contributed patches >> for issue10403, issue12369, and issue12278 - all three of which were >> accepted.? So if those patches qualify, I would appreciate it if you added >> my name to the About page of the Python documentation. > > That list of names is generated from the file Doc/ACKS.txt on the > cpython repository. I know that page suggests to write a mail here, > but given that file is usually updated by the core developer that > commits your patch, I think it would be better if you ask them how > they feel about it (it might be that they just forgot ;) ). Well, I just added you :) I don't know how long it will take to the doc to be regenerated (I guess for stable release, like 2.7 and 3.2, only on new releases, maybe a bit more frequently for py3k). Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From yves at zioup.com Fri Sep 2 19:39:04 2011 From: yves at zioup.com (Yves Dorfsman) Date: Fri, 02 Sep 2011 11:39:04 -0600 Subject: [docs] 404 on http://docs.python.org/bugs.html Message-ID: <4E6114B8.20106@zioup.com> In http://docs.python.org/bugs.html "See http://www.python.org/dev/workflow/ for a detailed description of the issue workflow." Then http://www.python.org/dev/workflow/ fourofours. -- Yves. http://www.SollerS.ca/ http://ipv6.SollerS.ca http://blog.zioup.org/ From georg at python.org Fri Sep 2 21:46:06 2011 From: georg at python.org (Georg Brandl) Date: Fri, 02 Sep 2011 21:46:06 +0200 Subject: [docs] About In-Reply-To: References: Message-ID: <4E61327E.7000108@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 02.09.2011 21:35, schrieb Sandro Tosi: > On Wed, Aug 31, 2011 at 22:11, Sandro Tosi wrote: >> Hi Adam, >> >> On Wed, Aug 31, 2011 at 05:31, Adam Woodbeck >> wrote: >>> I was reading through the Python docs tonight and ran across the About >>> section. It contained a comprehensive list of people who contributed >>> to the Python documentation. I'm not sure if I qualify, but I >>> contributed patches for issue10403, issue12369, and issue12278 - all >>> three of which were accepted. So if those patches qualify, I would >>> appreciate it if you added my name to the About page of the Python >>> documentation. >> >> That list of names is generated from the file Doc/ACKS.txt on the cpython >> repository. I know that page suggests to write a mail here, but given >> that file is usually updated by the core developer that commits your >> patch, I think it would be better if you ask them how they feel about it >> (it might be that they just forgot ;) ). > > Well, I just added you :) I don't know how long it will take to the doc to > be regenerated (I guess for stable release, like 2.7 and 3.2, only on new > releases, maybe a bit more frequently for py3k). No need to guess. All docs that are *not* under /release/ are regenerated twice a day. All those under /release/ are frozen to the state of the release they belong to. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk5hMn4ACgkQN9GcIYhpnLDXlACfcgc6mffCcnERMiLHgIAlivv4 Pa8Ani+pmBo2P8GbNLN7TOeekQyOg132 =B74E -----END PGP SIGNATURE----- From sandro.tosi at gmail.com Fri Sep 2 22:02:30 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 2 Sep 2011 22:02:30 +0200 Subject: [docs] About In-Reply-To: <4E61327E.7000108@python.org> References: <4E61327E.7000108@python.org> Message-ID: On Fri, Sep 2, 2011 at 21:46, Georg Brandl wrote: > No need to guess. All docs that are *not* under /release/ are regenerated > twice a day. ?All those under /release/ are frozen to the state of the > release they belong to. Thanks Georg: I didn't know about that, now I do :) Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Sep 4 08:41:51 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:41:51 +0000 Subject: [docs] [issue11360] In documentation of getopt, advertise argparse instead of optparse In-Reply-To: <1298982503.08.0.830578820579.issue11360@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset dff0f4db67da by ?ric Araujo in branch '3.2': Remove outdated pointer to optparse (fixes #11360). http://hg.python.org/cpython/rev/dff0f4db67da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 4 08:41:59 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:41:59 +0000 Subject: [docs] [issue12672] Some problems in documentation extending/newtypes.html In-Reply-To: <1312170894.35.0.0326753633212.issue12672@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 8083e51522ee by Eli Bendersky in branch '3.2': Issue #12672: remove confusing part of sentence in documentation http://hg.python.org/cpython/rev/8083e51522ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 4 08:42:01 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:42:01 +0000 Subject: [docs] [issue12761] Typo in Doc/license.rst In-Reply-To: <1313512901.16.0.106548527378.issue12761@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 5b21312c3800 by Sandro Tosi in branch '3.2': #12761: fix wording of zlib license section http://hg.python.org/cpython/rev/5b21312c3800 ---------- _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Sep 4 08:49:53 2011 From: georg at python.org (Georg Brandl) Date: Sun, 04 Sep 2011 08:49:53 +0200 Subject: [docs] 404 on http://docs.python.org/bugs.html In-Reply-To: <4E6114B8.20106@zioup.com> References: <4E6114B8.20106@zioup.com> Message-ID: <4E631F91.70700@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 02.09.2011 19:39, schrieb Yves Dorfsman: > > In http://docs.python.org/bugs.html > > "See http://www.python.org/dev/workflow/ for a detailed description of the > issue workflow." > > Then http://www.python.org/dev/workflow/ fourofours. Thanks for the report, this is now fixed (and will be live soon). Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk5jH5EACgkQN9GcIYhpnLAcWgCgsFK6MtFQIfzSpYus1gAeAD85 gqAAoKQjO+gTE9RwnCrB9uAnYGUMLpYk =JDS9 -----END PGP SIGNATURE----- From report at bugs.python.org Sun Sep 4 08:56:36 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:56:36 +0000 Subject: [docs] [issue12781] Mention SO_REUSEADDR near socket doc examples In-Reply-To: <1313703988.58.0.161821822938.issue12781@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 126069a5ecf6 by Sandro Tosi in branch '3.2': #12781: Mention SO_REUSEADDR flag near socket examples http://hg.python.org/cpython/rev/126069a5ecf6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 4 08:56:38 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:56:38 +0000 Subject: [docs] [issue12725] Docs: Odd phrase "floating seconds" in socket.html In-Reply-To: <1313030875.76.0.991462005584.issue12725@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 8730fdc9349f by Ezio Melotti in branch '3.2': #12725: fix working. Patch by Ben Hayden. http://hg.python.org/cpython/rev/8730fdc9349f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 4 08:56:38 2011 From: report at bugs.python.org (Roundup Robot) Date: Sun, 04 Sep 2011 06:56:38 +0000 Subject: [docs] [issue12838] FAQ/Programming typo: range[3] is used In-Reply-To: <1314240637.99.0.384249238245.issue12838@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6e156a6c4fd9 by Georg Brandl in branch '3.2': Close #12838: fix range() call. http://hg.python.org/cpython/rev/6e156a6c4fd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 02:59:25 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Mon, 05 Sep 2011 00:59:25 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1315184365.4.0.271396333984.issue11155@psf.upfronthosting.co.za> Westley Mart?nez added the comment: ?Hola! Just checking in. The documentation is still incorrect for all versions. There's a patch that fixes it ready to be reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 04:32:40 2011 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 05 Sep 2011 02:32:40 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1315189960.41.0.187045154454.issue11155@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 07:50:31 2011 From: report at bugs.python.org (Lennart Regebro) Date: Mon, 05 Sep 2011 05:50:31 +0000 Subject: [docs] [issue12896] Recommended location of the interpreter for Python 3 Message-ID: <1315201831.61.0.39811771821.issue12896@psf.upfronthosting.co.za> New submission from Lennart Regebro : The documentation on Using Python, 2.3. Python-related paths and files says that "exec_prefix/bin/python" is the recommended location for the interpreter, while for Python 3 it's "exec_prefix/bin/python3". http://docs.python.org/py3k/using/unix.html#python-related-paths-and-files ---------- assignee: docs at python components: Documentation messages: 143508 nosy: docs at python, lregebro priority: normal severity: normal status: open title: Recommended location of the interpreter for Python 3 versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 17:49:49 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 05 Sep 2011 15:49:49 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1315237789.47.0.636300315399.issue11155@psf.upfronthosting.co.za> Senthil Kumaran added the comment: anikom15's first patch seems correct. In the multiprocessing.py, the the arg 'obj' can be safely replaced with 'item' to be consistent with the docs. As this is not a keyword arg, it does not stand any chance of breaking any backwards compatibility. It looks me to that when multiprocessing' Queue.put was coding the first arg was wrongly mentioned as 'obj' instead of 'item'. I shall commit the first patch unless someone objects to the above reasoning. ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 18:12:22 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 05 Sep 2011 16:12:22 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1315239142.21.0.357171254444.issue11155@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Well, I should take back my previous comment. I realized that the positional arg in this case can be called as keyword arg. It would be wrong to change multiprocessing.py and it is correct to change the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 18:23:59 2011 From: report at bugs.python.org (Roundup Robot) Date: Mon, 05 Sep 2011 16:23:59 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset c6d4d4d64405 by Senthil Kumaran in branch '3.2': Fix closes Issue11155 - Correct the multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch by Westley Mart?nez. http://hg.python.org/cpython/rev/c6d4d4d64405 New changeset 8f1187288fac by Senthil Kumaran in branch 'default': merge from 3.2. Fix closes Issue11155 - Correct the multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch by Westley Mart?nez. http://hg.python.org/cpython/rev/8f1187288fac New changeset d29c9006d770 by Senthil Kumaran in branch '2.7': merge from 3.2. Fix closes Issue11155 - Correct the multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch by Westley Mart?nez. http://hg.python.org/cpython/rev/d29c9006d770 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 18:40:18 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Sep 2011 16:40:18 +0000 Subject: [docs] [issue12779] Update packaging documentation In-Reply-To: <1313686169.0.0.406072932055.issue12779@psf.upfronthosting.co.za> Message-ID: <1315240818.06.0.459565621804.issue12779@psf.upfronthosting.co.za> ?ric Araujo added the comment: To make commit review possible, I thought I?d make two patches for this: the first would be only markup fixes and minimal updates to match the reality of the code (i.e. convert setup.py examples to setup.cfg or pysetup, remove obsolete parts, etc.) and a second one with more rephrasing and reorganization (i.e. file deletions, moving chunks of docs, etc.). I?m not finished on the first patch and the diff already contains 1026 insertions and 921 deletions. So, as potential commit reviewers, do you think I should - 1) go ahead with my initial plan of a huge boring commit and a more interesting commit - 2) just make one commit - 3) one commit per file (with boring markup changes + non-boring changes) ---------- nosy: +ezio.melotti, sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 18:45:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Sep 2011 16:45:19 +0000 Subject: [docs] [issue12901] Nest class/methods directives in documentation Message-ID: <1315241119.9.0.996780726209.issue12901@psf.upfronthosting.co.za> New submission from ?ric Araujo : I picked up a few files in Doc/library and updated their markup to use directives nesting. The attached patch is the result; it?s a lot of changes for small benefit. If we think it?s a good change anyway, I have two questions - Do you think it would be a good idea to have the -checkins emails ignore whitespace changes in some cases? (I?m thinking a magic string in the commit message) - A number of files have a class directive near the top of the file, in the list of all public names, and a later section ?XX objects? with the methods and attributes. When this is changed to nested class/methods directives, sometimes the first class directive gets a noindex flag, but I think it should jsut be removed: the index in the sidebar is enough to let people jump to the doc. Do you agree? ---------- assignee: docs at python components: Documentation messages: 143552 nosy: benjamin.peterson, docs at python, eric.araujo, georg.brandl priority: normal severity: normal status: open title: Nest class/methods directives in documentation versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 5 18:45:40 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Sep 2011 16:45:40 +0000 Subject: [docs] [issue12901] Nest class/methods directives in documentation In-Reply-To: <1315241119.9.0.996780726209.issue12901@psf.upfronthosting.co.za> Message-ID: <1315241140.34.0.604704962715.issue12901@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +patch Added file: http://bugs.python.org/file23102/doc-nest-methods-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 05:33:20 2011 From: report at bugs.python.org (Derrick Petzold) Date: Tue, 06 Sep 2011 03:33:20 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config Message-ID: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> New submission from Derrick Petzold : Hello, format: format=%(asctime)s - %(name)s - %(levelname)s - %(message)s Should be: format: %(asctime)s - %(name)s - %(levelname)s - %(message)s Regards, btw I have to say the logging module is just excellent. What a truly great work. ty. ---------- assignee: docs at python components: Documentation messages: 143579 nosy: Derrick.Petzold, docs at python priority: normal severity: normal status: open title: Slight error in logging module's yaml config versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 05:43:52 2011 From: report at bugs.python.org (Derrick Petzold) Date: Tue, 06 Sep 2011 03:43:52 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config In-Reply-To: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> Message-ID: <1315280632.86.0.263900195367.issue12906@psf.upfronthosting.co.za> Derrick Petzold added the comment: Oh crap that doesn't work either. yaml.scanner.ScannerError: while scanning for the next token found character '%' that cannot start any token in "/var/sites/magnum/magnum/logging.yaml", line 4, column 13 Should be format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' Regards, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 08:39:28 2011 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Sep 2011 06:39:28 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config In-Reply-To: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> Message-ID: <1315291168.36.0.520106676854.issue12906@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 15:08:39 2011 From: report at bugs.python.org (Roundup Robot) Date: Tue, 06 Sep 2011 13:08:39 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config In-Reply-To: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 299ea19c3197 by Vinay Sajip in branch '2.7': Closes #12906: Fixed bug in YAML configuration. http://hg.python.org/cpython/rev/299ea19c3197 New changeset cf811943046b by Vinay Sajip in branch '3.2': Closes #12906: Fixed bug in YAML configuration. http://hg.python.org/cpython/rev/cf811943046b New changeset e9497423de7a by Vinay Sajip in branch 'default': Closes #12906: Merged fix from 3.2. http://hg.python.org/cpython/rev/e9497423de7a ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 16:20:24 2011 From: report at bugs.python.org (Derrick Petzold) Date: Tue, 06 Sep 2011 14:20:24 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config In-Reply-To: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> Message-ID: <1315318824.88.0.988010789841.issue12906@psf.upfronthosting.co.za> Derrick Petzold added the comment: I know this is without etiquette but I must say holy shit that was quick and I can only hope that I do can do the same some day. Not with logging but maybe with something else. I think maybe I am already working on it. Hopefully maybe. Its hard to tell at times :). Ha but this (logging) helped me a lot ty again. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 18:18:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Sep 2011 16:18:32 +0000 Subject: [docs] [issue12906] Slight error in logging module's yaml config In-Reply-To: <1315280000.72.0.273608973729.issue12906@psf.upfronthosting.co.za> Message-ID: <1315325911.93.0.82773670036.issue12906@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks to you for the report and fix! ---------- nosy: +eric.araujo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 18:39:40 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Sep 2011 16:39:40 +0000 Subject: [docs] [issue7798] Make generally useful pydoc functions public In-Reply-To: <1264692401.66.0.0955816094505.issue7798@psf.upfronthosting.co.za> Message-ID: <1315327180.19.0.566785398359.issue7798@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ve looked hard at pydoc and opened distinct bug reports so that each piece of maybe-useful functionality can be discussed independently: #12918 New module for terminal utilities #12917 Make visiblename and allmethods functions public #12916 Add inspect.splitdoc #12915 Add inspect.locate and inspect.resolve #12914 Add cram function to textwrap ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 6 20:37:58 2011 From: report at bugs.python.org (Popa Claudiu) Date: Tue, 06 Sep 2011 18:37:58 +0000 Subject: [docs] [issue12920] Inspect.getsource fails to get source of local classes Message-ID: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> New submission from Popa Claudiu : inspect.getsource called with a class defined in the same file fails with TypeError: is a built-in class, although the documentation says that: "The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string." I think that should be specified in documentation that this function works only for objects living in a module. ---------- assignee: docs at python components: Documentation messages: 143645 nosy: Popa.Claudiu, docs at python priority: normal severity: normal status: open title: Inspect.getsource fails to get source of local classes type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 7 16:57:28 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Sep 2011 14:57:28 +0000 Subject: [docs] [issue12779] Update packaging documentation In-Reply-To: <1313686169.0.0.406072932055.issue12779@psf.upfronthosting.co.za> Message-ID: <1315407447.99.0.204643448094.issue12779@psf.upfronthosting.co.za> Ezio Melotti added the comment: 1) sounds good; 2) would be fine too if it makes your life easier; 3) doesn't seem too useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 01:18:43 2011 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 08 Sep 2011 23:18:43 +0000 Subject: [docs] [issue12760] Add create mode to open() In-Reply-To: <1313502559.06.0.415498401391.issue12760@psf.upfronthosting.co.za> Message-ID: <1315523923.3.0.504645796656.issue12760@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 02:04:53 2011 From: report at bugs.python.org (Tim Chase) Date: Fri, 09 Sep 2011 00:04:53 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug Message-ID: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> New submission from Tim Chase : The Turtle example for the cmd module as documented at http://docs.python.org/py3k/library/cmd.html#cmd-example In the left() method, it calls turtle.right() instead of turtle.left(). Easy fix: /def left/+2s/left/right/ Likely exists in most 3.x documentation. ---------- assignee: docs at python components: Documentation messages: 143746 nosy: Gumnos, docs at python priority: normal severity: normal status: open title: Cmd example using turtle left vs. right doc-bug type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 02:05:45 2011 From: report at bugs.python.org (Tim Chase) Date: Fri, 09 Sep 2011 00:05:45 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315526745.26.0.206268170934.issue12940@psf.upfronthosting.co.za> Tim Chase added the comment: (duh, sorry, that's the "do_left" method, not the "left" method) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 02:42:04 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Sep 2011 00:42:04 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315528924.85.0.585309484825.issue12940@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, sandro.tosi stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 18:19:52 2011 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 09 Sep 2011 16:19:52 +0000 Subject: [docs] [issue12946] PyModule_GetDict() claims it can never fail, but it can Message-ID: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> New submission from Stefan Behnel : As is obvious from the code, PyModule_GetDict() can fail if being passed a non-module object, and when the (unlikely) dict creation at the end fails. The documentation of the C-API function should be fixed to reflect that, i.e. it should state that NULL is returned in the case of an error. PyObject * PyModule_GetDict(PyObject *m) { PyObject *d; if (!PyModule_Check(m)) { PyErr_BadInternalCall(); return NULL; } d = ((PyModuleObject *)m) -> md_dict; if (d == NULL) ((PyModuleObject *)m) -> md_dict = d = PyDict_New(); return d; } ---------- assignee: docs at python components: Documentation messages: 143764 nosy: docs at python, scoder priority: normal severity: normal status: open title: PyModule_GetDict() claims it can never fail, but it can type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 18:54:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Sep 2011 16:54:38 +0000 Subject: [docs] [issue12896] Recommended location of the interpreter for Python 3 In-Reply-To: <1315201831.61.0.39811771821.issue12896@psf.upfronthosting.co.za> Message-ID: <1315587278.28.0.0548018876908.issue12896@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: docs at python -> eric.araujo nosy: +eric.araujo versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:11:28 2011 From: report at bugs.python.org (Roundup Robot) Date: Fri, 09 Sep 2011 17:11:28 +0000 Subject: [docs] [issue12896] Recommended location of the interpreter for Python 3 In-Reply-To: <1315201831.61.0.39811771821.issue12896@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4c7566669be5 by ?ric Araujo in branch '3.2': Fix current name of the Python 3 binary on Unix (#12896). http://hg.python.org/cpython/rev/4c7566669be5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:13:13 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Sep 2011 17:13:13 +0000 Subject: [docs] [issue12896] Recommended location of the interpreter for Python 3 In-Reply-To: <1315201831.61.0.39811771821.issue12896@psf.upfronthosting.co.za> Message-ID: <1315588393.03.0.569447636332.issue12896@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:16:18 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Sep 2011 17:16:18 +0000 Subject: [docs] [issue12920] inspect.getsource fails to get source of local classes In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1315588578.58.0.205823567491.issue12920@psf.upfronthosting.co.za> ?ric Araujo added the comment: > inspect.getsource called with a class defined in the same file fails > with TypeError: is a built-in class The error message makes me think that getsource(__main__) was used, not getsource(SomeClass). Can you check again? ---------- nosy: +eric.araujo title: Inspect.getsource fails to get source of local classes -> inspect.getsource fails to get source of local classes versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:22:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Sep 2011 17:22:34 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags Message-ID: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> New submission from ?ric Araujo : The docs for the doctest module contains examples that use doctest flags to control behavior, but the HTML version does not contain the flags, making the examples useless. I don?t know if this is a bug with the HTML builder or something we can fix in markup. ---------- assignee: docs at python components: Documentation messages: 143775 nosy: docs at python, eric.araujo, georg.brandl priority: normal severity: normal status: open title: Examples in library/doctest.html lack the flags versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:25:41 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Sep 2011 17:25:41 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1315589141.72.0.709707055662.issue12947@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:30:08 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Sep 2011 17:30:08 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1315589408.55.0.49804298376.issue12947@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ezio prompted me to give precise examples, and I can?t find any in the docs online. Maybe it was only a local build with certain options that caused this problem, I?ll reopen if I find out. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 19:36:33 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 09 Sep 2011 17:36:33 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1315589793.29.0.1129115296.issue12947@psf.upfronthosting.co.za> Georg Brandl added the comment: Hehe... Sphinx makes a point of *removing* doctest flags, to enable doctesting of code snippets without distracting the reader with the test-internal flags. I think it's because you used a newer version locally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 20:26:29 2011 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 09 Sep 2011 18:26:29 +0000 Subject: [docs] [issue12949] Documentation of PyCode_New() lacks kwonlyargcount argument Message-ID: <1315592789.75.0.632556595518.issue12949@psf.upfronthosting.co.za> New submission from Stefan Behnel : In Py3, PyCode_New() takes a new argument "kwonlyargcount". The signature change is not currently in the Py3 C-API documentation. http://docs.python.org/dev/c-api/code.html PyCodeObject * PyCode_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *lnotab) ---------- assignee: docs at python components: Documentation messages: 143784 nosy: docs at python, scoder priority: normal severity: normal status: open title: Documentation of PyCode_New() lacks kwonlyargcount argument type: behavior versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 20:37:38 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Sep 2011 18:37:38 +0000 Subject: [docs] [issue12902] help("modules") executes module code In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za> Message-ID: <1315593458.11.0.180808743069.issue12902@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The immediate issue is improvement of the entries for help and help(): In builtin functions section: Expand "Invoke the built-in help system." to "Invoke the built-in help system, which uses *pydoc*." where *pydoc* is linked to the pydoc section. Add to the end of the entry something like "As needed, pydoc imports modules to get their doc strings." The special string 'modules' is not documented in the manual entry for help() itself. That is fine. It does appear in the longer text that appears for 'help()'. That text, where ever it is, could and should have a warning. "Warning: gathering the results for the topic 'modules' can take considerable time and have side effects as it imports *every* module available to get at its doc string." A separate issue would be a feature request to not do that (assuming it really does). Given that 'modules' just produces a list of (incomplete) module names, I do not see the point of importing until one requests help on a particular name. There seems to be a bug. In a fresh 3.2.2 IDLE window, help('modules') produces about 300 names. If I repeat, I get a reduced list of 58 names. These seem to just be the builtin C-coded modules, like 'math', with all Python-coded modules, like 'random', omitted. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 20:59:59 2011 From: report at bugs.python.org (Popa Claudiu) Date: Fri, 09 Sep 2011 18:59:59 +0000 Subject: [docs] [issue12920] inspect.getsource fails to get source of local classes In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1315594799.24.0.20064280094.issue12920@psf.upfronthosting.co.za> Popa Claudiu added the comment: Yes. On Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32, the result for the following lines: import inspect class A: pass inspect.getsource(A) is: Traceback (most recent call last): File "E:/Scripts/Snippets/test_inspect_bug.py", line 4, in inspect.getsource(A) File "C:\Python32\lib\inspect.py", line 694, in getsource lines, lnum = getsourcelines(object) File "C:\Python32\lib\inspect.py", line 683, in getsourcelines lines, lnum = findsource(object) File "C:\Python32\lib\inspect.py", line 522, in findsource file = getsourcefile(object) File "C:\Python32\lib\inspect.py", line 441, in getsourcefile filename = getfile(object) File "C:\Python32\lib\inspect.py", line 406, in getfile raise TypeError('{!r} is a built-in class'.format(object)) TypeError: is a built-in class >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 21:29:04 2011 From: report at bugs.python.org (=?utf-8?b?4KS24KSC4KSk4KSo4KWC?=) Date: Fri, 09 Sep 2011 19:29:04 +0000 Subject: [docs] [issue12951] List behavior is different Message-ID: <1315596544.14.0.783397700321.issue12951@psf.upfronthosting.co.za> New submission from ????? : URL: http://docs.python.org/library/stdtypes.html Following example is given. >>> lists = [[]] * 3 >>> lists [[], [], []] >>> lists[0].append(3) >>> lists [[3], [3], [3]] Behavior is as follows. >>> a = [[]] * 3 >>> a [[], [], []] >>> a[0] = 1 >>> a [1, [], []] >>> Python interpreter details: $ python Python 2.7.2 (default, Aug 22 2011, 13:53:27) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. ---------- assignee: docs at python components: Documentation messages: 143793 nosy: docs at python, ????? priority: normal severity: normal status: open title: List behavior is different type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 21:29:05 2011 From: report at bugs.python.org (Tim Chase) Date: Fri, 09 Sep 2011 19:29:05 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315596545.59.0.0429896469174.issue12940@psf.upfronthosting.co.za> Tim Chase added the comment: I see the status changed to needs-patch. what do I patch against? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 9 21:48:25 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Sep 2011 19:48:25 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315597705.34.0.130724013519.issue12940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.2. Any patch should trivially port to 3.3 and 2.7 ---------- nosy: +terry.reedy versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 01:26:49 2011 From: report at bugs.python.org (paul j3) Date: Fri, 09 Sep 2011 23:26:49 +0000 Subject: [docs] [issue12954] Multiprocessing logging under Windows Message-ID: <1315610809.5.0.0888786272542.issue12954@psf.upfronthosting.co.za> New submission from paul j3 : The Windows programming guidelines for the multiprocessing module documentation should include a warning that any logging initialization should be protected by the 'if __name__' block. Otherwise you will get duplicate logging entries for the child processes. This is because the multiprocessing.forking.prepare() function explicitly calls log_to_stderr(), and may implicitly do so again when it imports the parent module, resulting in duplicate logging handlers. ---------- assignee: docs at python components: Documentation messages: 143815 nosy: docs at python, paul.j3 priority: normal severity: normal status: open title: Multiprocessing logging under Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 01:48:56 2011 From: report at bugs.python.org (Tim Chase) Date: Fri, 09 Sep 2011 23:48:56 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315612136.73.0.924023219993.issue12940@psf.upfronthosting.co.za> Tim Chase added the comment: Patch attached. ---------- keywords: +patch versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file23123/issue12940.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 07:01:06 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Sep 2011 05:01:06 +0000 Subject: [docs] [issue12951] List behavior is different In-Reply-To: <1315596544.14.0.783397700321.issue12951@psf.upfronthosting.co.za> Message-ID: <1315630866.23.0.59831138628.issue12951@psf.upfronthosting.co.za> Ezio Melotti added the comment: I don't see where is the bug. If you do >>> lists = [[]] * 3 >>> lists [[], [], []] you are creating a list that contains 3 references to the same list, as you can see here: >>> lists[0] is lists[1] is lists[2] True >>> [id(l) for l in lists] [33714832, 33714832, 33714832] so if you append an element to either of the inner list, it will show up 3 times, because the 3 lists are really the same object: >>> lists[0].append(3) >>> lists [[3], [3], [3]] However, if you do >>> lists[0] = 1 >>> lists [1, [3], [3]] you are replacing the first element of 'lists' with the int 1. This doesn't mutate the inner list, and therefore the second and third elements are not affected. See also http://python.net/crew/mwh/hacks/objectthink.html ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 07:04:29 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Sep 2011 05:04:29 +0000 Subject: [docs] [issue12902] help("modules") executes module code In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za> Message-ID: <1315631069.45.0.649409923066.issue12902@psf.upfronthosting.co.za> Ezio Melotti added the comment: > "Warning: gathering the results for the topic 'modules' can take > considerable time and have side effects as it imports *every* module > available to get at its doc string." http://docs.python.org/documenting/style.html#affirmative-tone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 08:45:38 2011 From: report at bugs.python.org (Popa Claudiu) Date: Sat, 10 Sep 2011 06:45:38 +0000 Subject: [docs] [issue12920] inspect.getsource fails to get source of local classes In-Reply-To: <1315334278.72.0.69534403863.issue12920@psf.upfronthosting.co.za> Message-ID: <1315637138.51.0.831615515882.issue12920@psf.upfronthosting.co.za> Popa Claudiu added the comment: I forgot to mention that I executed this code directly in IDLE. It seems to work perfectly on command line though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 09:13:31 2011 From: report at bugs.python.org (Roundup Robot) Date: Sat, 10 Sep 2011 07:13:31 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 1ab62d3b96d2 by Ezio Melotti in branch '3.2': #12940: fix cmd example. Patch by Tim Chase. http://hg.python.org/cpython/rev/1ab62d3b96d2 New changeset b239b7d9f752 by Ezio Melotti in branch 'default': #12940: merge with 3.2. http://hg.python.org/cpython/rev/b239b7d9f752 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 09:15:38 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Sep 2011 07:15:38 +0000 Subject: [docs] [issue12940] Cmd example using turtle left vs. right doc-bug In-Reply-To: <1315526692.9.0.379869372006.issue12940@psf.upfronthosting.co.za> Message-ID: <1315638938.3.0.76825942814.issue12940@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! 2.7 doesn't have the example, so there's nothing to fix there. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 10:41:46 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 10 Sep 2011 08:41:46 +0000 Subject: [docs] [issue12951] List behavior is different In-Reply-To: <1315596544.14.0.783397700321.issue12951@psf.upfronthosting.co.za> Message-ID: <1315644106.76.0.629323275184.issue12951@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: See also http://docs.python.org/faq/programming.html#how-do-i-create-a-multidimensional-list ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 12:30:28 2011 From: report at bugs.python.org (Valery Khamenya) Date: Sat, 10 Sep 2011 10:30:28 +0000 Subject: [docs] [issue12955] urllib2.build_opener().open() is not friendly to "with ... as:" Message-ID: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> New submission from Valery Khamenya : The following intuitive construction with urllib2.build_opener().open() as: ... leads to AttributeError: addinfourl instance has no attribute '__exit__' http://docs.python.org/library/urllib2.html says almost nothing about concept of closing. Could it be possible to add a canonical "with ... as:" example for urllib2.build_opener() ? Thanks, Valery ---------- assignee: docs at python components: Documentation, IO, Library (Lib) messages: 143836 nosy: Valery.Khamenya, docs at python priority: normal severity: normal status: open title: urllib2.build_opener().open() is not friendly to "with ... as:" type: resource usage versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 12:52:53 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Sep 2011 10:52:53 +0000 Subject: [docs] [issue12955] urllib2.build_opener().open() is not friendly to "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1315651973.56.0.900134547086.issue12955@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 22:24:19 2011 From: report at bugs.python.org (Michael Schurter) Date: Sat, 10 Sep 2011 20:24:19 +0000 Subject: [docs] [issue12957] mmap.resize changes memory address of mmap'd region Message-ID: <1315686259.57.0.0304440203891.issue12957@psf.upfronthosting.co.za> New submission from Michael Schurter : Since mmap.resize uses MREMAP_MAYMOVE on Linux, it would be nice to warn users that pointers into their memory mapped regions will be invalid after resizes. Linux's manpage offers the following explanation: "If the mapping is relocated, then absolute pointers into the old mapping location become invalid (offsets relative to the starting address of the mapping should be employed)." Since the only way I know of to use pointers into mmaps from pure Python is to use ctypes..from_buffer(), perhaps clarification would be better in the ctypes docs. ---------- assignee: docs at python components: Documentation files: killctypes.py messages: 143845 nosy: docs at python, schmichael priority: normal severity: normal status: open title: mmap.resize changes memory address of mmap'd region type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file23126/killctypes.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 10 23:19:43 2011 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 10 Sep 2011 21:19:43 +0000 Subject: [docs] [issue12957] mmap.resize changes memory address of mmap'd region In-Reply-To: <1315686259.57.0.0304440203891.issue12957@psf.upfronthosting.co.za> Message-ID: <1315689583.76.0.638314967265.issue12957@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 11 03:39:50 2011 From: report at bugs.python.org (Meador Inge) Date: Sun, 11 Sep 2011 01:39:50 +0000 Subject: [docs] [issue12880] ctypes: clearly document how structure bit fields are allocated In-Reply-To: <1314930851.91.0.112444630543.issue12880@psf.upfronthosting.co.za> Message-ID: <1315705190.08.0.552679997097.issue12880@psf.upfronthosting.co.za> Meador Inge added the comment: Another example of desperately needed documentation: issue12945. ---------- components: +ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 11 06:33:50 2011 From: report at bugs.python.org (Meador Inge) Date: Sun, 11 Sep 2011 04:33:50 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1315715630.79.0.504455104366.issue12943@psf.upfronthosting.co.za> Meador Inge added the comment: Patch against tip. ---------- assignee: -> docs at python components: +Documentation keywords: +needs review, patch nosy: +docs at python stage: needs patch -> patch review Added file: http://bugs.python.org/file23127/issue12943.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 11 10:58:17 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Sep 2011 08:58:17 +0000 Subject: [docs] [issue7798] Make generally useful pydoc functions public In-Reply-To: <1264692401.66.0.0955816094505.issue7798@psf.upfronthosting.co.za> Message-ID: <1315731497.33.0.249911567169.issue7798@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Resist the urge to fatten APIs until you're sure that: * they are needed * they are well developed (many internal utils fail this test) * they are worth the extra time it takes to learn what is in a module (adding rarely needed tools has the side-effect of obscuring things people actually need) Georg's advice is spot on. There are a lot of little internal routines in the standard library that aren't sufficiently fit to be exposed (perhaps a little too ad-hoc or special purpose, perhaps the API isn't sufficiently general, perhaps the routines rely on non-guaranteed aspects of the implementation). For example, visiblename() is more heuristic than algorithmic -- right now, we can change that as needed (for instance, the recent updates to accommodate named tuples), but as soon as the method or function becomes public, its API freezes and it is hard for us to make changes. The pager functions are interesting and non-trivial. Before making them public in the standard library though, it would be best if it had some life as third-party module to let it mature (i.e. making sure it works as well in other contexts as it does in pydoc). Also consider whether other documentation tools have already encountered and addressed these use cases, perhaps in a different and better way. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 11 15:37:19 2011 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 11 Sep 2011 13:37:19 +0000 Subject: [docs] [issue12960] threading.Condition is not a class Message-ID: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> New submission from Nikolaus Rath : According to http://docs.python.org/library/threading.html#condition-objects, threading.Condition is a class. However, in fact it turns out to be function that constructs a _Condition instance. I don't know the reason for that, but it seems to me that either Condition should be a class, or the reason for it being a function should be documented so that people who I would like to inherit from Conditionknow if that is not supported, or if they can safely inherit from _Condition instead. ---------- assignee: docs at python components: Documentation messages: 143864 nosy: Nikratio, docs at python priority: normal severity: normal status: open title: threading.Condition is not a class type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 11 15:40:29 2011 From: report at bugs.python.org (Nikolaus Rath) Date: Sun, 11 Sep 2011 13:40:29 +0000 Subject: [docs] [issue12704] Language References does not specify exception raised by final yield() In-Reply-To: <1312654346.88.0.619161172388.issue12704@psf.upfronthosting.co.za> Message-ID: <1315748429.9.0.840037030175.issue12704@psf.upfronthosting.co.za> Changes by Nikolaus Rath : ---------- versions: +Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From Silke.Biermann at cpht.polytechnique.fr Sat Sep 3 17:04:26 2011 From: Silke.Biermann at cpht.polytechnique.fr (Silke Biermann) Date: Sat, 3 Sep 2011 17:04:26 +0200 (CEST) Subject: [docs] doc files? Message-ID: Dear administrator, I am trying to download the python docs at http://docs.python.org/py3k/download.html but I am getting an error (file cannot be read). Thanks! Silke From dr.stoney at gmail.com Wed Sep 7 01:50:38 2011 From: dr.stoney at gmail.com (Stoney Jackson) Date: Tue, 6 Sep 2011 19:50:38 -0400 Subject: [docs] Bug in example 8.4.2 Message-ID: <470DE76C-898D-4144-A827-61651A96CF97@gmail.com> Hi, In the example of 8.4.2 at http://docs.python.org/library/heapq.html the following line should be inside the if-statement: del task_finder[task] Consider the following scenario: >>> import itertools >>> from heapq import * >>> pq = [] # the priority queue list >>> counter = itertools.count(1) # unique sequence count >>> task_finder = {} # mapping of tasks to entries >>> INVALID = 0 # mark an entry as deleted >>> >>> def add_task(priority, task, count=None): ... if count is None: ... count = next(counter) ... entry = [priority, count, task] ... task_finder[task] = entry ... heappush(pq, entry) ... >>> def get_top_priority(): ... while True: ... priority, count, task = heappop(pq) ... del task_finder[task] ... if count is not INVALID: ... return task ... >>> def delete_task(task): ... entry = task_finder[task] ... entry[1] = INVALID ... >>> def reprioritize(priority, task): ... entry = task_finder[task] ... add_task(priority, task, entry[1]) ... entry[1] = INVALID ... >>> add_task(1, 'a') >>> add_task(2, 'b') >>> reprioritize(3, 'a') >>> pq [[1, 0, 'a'], [2, 2, 'b'], [3, 1, 'a']] >>> get_top_priority() 'b' >>> pq [[3, 1, 'a']] >>> reprioritize(4,'a') Traceback (most recent call last): File "", line 1, in File "", line 2, in reprioritize KeyError: 'a' >>> Regards, Stoney From mmcleod at pc-1.co.uk Thu Sep 8 12:17:34 2011 From: mmcleod at pc-1.co.uk (Michael McLeod) Date: Thu, 8 Sep 2011 11:17:34 +0100 Subject: [docs] doc bug Message-ID: Where: Programming FAQ : Is it possible to write obfuscated one-liners in Python? # Primes < 1000 print(list(filter(None,map(lambda y:y*reduce(lambda x,y:x*y!=0, map(lambda x,y=y:y%x,range(2,int(pow(y,0.5)+1))),1),range(2,1000))))) # Mandelbrot set print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y, Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM, Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro, i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or (x*x+y*y >=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr( 64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy ))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24)) Both use reduce but they now show: NameError: global name 'reduce' is not defined Fix: Now functools need to be imported. So now the above should be 2 liners or can you get the import in there? Regards, Michael McLeod Consultant - ProtoCall One T: +44 (0) 800 881 8130 M: +44 (0) 789 628 2612 F: +44 (0) 845 466 6005 E: mmcleod at pc-1.co.uk W: www.pc-1.co.uk Vote for G-Cloud, the UKs only Genesys-based Hosted Contact Centre Service, at the Call Centre Helper Top 10 Call Centre Products of the Year 2011 Winner of Genesys Best Innovation Partner - UK & Ireland Award The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside England and Wales). The views expressed in this email are not necessarily the views of ProtoCall One Limited, and the company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary. This message has been scanned for viruses by McAfee Security As A Service, but ProtoCall One cannot guarantee that this e-mail or its attachments are virus free nor accept responsibility for any virus inadvertently transmitted herewith. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1538 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 1274 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 5642 bytes Desc: image003.png URL: From m.stolle85 at gmail.com Thu Sep 8 20:44:21 2011 From: m.stolle85 at gmail.com (Martin Stolle) Date: Thu, 8 Sep 2011 20:44:21 +0200 Subject: [docs] Documenting Python - finding a task Message-ID: Hello, I want to help documenting Python. I already read the devguide and the documenting instructions (Still have to read the apple docs though). I also checked out the Python source and build the documentation. The problem I have is that I don't know which issue to pick. I would like to start with something easy in order to understand the whole process of submitting, reviewing etc. Thank you for your help and time. Kind regards Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfgrcar at comcast.net Sat Sep 10 05:46:54 2011 From: jfgrcar at comcast.net (Joseph Grcar) Date: Fri, 9 Sep 2011 20:46:54 -0700 Subject: [docs] unicode documentation Message-ID: Dear Python SF, How does one contribute python documentation? The web has many posted comments about how to use accented characters (unicode) and very little documentation of the here-is-what-you-do kind. I think it would be valuable to have a doc page to that effect. -- Joe Joseph Grcar 6059 Castlebrook Drive Castro Valley, CA 94552 USA email jfgrcar at comcast.net phone 1-510-581-1353 From chriscoen at bigpond.com Sun Sep 11 04:51:03 2011 From: chriscoen at bigpond.com (Chris Coen) Date: Sun, 11 Sep 2011 12:51:03 +1000 Subject: [docs] Tutorial difficulty Message-ID: <7CB17F1F34AD49F6B9F73FEBEE425787@SquirrelsPC> Dear Python Team. I am part way through the Python Tutorial v2.7.2 and have found one difficulty which I think is worth reporting as follows: Section = 7.1. Fancier Output Formatting Copy of tutorial original content (which does not work giving an error message with last line : "ValueError: zero length field name in format" ) : '!s' (apply str()) and '!r' (apply repr()) can be used to convert the value before it is formatted. >>> import math >>> print 'The value of PI is approximately {}.'.format(math.pi) The value of PI is approximately 3.14159265359. >>> print 'The value of PI is approximately {!r}.'.format(math.pi) The value of PI is approximately 3.141592653589793. I think the python code in both the {} should be modified as follows :>>> import math >>> print 'The value of PI is approximately {0!s}.'.format(math.pi) The value of PI is approximately 3.14159265359. >>> print 'The value of PI is approximately {0!r}.'.format(math.pi) The value of PI is approximately 3.141592653589793.Trust this both helps and is correct.I appreciate the efforts taken to offer the tutorial and often think how difficult it must be to keep the tutorial in step with the current version of Python.Best regards. Chris Coen -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Mon Sep 12 10:05:45 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 12 Sep 2011 10:05:45 +0200 Subject: [docs] doc files? In-Reply-To: References: Message-ID: Hello Silke, On Sat, Sep 3, 2011 at 17:04, Silke Biermann wrote: > Dear administrator, > > I am trying to download the python docs at > http://docs.python.org/py3k/download.html > but I am getting an error (file cannot be > read). Can you please tell us exactly what are the files that are failing for you? I tried them now and they all seem to work. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon Sep 12 18:57:50 2011 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Sep 2011 16:57:50 +0000 Subject: [docs] [issue12965] longobject: documentation improvements Message-ID: <1315846670.45.0.93309834122.issue12965@psf.upfronthosting.co.za> New submission from Stefan Krah : I think the integer objects documentation could be clearer on a couple of points: - Despite being listed under "Concrete Objects Layer", some functions implicitly accept anything with an __int__() method. Currently only the PyLong_AsLong() documentation states this explicitly. The patch clearly distinguishes between functions that duck type and functions that don't. - The patch replaces "is greater than *_MAX" instances with "out of bounds" to include the other error condition "is less than *_MIN". Additionally, the patch fixes comments in longobject.c that don't state the duck typing behavior. ---------- assignee: docs at python components: Documentation files: longobject-doc.diff keywords: patch messages: 143922 nosy: docs at python, mark.dickinson, skrah priority: normal severity: normal stage: patch review status: open title: longobject: documentation improvements type: feature request versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23133/longobject-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 18:58:18 2011 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Sep 2011 16:58:18 +0000 Subject: [docs] [issue12965] longobject: documentation improvements In-Reply-To: <1315846670.45.0.93309834122.issue12965@psf.upfronthosting.co.za> Message-ID: <1315846698.45.0.734688044484.issue12965@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- assignee: docs at python -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 21:35:40 2011 From: report at bugs.python.org (Jakob Malm) Date: Mon, 12 Sep 2011 19:35:40 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1274875647.87.0.219158529549.issue8822@psf.upfronthosting.co.za> Message-ID: <1315856140.23.0.825968229426.issue8822@psf.upfronthosting.co.za> Jakob Malm added the comment: I agree with Alexander -- I think the current documentation is sufficient to describe 'naive' and 'aware' date and time objects. The sentence "There are two kinds of date and time objects: ?naive? and ?aware?." is perhaps a bit unfortunate, however. It appears that Anatoly had misinterpreted 'naive' and 'aware' objects to be of different Python types: > 'naive' and 'aware' are key datetime types Perhaps the sentence could be changed to something like: "date and time objects are either 'naive' or 'aware'. ---------- nosy: +shaq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 22:30:51 2011 From: report at bugs.python.org (Jakob Malm) Date: Mon, 12 Sep 2011 20:30:51 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1274875647.87.0.219158529549.issue8822@psf.upfronthosting.co.za> Message-ID: <1315859451.71.0.36259273322.issue8822@psf.upfronthosting.co.za> Jakob Malm added the comment: I created a patch with the revised wording. ---------- keywords: +patch Added file: http://bugs.python.org/file23135/datetime_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 22:35:15 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Sep 2011 20:35:15 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1315859451.71.0.36259273322.issue8822@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Sep 12, 2011 at 4:30 PM, Jakob Malm wrote: .. > I created a patch with the revised wording. Your patch seems to reflow the entire paragraph which makes it hard to review and if applied will appear as a bigger change than it is. Can you regenerate the patch so that it does not have whitespace only diffs? Thanks. ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 22:36:00 2011 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 Sep 2011 20:36:00 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1274875647.87.0.219158529549.issue8822@psf.upfronthosting.co.za> Message-ID: <1315859760.15.0.48359823309.issue8822@psf.upfronthosting.co.za> anatoly techtonik added the comment: The point was: 1. Create an anchor to definition of "naive" object 2. Create an anchor to definition of "aware" object 3. Make definitions stand out from the inline text 4. Create cross-references for "naive" and "aware" keywords in text that lead directly to appropriate definition 5. Mention the fact: By default all objects are "naive", by definition, because they don't have any TZ information, and there are no classes in stdlib that provide this info (tzclass implemetations) 6. Answer the questions: How to make non-naive object? How to detect if object of naive or aware? That's it. If it's already done - then this ticket can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 22:50:38 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Sep 2011 20:50:38 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1315859760.15.0.48359823309.issue8822@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Sep 12, 2011 at 4:36 PM, anatoly techtonik wrote: .. > 5. Mention the fact: By default all objects are "naive", by definition, because they don't have any > TZ information, and there are no classes in stdlib that provide this info (tzclass implemetations) This is simply wrong: in py3k we have the timezone class that implements tzinfo interface. > 6. Answer the questions: How to make non-naive object? How to detect if object of naive or aware? I would go one step further: we should review the examples in datetime module documentation and use aware datetime objects unless the point of the example is to demonstrate a naive datetime. We should also replace examples that use sample implementations of tzinfo to use the timezone class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 12 23:40:03 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 Sep 2011 21:40:03 +0000 Subject: [docs] [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1315863603.72.0.265099713623.issue12946@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The path with PyDict_New() is never taken, because PyModule_New already fills md_dict. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Tue Sep 13 10:13:11 2011 From: eliben at gmail.com (Eli Bendersky) Date: Tue, 13 Sep 2011 11:13:11 +0300 Subject: [docs] Documenting Python - finding a task In-Reply-To: References: Message-ID: On Thu, Sep 8, 2011 at 21:44, Martin Stolle wrote: > Hello, > > I want to help documenting Python. I already read the devguide and the > documenting instructions (Still have to read the apple docs though). I also > checked out the Python source and build the documentation. The problem I > have is that I don't know which issue to pick. > > I would like to start with something easy in order to understand the whole > process of submitting, reviewing etc. > > Thank you for your help and time. > > Kind regards > Martin > Hi Martin, You can start by helping triage the issues reported to this mailing list ( docs at python.org). It gets a few reports a day on average, many of which aren't real problems. It would really help for another set of eyes to test the reports and verify whether they represent true problems or misunderstandings. If this is the former, you can open an issue on the bug tracker and submit a patch. If it's the latter, then you've already helped both the submitter (by providing an answer quicker than others) and other core devs (one less report to look at). Good luck, Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliben at gmail.com Tue Sep 13 10:16:59 2011 From: eliben at gmail.com (Eli Bendersky) Date: Tue, 13 Sep 2011 11:16:59 +0300 Subject: [docs] Tutorial difficulty In-Reply-To: <7CB17F1F34AD49F6B9F73FEBEE425787@SquirrelsPC> References: <7CB17F1F34AD49F6B9F73FEBEE425787@SquirrelsPC> Message-ID: On Sun, Sep 11, 2011 at 05:51, Chris Coen wrote: > ** > Dear Python Team. > I am part way through the Python Tutorial v2.7.2 and have found one > difficulty which I think is worth reporting as follows: > Section = 7.1. Fancier Output Formatting > Copy of tutorial original content (which does not work giving an error > message with last line : > "ValueError: zero length field name in format" ) : > > '!s' (apply str() ) and > '!r' (apply repr() ) > can be used to convert the value before it is formatted. > > >>> import math > >>> print 'The value of PI is approximately {}.'.format(math.pi) > The value of PI is approximately 3.14159265359. > >>> print 'The value of PI is approximately {!r}.'.format(math.pi) > The value of PI is approximately 3.141592653589793. > > I think the python code in both the {} should be modified as follows : > > >>> import math>>> print 'The value of PI is approximately {0!s}.'.format(math.pi)The value of PI is approximately 3.14159265359.>>> print 'The value of PI is approximately {0!r}.'.format(math.pi)The value of PI is approximately 3.141592653589793. > > > > Trust this both helps and is correct. > > > > I appreciate the efforts taken to offer the tutorial and often think how difficult it must be to keep the tutorial in step with the current version of Python. > > > > Best regards. Chris Coen > > Hi Chris, Which version of Python are you using to test this? Please note that Python 2.7 added (something 2.6 didn't have) the ability to omit positional argument specifiers in format strings. Read: http://docs.python.org/library/string.html#formatstrings for more details Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliben at gmail.com Tue Sep 13 10:16:59 2011 From: eliben at gmail.com (Eli Bendersky) Date: Tue, 13 Sep 2011 11:16:59 +0300 Subject: [docs] Tutorial difficulty In-Reply-To: <7CB17F1F34AD49F6B9F73FEBEE425787@SquirrelsPC> References: <7CB17F1F34AD49F6B9F73FEBEE425787@SquirrelsPC> Message-ID: On Sun, Sep 11, 2011 at 05:51, Chris Coen wrote: > ** > Dear Python Team. > I am part way through the Python Tutorial v2.7.2 and have found one > difficulty which I think is worth reporting as follows: > Section = 7.1. Fancier Output Formatting > Copy of tutorial original content (which does not work giving an error > message with last line : > "ValueError: zero length field name in format" ) : > > '!s' (apply str() ) and > '!r' (apply repr() ) > can be used to convert the value before it is formatted. > > >>> import math > >>> print 'The value of PI is approximately {}.'.format(math.pi) > The value of PI is approximately 3.14159265359. > >>> print 'The value of PI is approximately {!r}.'.format(math.pi) > The value of PI is approximately 3.141592653589793. > > I think the python code in both the {} should be modified as follows : > > >>> import math>>> print 'The value of PI is approximately {0!s}.'.format(math.pi)The value of PI is approximately 3.14159265359.>>> print 'The value of PI is approximately {0!r}.'.format(math.pi)The value of PI is approximately 3.141592653589793. > > > > Trust this both helps and is correct. > > > > I appreciate the efforts taken to offer the tutorial and often think how difficult it must be to keep the tutorial in step with the current version of Python. > > > > Best regards. Chris Coen > > Hi Chris, Which version of Python are you using to test this? Please note that Python 2.7 added (something 2.6 didn't have) the ability to omit positional argument specifiers in format strings. Read: http://docs.python.org/library/string.html#formatstrings for more details Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Sep 13 15:02:12 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 13 Sep 2011 13:02:12 +0000 Subject: [docs] [issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs Message-ID: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> New submission from ???? ????????? : Consider code: for (root, dirs, nondirs) in os.walk(path, followlinks=False): print (nondirs) This code will not print symlinks that refer to some dir. I think it is the bug. In other words: If followlinks is True, we should consider some symlinks as dirs. If not, any symlink is the non-dir. Patch included. Also, please fix documentation about this nuance. ---------- assignee: docs at python components: Documentation, Library (Lib) files: z.patch keywords: patch messages: 143965 nosy: docs at python, mmarkk priority: normal severity: normal status: open title: os.wlak() consider some symlinks as dirs instead of non-dirs type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file23140/z.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 13 15:06:17 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Sep 2011 13:06:17 +0000 Subject: [docs] [issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1315919177.29.0.583928349895.issue12970@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 13 15:16:05 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 13 Sep 2011 13:16:05 +0000 Subject: [docs] [issue12970] os.wlak() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1315919765.32.0.34777559758.issue12970@psf.upfronthosting.co.za> ???? ????????? added the comment: Also, there is some mis-optimisation for followlinks=False: stat() and then lstat() will be called. Instead of one lstat(). Code may be rewritten as (but I don't know about cross-platform issues): --------------------------------- if followlinks: mode = os.stat(path).st_mode else: mode = os.lstat(path).st_mode if stat.S_ISDIR(mode): dirs.append(path) else: nondir.append(path) --------------------------------- It will be much cleaner than current (or patched with my patch) implementation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 13 15:24:15 2011 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 13 Sep 2011 13:24:15 +0000 Subject: [docs] [issue12970] os.walk() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1315920255.46.0.326262725969.issue12970@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- title: os.wlak() consider some symlinks as dirs instead of non-dirs -> os.walk() consider some symlinks as dirs instead of non-dirs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 01:13:04 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Sep 2011 23:13:04 +0000 Subject: [docs] [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1315955583.92.0.241872666252.issue12946@psf.upfronthosting.co.za> STINNER Victor added the comment: So, can we close this issue? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 01:41:32 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Sep 2011 23:41:32 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1315957292.16.0.452443636016.issue12960@psf.upfronthosting.co.za> STINNER Victor added the comment: > According to http://docs.python.org/library/threading.html#condition-objects, threading.Condition is a class. Nope, it's a factory, and it's written in the doc: "threading.Condition() A factory function that returns a new condition variable object. A condition variable allows one or more threads to wait until they are notified by another thread. See Condition Objects." It has been changed in Python 3.3 (#10968): threading.Condition is now a class, instead of a factory. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 01:45:55 2011 From: report at bugs.python.org (Nikolaus Rath) Date: Tue, 13 Sep 2011 23:45:55 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315957292.16.0.452443636016.issue12960@psf.upfronthosting.co.za> Message-ID: <4E6FEB2B.5040506@rath.org> Nikolaus Rath added the comment: On 09/13/2011 07:41 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> According to http://docs.python.org/library/threading.html#condition-objects, threading.Condition is a class. > > Nope, it's a factory, and it's written in the doc: > > "threading.Condition() > A factory function that returns a new condition variable object. A condition variable allows one or more threads to wait until they are notified by another thread. > > See Condition Objects." Yes, but further down it still says: """ class threading.Condition([lock]) If the lock argument is given and not None, [....] """ Best, -Nikolaus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 06:06:14 2011 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 14 Sep 2011 04:06:14 +0000 Subject: [docs] [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1315973174.68.0.434416949034.issue12946@psf.upfronthosting.co.za> Stefan Behnel added the comment: I gave two reasons why this function can fail, and one turns out to be assumed-to-be-dead code. So, no, there are two issues now, one with the documentation, one with the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 08:08:33 2011 From: report at bugs.python.org (Alexey Smirnov) Date: Wed, 14 Sep 2011 06:08:33 +0000 Subject: [docs] [issue12970] os.walk() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1315980513.87.0.417843649493.issue12970@psf.upfronthosting.co.za> Changes by Alexey Smirnov : ---------- nosy: +alexey-smirnov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 10:29:15 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 14 Sep 2011 08:29:15 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <4E6FEB2B.5040506@rath.org> Message-ID: <4E7065DF.3000703@haypocalc.com> STINNER Victor added the comment: > Yes, but further down it still says: > > """ > class threading.Condition([lock]) > > If the lock argument is given and not None, [....] > """ What do you suggest? Replace it by class threading._Condition? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 11:36:04 2011 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 14 Sep 2011 09:36:04 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1315992964.75.0.219003098742.issue12960@psf.upfronthosting.co.za> Eli Bendersky added the comment: > What do you suggest? Replace it by class threading._Condition? -1 on this IMHO just documenting the situation as it is would make more sense ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 15:16:52 2011 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 14 Sep 2011 13:16:52 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <4E7065DF.3000703@haypocalc.com> Message-ID: <4E70A939.2000704@rath.org> Nikolaus Rath added the comment: On 09/14/2011 04:29 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> Yes, but further down it still says: >> >> """ >> class threading.Condition([lock]) >> >> If the lock argument is given and not None, [....] >> """ > > What do you suggest? Replace it by class threading._Condition? I don't have an optimal solution that would fit into the prescribed layout. I think the best we can do is keep calling it class threading Condition, but mention in the very first sentence that it isn't actually a class: class threading.Condition([lock]): threading.Condition is not actually a class but a factory function. The returned instance, however, is guaranteed to have the behaviour of a threading.Condition class as described here. If the lock argument... Best, -Nikolaus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 14 15:42:00 2011 From: report at bugs.python.org (Florian Ludwig) Date: Wed, 14 Sep 2011 13:42:00 +0000 Subject: [docs] [issue12977] socket.socket.setblocking does not raise exception if no data available Message-ID: <1316007719.98.0.0164178020562.issue12977@psf.upfronthosting.co.za> New submission from Florian Ludwig : The documentation states: > In non-blocking mode, if a recv() call doesn?t find any data, [...], a error exception is raised; [0] Which is wrong. If no data is available recv() does not raise an exception but returns an empty string. [0] http://docs.python.org/library/socket.html#socket.socket.setblocking ---------- assignee: docs at python components: Documentation messages: 144024 nosy: Florian.Ludwig, docs at python priority: normal severity: normal status: open title: socket.socket.setblocking does not raise exception if no data available versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 16:50:33 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Sep 2011 14:50:33 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1316098233.89.0.0946857616256.issue12960@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.6, Python 3.1, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 21:26:11 2011 From: report at bugs.python.org (Jakob Malm) Date: Thu, 15 Sep 2011 19:26:11 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1274875647.87.0.219158529549.issue8822@psf.upfronthosting.co.za> Message-ID: <1316114770.91.0.528982216522.issue8822@psf.upfronthosting.co.za> Jakob Malm added the comment: Patch without reflow attached. This is my first patch to CPython. I considered submitting the patch without reflowing the paragraph, to make the changes clearer, but I thought that that would mean more work for the committer, if the patch were to be accepted. Are non-reflown paragraphs like this generally preferred, then? Concerning timezone aware objects in the examples, this may make the examples more verbose and less to-the-point, which may not be desirable. I'm still on Python 2.6 and haven't actually used the new timezone class yet... ---------- Added file: http://bugs.python.org/file23167/datetime_doc_noreflow.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 21:42:28 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Sep 2011 19:42:28 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1316114770.91.0.528982216522.issue8822@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: -There are two kinds of date and time objects: "naive" and "aware". This +Date and time objects are either "naive" or "aware". This Shouldn't we say "datetime and time" instead of "date and time"? There is no tzinfo attribute in date objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 21:46:55 2011 From: report at bugs.python.org (Jakob Malm) Date: Thu, 15 Sep 2011 19:46:55 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: <1274875647.87.0.219158529549.issue8822@psf.upfronthosting.co.za> Message-ID: <1316116015.57.0.880595985618.issue8822@psf.upfronthosting.co.za> Jakob Malm added the comment: > Shouldn't we say "datetime and time" instead of "date and time"? > There is no tzinfo attribute in date objects. Perhaps like this? :class:`datetime` and :class:`time` objects are... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 22:17:57 2011 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 15 Sep 2011 20:17:57 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: Message-ID: anatoly techtonik added the comment: On Thu, Sep 15, 2011 at 10:42 PM, Alexander Belopolsky wrote: > > Shouldn't we say "datetime and time" instead of "date and time"? > There is no tzinfo attribute in date objects. Does that mean that if aware `datetime` is converted to `date` and then back, the tzinfo information is lost and object implicitly becomes naive? In this case it should mentioned IMO. -- anatoly t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 15 22:26:48 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Sep 2011 20:26:48 +0000 Subject: [docs] [issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Thu, Sep 15, 2011 at 4:17 PM, anatoly techtonik wrote: .. > Does that mean that if aware `datetime` is converted to `date` and > then back, the tzinfo information is lost and object implicitly > becomes naive? Yes, but one cannot convert "back" from date to datetime. To get a datetime object, one needs to combine date and time and tzinfo is attached to the time component. > In this case it should mentioned IMO. I agree. The following is not really intuitive: -> None In order to preserve tzinfo, one has to preserve it when extracting the time component: -> datetime.timezone.utc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 16 19:23:33 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Sep 2011 17:23:33 +0000 Subject: [docs] [issue12955] urllib2.build_opener().open() is not friendly to "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316193813.57.0.779404227637.issue12955@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I understand this, you are asking that 2.7 urllib2.build_opener().open(), which in 3.x is urllib.request.build_opener().open(), be upgraded to return an object that works as a context manager. Unless the docs say that this should already be the case, this is a feature request for 3.3. I am unable to test whether this feature is already present (in 3.2.2). Your example line "with urllib2.build_opener().open() as:" has an obvious syntax error. When I correct that and adjust for 3.x import urllib.request as ur with ur.build_opener().open() as f: pass # TypeError: open() takes at least 2 arguments (1 given) The doc for build_opener says it returns an OpenerDirector instance. help(ur.OpenerDirector.open) just says it needs a 'fullurl'. But when I add 'http:www.python.org' as an argument, I get urllib.error.URLError: I do not know what else is needed. Please copy and paste the ACTUAL (minimal) code you ran to get the AttributeError. ---------- components: -Documentation, IO nosy: +terry.reedy stage: -> test needed type: resource usage -> feature request versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 16 19:42:35 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 16 Sep 2011 17:42:35 +0000 Subject: [docs] [issue12955] urllib2.build_opener().open() is not friendly to "with ... as:" In-Reply-To: <1316193813.57.0.779404227637.issue12955@psf.upfronthosting.co.za> Message-ID: <20110916174225.GD1966@mathmagic> Senthil Kumaran added the comment: Just as a quick guideline. If you are talking about context manager support for urlopen, it is available and present in 3.x but not on 2.7. And I fear, it is late to make it available on 2.7, because it is a feature. In any case, as Terry requested, a simple snippet would help us understand the problem and original poster's expectation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 16 20:15:26 2011 From: report at bugs.python.org (Valery Khamenya) Date: Fri, 16 Sep 2011 18:15:26 +0000 Subject: [docs] [issue12955] urllib2.build_opener().open() is not friendly to "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316196926.85.0.549257838458.issue12955@psf.upfronthosting.co.za> Valery Khamenya added the comment: Terry, Senthil, thanks, for replying to this ticket. OK, to the question: 1. @Terry, here is the full example as for CPython 2.7 I am talking about and the output: ################# from urllib2 import Request, build_opener request = Request('http://example.com') with build_opener().open(request) as f: txt = f.read() print '%d characters fetched' % len(txt) #################### Traceback (most recent call last): File "", line 1, in AttributeError: addinfourl instance has no attribute '__exit__' 2. @Senthil, regarding the statement being a feature. I assume, that to open a connection, to read from a connection and to close it -- are the fundamental functions for what urllib2 was in particular created for. I was looking in docs for some hints of "canonical" way of doing this using urllib2.opener. After I have failed to find any guidance in docs, I've created this ticket. That is, I assume that no new feature is needed, but just a documented 5-lines example about a typical way of doing the above operations, especially *closing* the connection. regards, Valery ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 16 21:21:20 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Sep 2011 19:21:20 +0000 Subject: [docs] [issue12982] .pyo file cannot be imported In-Reply-To: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> Message-ID: <1316200880.46.0.122159103886.issue12982@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eric, you can initially give a doc patch as text in a message, though an actual diff in nicer and may get action sooner. I agree that something could be added. Perhaps the quote "It is possible...." should be followed with something like "However, one must use the python -O option to search for and import .pyo files, as well as for creating them. An alternative is to rename them to .pyc." Or make whatever suggestion you think is better. Also, please test with 3.2 if you possible can. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, terry.reedy type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 16 23:54:09 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Sep 2011 21:54:09 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316210049.75.0.839091032042.issue12955@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On 3.2.2, your example (adapted) produces >>> 2945 characters fetched So, as Senthil said, the requested feature already exists. But it cannot be added to the 2.7 series; the Python 2.7 *language* is feature frozen. 2.7.z bug fixes serve to make the implementation better match the intended language. Prior to the addition of with..., the standard way to close things was with explicit .close() or implicit closing when the function returned or the program exited. In the 3.2 docs, "20.5.21. Examples", there are several examples with f = (closing ignored) Where possible, these could and should be changed in 3.2+ docs to with as f: to promote the new idiom. This had been done in other chapters. Perhaps there is also a need for 'X supports the context manager protocol' to be added here or there. But showing that in the examples would make the point. I have changed the title of this issue to match. ---------- components: +Documentation -Library (Lib) stage: test needed -> needs patch title: urllib2.build_opener().open() is not friendly to "with ... as:" -> urllib.request example should use "with ... as:" versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 02:15:50 2011 From: report at bugs.python.org (Valery Khamenya) Date: Sat, 17 Sep 2011 00:15:50 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316218550.52.0.34438870541.issue12955@psf.upfronthosting.co.za> Valery Khamenya added the comment: Guys, in my item 2 the simplistic goal was stated clearly: open, read and close. Do you confirm that this basic sequence is not supported by urllib2 under 2.7 ? (I just requested for a tiny documentation update entry) regards, Valery ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 02:49:41 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 17 Sep 2011 00:49:41 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316220581.05.0.615040089152.issue12955@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Valery, yes. I shall update 2.7 documentation with this known limitation and 3.x documentation with the example usage scenarios. Thanks! ---------- assignee: docs at python -> orsenthil _______________________________________ Python tracker _______________________________________ From agforsyth at gmail.com Mon Sep 12 22:47:18 2011 From: agforsyth at gmail.com (Adam Forsyth) Date: Mon, 12 Sep 2011 16:47:18 -0400 Subject: [docs] Bug in equivalent code for itertools.izip_longest Message-ID: See http://stackoverflow.com/questions/7392902/izip-longest-in-itertools-how-does-rasing-indexerror-inside-the-iterator-work If an IndexError is raised inside an iterator in the "equivalent" code from the docs, the generator stops and the error is swallowed. If an IndexError is raised inside an iterator in the "izip_longest_next" code in CPython's "Modules/itertoolsmodule.c", the generator stops and the error propagates. From edreich at lab126.com Thu Sep 15 16:30:34 2011 From: edreich at lab126.com (Reich, Edwin) Date: Thu, 15 Sep 2011 07:30:34 -0700 Subject: [docs] Comparison error? Message-ID: <34F8DF8CB32F2945AAEAAA672CE5A28B594FC036B9@EX-SEA31-C.ant.amazon.com> While reading through the "New-style and classic classes" section of the documentation http://docs.python.org/reference/datamodel.html#newstyle I found what I believe to be an error. The statement regarding rich comparison methods reads: There are no swapped-argument versions of these methods (to be used when the left argument does not support the operation but the right argument does); rather, __lt__() and __gt__() are each other?s reflection, __le__() and __ge__() are each other?s reflection, and __eq__() and __ne__() are their own reflection. The error is that __lt__() and __ge__() should be the reflection of each other and __le__() and __gt__() should be the reflection of each other. Hopefully, this is an error only in the documentation and not the language. I haven't tested the language to verify that it doesn't work as documented. Thanks, Edwin From educastellano08 at gmail.com Thu Sep 15 15:42:45 2011 From: educastellano08 at gmail.com (Edu Castellano) Date: Thu, 15 Sep 2011 15:42:45 +0200 Subject: [docs] socket docs inconsistency (python 2.7.1 over linux) Message-ID: Hi, In the documentation of sockets: (http://docs.python.org/release/2.7.1/library/socket.html) *socket.setblocking(flag)* *Set blocking or non-blocking mode of the socket: if flag is 0, the socket is set to non-blocking, else to blocking mode. Initially all sockets are in blocking mode. In non-blocking mode, if a recv() call doesn?t find any data, or if a send() call can?t immediately dispose of the data, a error exception is raised; in blocking mode, the calls block until they can proceed. s.setblocking(0) is equivalent to s.settimeout(0.0); s.setblocking(1) is equivalent to s.settimeout(None).* * * *socket.settimeout(value)* *Set a timeout on blocking socket operations. The value argument can be a nonnegative float expressing seconds, or None. If a float is given, subsequent socket operations will raise a timeout exception if the timeout period value has elapsed before the operation has completed. Setting a timeout of None disables timeouts on socket operations. s.settimeout(0.0) is equivalent to s.setblocking(0); s.settimeout(None) is equivalent to s.setblocking(1).* When I'm trying this, I get an "error exception" in both functions. Should it be "timeout exception" for settimeout(). I suggest also to raise another type of exception in setblocking(), "empty buffer"? or something like that. Regards, Edu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaston.fiore at gmail.com Fri Sep 16 23:57:56 2011 From: gaston.fiore at gmail.com (Gaston Fiore) Date: Fri, 16 Sep 2011 17:57:56 -0400 Subject: [docs] Typo in datetime documentation Message-ID: In http://docs.python.org/py3k/library/datetime.html#module-datetime paragraph 3, line 4, it reads: The timezone class can reprsent simple timezones... "reprsent" should instead read "represent" -Gaston From mikmeyer at cisco.com Thu Sep 15 18:03:33 2011 From: mikmeyer at cisco.com (Mike Meyer) Date: Thu, 15 Sep 2011 09:03:33 -0700 Subject: [docs] Minor tweak to compile() documentation... Message-ID: <009701cc73c1$04de9480$0e9bbd80$@com> It might be worth pointing out that the builtin "compile" function will fail with a syntax error if you feed it text with DOS line endings. This is almost certainly a very rare problem, but when it does bite you, it's a pita to figure out. You can run the file just fine. You can import it and invoke callable's from it just fine. But if you try and read()/compile() it, it won't work unless you open'ed it in text mode - even on Unix. And the error location is liable to just add to the confusion. Improving the error message might be a better solution (I only checked on 3.1), but I suspect this is rare enough that a note in the documentation will suffice. Gentlepeople, There's a memory leak in the sample code for the Noddy extension module in the "Extending and Embedding" manual for 2.7.2. Consider for example section 2.1.2, page 36 in the US page size PDF file, function Noddy_name(). There are two places where Py_DECREF(format) is needed, and both are missing. One is in the error handler for the creation of the "args" object. The other is after the call to PyString_Format(format,args). The error is repeated a couple of times in the assorted variants of the Noddy module example. paul From report at bugs.python.org Sat Sep 17 17:31:04 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Sep 2011 15:31:04 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1316273464.83.0.578857951709.issue12955@psf.upfronthosting.co.za> ?ric Araujo added the comment: [Terry] > But when I add 'http:www.python.org' as an argument, I get > urllib.error.URLError: Your URI lacks a host (netloc, in RFC parlance) component: >>> urllib.parse.urlparse('http:python.org') ParseResult(scheme='http', netloc='', path='python.org', params='', query='', fragment='') ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 17:45:10 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Sep 2011 15:45:10 +0000 Subject: [docs] [issue12982] .pyo file can't be imported unless -O is given In-Reply-To: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> Message-ID: <1316274310.81.0.274178050153.issue12982@psf.upfronthosting.co.za> ?ric Araujo added the comment: I would not suggest to rename a .pyo to .pyc, they have different promises (if I can even say that, as they?re implementation details). ---------- nosy: +eric.araujo stage: -> needs patch title: .pyo file cannot be imported -> .pyo file can't be imported unless -O is given versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 19:41:25 2011 From: report at bugs.python.org (Meador Inge) Date: Sat, 17 Sep 2011 17:41:25 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316281285.5.0.926150319835.issue12943@psf.upfronthosting.co.za> Meador Inge added the comment: v2 patch which addresses comments made by merwok via rietveld. ---------- Added file: http://bugs.python.org/file23184/issue12943-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 19:45:55 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 Sep 2011 17:45:55 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316281555.29.0.0647160677841.issue12943@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. Did you get commit rights already? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 19:47:15 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 Sep 2011 17:47:15 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1316281635.56.0.127741775957.issue12960@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is important enough. It's now a class anyway in 3.3+. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 20:00:20 2011 From: report at bugs.python.org (Meador Inge) Date: Sat, 17 Sep 2011 18:00:20 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316282420.69.0.622638621994.issue12943@psf.upfronthosting.co.za> Meador Inge added the comment: > Did you get commit rights already? I have not. I still need to submit a contributor agreement as well. I plan to fax that today. ---------- _______________________________________ Python tracker _______________________________________ From georg at python.org Sat Sep 17 20:18:55 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:18:55 +0200 Subject: [docs] Memory leak in sample "Noddy" extension module code In-Reply-To: <5D28C5B4-BA13-4354-BA8F-F7FC1DB5FF9B@comcast.net> References: <5D28C5B4-BA13-4354-BA8F-F7FC1DB5FF9B@comcast.net> Message-ID: <4E74E48F.6050900@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 12.09.2011 16:51, schrieb Paul Koning: > Gentlepeople, > > There's a memory leak in the sample code for the Noddy extension module in > the "Extending and Embedding" manual for 2.7.2. Consider for example > section 2.1.2, page 36 in the US page size PDF file, function > Noddy_name(). > > There are two places where Py_DECREF(format) is needed, and both are > missing. One is in the error handler for the creation of the "args" object. > The other is after the call to PyString_Format(format,args). > > The error is repeated a couple of times in the assorted variants of the > Noddy module example. Hey Paul, I think the examples are correct: "format" is declared static and only initialized once per process. Therefore it shouldn't be decref'd. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk505I8ACgkQN9GcIYhpnLAhswCdExyau/UBMlOrfPFf0Vzq/DXz RrgAoJdg5npkJp2WwNzJH/CV/bzARUSJ =c0Jk -----END PGP SIGNATURE----- From georg at python.org Sat Sep 17 20:20:18 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:20:18 +0200 Subject: [docs] Typo in datetime documentation In-Reply-To: References: Message-ID: <4E74E4E2.4080703@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 16.09.2011 23:57, schrieb Gaston Fiore: > In > > http://docs.python.org/py3k/library/datetime.html#module-datetime > > paragraph 3, line 4, it reads: > > The timezone class can reprsent simple timezones... > > "reprsent" should instead read "represent" Thanks, this is now fixed. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk505OIACgkQN9GcIYhpnLBoqQCff2rYzNGcdMPa6I2FEtFCz2h3 l5YAnR34UdzRmmPvo0+pJNWEgxV/peV8 =aAWd -----END PGP SIGNATURE----- From georg at python.org Sat Sep 17 20:23:30 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:23:30 +0200 Subject: [docs] Comparison error? In-Reply-To: <34F8DF8CB32F2945AAEAAA672CE5A28B594FC036B9@EX-SEA31-C.ant.amazon.com> References: <34F8DF8CB32F2945AAEAAA672CE5A28B594FC036B9@EX-SEA31-C.ant.amazon.com> Message-ID: <4E74E5A2.4030904@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.09.2011 16:30, schrieb Reich, Edwin: > While reading through the "New-style and classic classes" section of the > documentation http://docs.python.org/reference/datamodel.html#newstyle I > found what I believe to be an error. > > The statement regarding rich comparison methods reads: There are no > swapped-argument versions of these methods (to be used when the left > argument does not support the operation but the right argument does); > rather, __lt__() and __gt__() are each other?s reflection, __le__() and > __ge__() are each other?s reflection, and __eq__() and __ne__() are their > own reflection. > > > The error is that __lt__() and __ge__() should be the reflection of each > other and __le__() and __gt__() should be the reflection of each other. > Hopefully, this is an error only in the documentation and not the > language. I haven't tested the language to verify that it doesn't work as > documented. Hi Edwin, I think both docs and code are correct: when you do A() < B() where the B class has rich comparison methods defined, and A hasn't, then this is equivalent to asking if B() > A() and not B() >= A() Note that "reflection" in this case means the order of operands. There is no negation inveolved. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk505aEACgkQN9GcIYhpnLDyhQCfa2ie295zZ7eMnqx2HWJHGPGm DxkAoK5w9yFmiyEjWz1ktq6+3128pbxN =qGCw -----END PGP SIGNATURE----- From georg at python.org Sat Sep 17 20:24:56 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:24:56 +0200 Subject: [docs] socket docs inconsistency (python 2.7.1 over linux) In-Reply-To: References: Message-ID: <4E74E5F8.30900@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.09.2011 15:42, schrieb Edu Castellano: > Hi, > > In the documentation of sockets: > (http://docs.python.org/release/2.7.1/library/socket.html) > > /socket.setblocking(flag)/ /Set blocking or non-blocking mode of the > socket: if flag is 0, the socket is set to non-blocking, else to blocking > mode. Initially all sockets are in blocking mode. In non-blocking mode, if > a recv() call doesn?t find any data, or if a send() call can?t immediately > dispose of the data, *a error exception is raised*; in blocking mode, the > calls block until they can proceed. s.setblocking(0) is equivalent to > s.settimeout(0.0); s.setblocking(1) is equivalent to s.settimeout(None)./ > / / /socket.settimeout(value)/ /Set a timeout on blocking socket > operations. The value argument can be a nonnegative float expressing > seconds, or None. If a float is given, subsequent socket operations *will > raise a timeout exception* if the timeout period value has elapsed before > the operation has completed. Setting a timeout of None disables timeouts on > socket operations. s.settimeout(0.0) is equivalent to s.setblocking(0); > s.settimeout(None) is equivalent to s.setblocking(1)./ > > When I'm trying this, I get an "error exception" in both functions. Should > it be "timeout exception" for settimeout(). I suggest also to raise another > type of exception in setblocking(), "empty buffer"? or something like > that. Hi Edu, could you show us exactly what code you tried and is raising the wrong exception? Thanks, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk505fgACgkQN9GcIYhpnLCsogCfeTMDP79MJOyCp2tbUb7QHj1t IwIAnifty7q6tgvnA3VE658nCl2dslTk =4OSA -----END PGP SIGNATURE----- From report at bugs.python.org Sat Sep 17 20:24:21 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 17 Sep 2011 18:24:21 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1316283860.98.0.904188638948.issue12960@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend just closing this. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 17 20:27:49 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 Sep 2011 18:27:49 +0000 Subject: [docs] [issue12977] socket.socket.setblocking does not raise exception if no data available In-Reply-To: <1316007719.98.0.0164178020562.issue12977@psf.upfronthosting.co.za> Message-ID: <1316284069.3.0.946588159446.issue12977@psf.upfronthosting.co.za> Georg Brandl added the comment: I think you're mistaking a closed connection with "no data available". Small demo that this works as intended: >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.connect(('localhost', 1234)) >>> s.recv(10) ^CTraceback (most recent call last): File "", line 1, in KeyboardInterrupt >>> s.setblocking(False) >>> s.recv(10) Traceback (most recent call last): File "", line 1, in socket.error: [Errno 11] Resource temporarily unavailable The corresponding server: >>> x = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> x.bind(('', 1234)) >>> x.listen(1) >>> x.accept() (, ('127.0.0.1', 39146)) ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sat Sep 17 20:36:45 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:36:45 +0200 Subject: [docs] random.gammavariate doc incomplete In-Reply-To: References: Message-ID: <4E74E8BD.9010906@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 31.08.2011 22:35, schrieb Catherine Beauchemin: > > Dear maintainers, > > The random.gammavariate online documentation at: > > http://docs.python.org/library/random.html#random.gammavariate > > is incomplete. At this page it currently states: > > Gamma distribution. (Not the gamma function!) Conditions on the parameters > are alpha > 0 and beta > 0. > > whereas the docstring for version 2.7 of random.gammavariate states: > > Gamma distribution. Not the gamma function! > > Conditions on the parameters are alpha > 0 and beta > 0. > > The probability distribution function is: > > x ** (alpha - 1) * math.exp(-x / beta) pdf(x) = > -------------------------------------- math.gamma(alpha) * beta ** alpha > > > The definition of the pdf in the docstring is a must because otherwise it > is not possible to understand what the parameters alpha and beta of the > random.gammavariate function stand for (there are several definitions of > the gamma distribution in common use). Generally, I would think it would be > best to explicitly write down the pdf(x) for all random variate functions > to make it clear what the distribution parameters stand for. > > So the online documentation should be updated to match the docstring for > random.gammavariate. Thanks, this is now fixed. Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk506L0ACgkQN9GcIYhpnLAXkACfZ8qdlfZ9sLnVDmV8MF1v3wMa NWQAoJaDIOK7LIhJCEiixT9EjHEIGB+U =lpEP -----END PGP SIGNATURE----- From georg at python.org Sat Sep 17 20:39:49 2011 From: georg at python.org (Georg Brandl) Date: Sat, 17 Sep 2011 20:39:49 +0200 Subject: [docs] Minor tweak to compile() documentation... In-Reply-To: <009701cc73c1$04de9480$0e9bbd80$@com> References: <009701cc73c1$04de9480$0e9bbd80$@com> Message-ID: <4E74E975.9000609@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 15.09.2011 18:03, schrieb Mike Meyer: > It might be worth pointing out that the builtin "compile" function will > fail with a syntax error if you feed it text with DOS line endings. > > This is almost certainly a very rare problem, but when it does bite you, > it's a pita to figure out. You can run the file just fine. You can import > it and invoke callable's from it just fine. But if you try and > read()/compile() it, it won't work unless you open'ed it in text mode - > even on Unix. And the error location is liable to just add to the > confusion. > > Improving the error message might be a better solution (I only checked on > 3.1), but I suspect this is rare enough that a note in the documentation > will suffice. Hi Mike, this is indeed fixed on 2.7 and 3.2. We don't touch 3.1 documentation anymore, so the solution is to simply upgrade :) cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk506XUACgkQN9GcIYhpnLAfeACdFTiWPURxDMeeNQwt06BB5es1 KAEAmgO4Jo5Kg1oKhCoCjq2M2XgPz2YL =YmKK -----END PGP SIGNATURE----- From report at bugs.python.org Sun Sep 18 06:55:23 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 18 Sep 2011 04:55:23 +0000 Subject: [docs] [issue13003] Bug in equivalent code for itertools.izip_longest Message-ID: <1316321723.69.0.619993124857.issue13003@psf.upfronthosting.co.za> New submission from Eli Bendersky : Regarding the sample code in: http://docs.python.org/library/itertools#itertools.izip_longest If an IndexError is raised inside an iterator in the "equivalent" code from the docs, the generator stops and the error is swallowed. If an IndexError is raised inside an iterator in the "izip_longest_next" code in CPython's "Modules/itertoolsmodule.c", the generator stops and the error propagates. --- Reported by Adam Forsyth on the docs mailing list. More details in this SO discussion: http://stackoverflow.com/questions/7392902/izip-longest-in-itertools-how-does-rasing-indexerror-inside-the-iterator-work ---------- assignee: docs at python components: Documentation messages: 144228 nosy: docs at python, eli.bendersky priority: normal severity: normal status: open title: Bug in equivalent code for itertools.izip_longest versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Sun Sep 18 06:56:31 2011 From: eliben at gmail.com (Eli Bendersky) Date: Sun, 18 Sep 2011 07:56:31 +0300 Subject: [docs] Bug in equivalent code for itertools.izip_longest In-Reply-To: References: Message-ID: Hi Adam, Thanks for the report. I have opened issue 13003 ( http://bugs.python.org/issue13003) to track this. Eli On Mon, Sep 12, 2011 at 23:47, Adam Forsyth wrote: > See > http://stackoverflow.com/questions/7392902/izip-longest-in-itertools-how-does-rasing-indexerror-inside-the-iterator-work > > If an IndexError is raised inside an iterator in the "equivalent" code > from the docs, the generator stops and the error is swallowed. > > If an IndexError is raised inside an iterator in the > "izip_longest_next" code in CPython's "Modules/itertoolsmodule.c", the > generator stops and the error propagates. > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Sep 18 07:36:07 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Sep 2011 05:36:07 +0000 Subject: [docs] [issue13003] Bug in equivalent code for itertools.izip_longest In-Reply-To: <1316321723.69.0.619993124857.issue13003@psf.upfronthosting.co.za> Message-ID: <1316324167.14.0.443555040142.issue13003@psf.upfronthosting.co.za> Georg Brandl added the comment: I had forwarded this to Raymond, and he replied: The itertools module code is correct. The "equivalent" is only approximately correct I don't consider it to be a bug -- it is an implementation detail in an illustration. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From georg at python.org Sun Sep 18 07:41:14 2011 From: georg at python.org (Georg Brandl) Date: Sun, 18 Sep 2011 07:41:14 +0200 Subject: [docs] Bug in example 8.4.2 In-Reply-To: <470DE76C-898D-4144-A827-61651A96CF97@gmail.com> References: <470DE76C-898D-4144-A827-61651A96CF97@gmail.com> Message-ID: <4E75847A.7060802@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 07.09.2011 01:50, schrieb Stoney Jackson: > Hi, > > In the example of 8.4.2 at http://docs.python.org/library/heapq.html the > following line should be inside the if-statement: > > del task_finder[task] Hi Stoney, you are correct; this is now fixed and will be live soon. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk51hHoACgkQN9GcIYhpnLDA2QCdHpChMwvheOPMLjOhU9MZHsP7 BwcAn12s3wsDPIm4+xHViaR2KH8o1G1h =PVIQ -----END PGP SIGNATURE----- From report at bugs.python.org Sun Sep 18 07:50:07 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 18 Sep 2011 05:50:07 +0000 Subject: [docs] [issue13003] Bug in equivalent code for itertools.izip_longest In-Reply-To: <1316321723.69.0.619993124857.issue13003@psf.upfronthosting.co.za> Message-ID: <1316325007.82.0.00495382194177.issue13003@psf.upfronthosting.co.za> Eli Bendersky added the comment: What about at least documenting it? Since a real user ran into this and reported it as a problem, I think it would make sense to make the discrepancy explicit. Alternatively a generalized note can be added to the documentation of itertools stating that the "equivalent" code samples are only approximate and differ in small details from the real implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 18 07:53:08 2011 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Sep 2011 05:53:08 +0000 Subject: [docs] [issue13003] Bug in equivalent code for itertools.izip_longest In-Reply-To: <1316321723.69.0.619993124857.issue13003@psf.upfronthosting.co.za> Message-ID: <1316325188.29.0.996824436822.issue13003@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, this is for Raymond to decide. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 18 11:38:32 2011 From: report at bugs.python.org (STINNER Victor) Date: Sun, 18 Sep 2011 09:38:32 +0000 Subject: [docs] [issue12960] threading.Condition is not a class In-Reply-To: <1315748239.01.0.928739848932.issue12960@psf.upfronthosting.co.za> Message-ID: <1316338712.23.0.766890906917.issue12960@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 18 21:24:55 2011 From: report at bugs.python.org (Luciano Ramalho) Date: Sun, 18 Sep 2011 19:24:55 +0000 Subject: [docs] [issue13005] operator module docs include repeat Message-ID: <1316373895.0.0.0510419466495.issue13005@psf.upfronthosting.co.za> New submission from Luciano Ramalho : The operator module documentation for versions 3.2 and 3.3 includes the repeat function in a table "9.3.1. Mapping Operators to Functions" [1], but fails to mention that the repeat function is deprecated and mul should be used instead, as described in the 2.7 version of the operator module docs [2]. The main entry for the repeat function was removed in the 3.2 and 3.3 docs, only the mention in the table remains [1]. [1] http://docs.python.org/py3k/library/operator#mapping-operators-to-functions [2] http://docs.python.org/library/operator#operator.__repeat__ ---------- assignee: docs at python components: Documentation messages: 144251 nosy: docs at python, luciano priority: normal severity: normal status: open title: operator module docs include repeat versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 18 21:26:12 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 18 Sep 2011 19:26:12 +0000 Subject: [docs] [issue13005] operator module docs include repeat In-Reply-To: <1316373895.0.0.0510419466495.issue13005@psf.upfronthosting.co.za> Message-ID: <1316373972.15.0.870393421159.issue13005@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, sandro.tosi stage: -> needs patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Sep 18 23:49:21 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 18 Sep 2011 23:49:21 +0200 Subject: [docs] unicode documentation In-Reply-To: References: Message-ID: Hello Joseph, On Sat, Sep 10, 2011 at 05:46, Joseph Grcar wrote: > Dear Python SF, > > How does one contribute python documentation? Thanks for your interest in Python documentation. The proper way is to create a patch against the latest python source checkout and report an issue to the Python bugtracker. It's a task that requires a bit of knowledge, that you should probably acquire reading docs.python.org/devguide/ - and if you have any question, just ask here! > The web has many posted comments about how to use accented characters > (unicode) and very little documentation of the here-is-what-you-do kind. ?I > think it would be valuable to have a doc page to that effect. There's a lot of discussions going about unicode and Python, so your contribution will probably catch up the momentum just fine. Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Sun Sep 18 23:59:06 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 18 Sep 2011 23:59:06 +0200 Subject: [docs] doc bug In-Reply-To: References: Message-ID: Hello Michael On Thu, Sep 8, 2011 at 12:17, Michael McLeod wrote: > Where: Programming FAQ: Is it possible to write obfuscated one-liners in > Python? ... > > > Both use reduce but they now show: > NameError: global name 'reduce' is not defined > > Fix: > > Now ?functools ?need to be imported. > > So now the above should be 2 liners or can you get the import in there? Could you please tell me where did you find the page your referring to? I have checked the documentation on docs.python.org and there's this line from functools import reduce right at the beginning of the example. Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon Sep 19 15:31:07 2011 From: report at bugs.python.org (Meador Inge) Date: Mon, 19 Sep 2011 13:31:07 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316439067.19.0.883356678293.issue12943@psf.upfronthosting.co.za> Meador Inge added the comment: Updated patch fixing some issues pointed out by Ezio on Rietveld. ---------- Added file: http://bugs.python.org/file23193/issue12943-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 16:04:31 2011 From: report at bugs.python.org (Marc Sibson) Date: Mon, 19 Sep 2011 14:04:31 +0000 Subject: [docs] [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1316441071.82.0.220833384701.issue11176@psf.upfronthosting.co.za> Changes by Marc Sibson : ---------- nosy: +marcs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 18:38:18 2011 From: report at bugs.python.org (Steven Samuel Cole) Date: Mon, 19 Sep 2011 16:38:18 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X Message-ID: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> New submission from Steven Samuel Cole : it says in the last paragraph of the chapter at http://docs.python.org/devguide/setup.html#unix: [...] ./python.exe on OS X [...] .exe seems to indicate that should probably be './python.exe on Windows' ---------- assignee: docs at python components: Documentation messages: 144298 nosy: docs at python, ssc priority: normal severity: normal status: open title: devguide doc: ./python.exe on OS X _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 18:40:06 2011 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 19 Sep 2011 16:40:06 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316450406.79.0.996064803561.issue13010@psf.upfronthosting.co.za> Ezio Melotti added the comment: I believe it's ./python.exe on OS X. I'm not sure about Windows, maybe it's just python.exe there. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 18:44:22 2011 From: report at bugs.python.org (Steven Samuel Cole) Date: Mon, 19 Sep 2011 16:44:22 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316450662.78.0.663027085403.issue13010@psf.upfronthosting.co.za> Steven Samuel Cole added the comment: i've gone through the process of checking out and building python as described in the devguide; it seems the python executable is indeed called python.exe under mac osx. i find this confusing. a comment on the reason for this unusual suffix would be great, but an added "(sic!)" would already indicate this is not an erroneous mixup of OS names (as i initially assumed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 18:44:57 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Sep 2011 16:44:57 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316450697.56.0.803934385359.issue13010@psf.upfronthosting.co.za> R. David Murray added the comment: It is python.exe on OS/X, which I've always found most odd. The reason is that the OS/X filesystem is case insensitive by default, and there is a directory named 'Python'. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 19 19:37:13 2011 From: report at bugs.python.org (Steven Samuel Cole) Date: Mon, 19 Sep 2011 17:37:13 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316453833.43.0.828185550098.issue13010@psf.upfronthosting.co.za> Steven Samuel Cole added the comment: from my observations, david is correct, but this is not limited to os x. i have checked out and rebuilt python twice on a linux system (kubuntu 10.10 i386 virtual machine): 1. in a 'conventional' setup using a local (i.e. guest) harddrive formatted with a case-sensitive file system such as ext4, the built executable is called 'python' as one would expect. 2. in my setup mounting the source code folder from a cifs/samba share provided by the host, the executable is called 'python.exe': samba is not case sensitive. once you know about case sensitivity and python / Python, the sentence in the docs makes absolute sense. before that, it looks like someone has mixed up os names. suggestion for a rephrase: instead of "Once CPython is done building you will then have a working build that can be run in-place; ./python on most machines (and what is used in all examples), ./python.exe on OS X (when on a case-insensitive filesystem, which is the default)." "Once CPython is done building you will then have a working build that can be run in-place; ./python on most machines (and what is used in all examples), ./python.exe wherever a case-insensitive filesystem is used (e.g. the OS X default setting)." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 20 05:34:02 2011 From: report at bugs.python.org (Meador Inge) Date: Tue, 20 Sep 2011 03:34:02 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316489642.57.0.216812368121.issue12943@psf.upfronthosting.co.za> Meador Inge added the comment: Updated patch which adds and documents a '-h,--help' option. This option was suggested during code review. ---------- Added file: http://bugs.python.org/file23196/issue12943-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 21 20:10:25 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 21 Sep 2011 18:10:25 +0000 Subject: [docs] [issue13005] operator module docs include repeat In-Reply-To: <1316373895.0.0.0510419466495.issue13005@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 0d0bfbaaf95c by Senthil Kumaran in branch '3.2': Fix closes issue13005 - Remove the mention of 'repeat' method in the operator module documentation. http://hg.python.org/cpython/rev/0d0bfbaaf95c New changeset 6c60f2aacc83 by Senthil Kumaran in branch 'default': merge 3.2. Fix closes issue13005 - Remove the mention of 'repeat' method in the operator module documentation. http://hg.python.org/cpython/rev/6c60f2aacc83 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 21 23:07:14 2011 From: report at bugs.python.org (Roundup Robot) Date: Wed, 21 Sep 2011 21:07:14 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 9363db42626a by Ezio Melotti in branch 'default': #13010: explain why the python executable has an .exe extension on OS X. http://hg.python.org/devguide/rev/9363db42626a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 21 23:09:24 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Sep 2011 21:09:24 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316639364.1.0.451488367184.issue13010@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the suggestion! ---------- components: +Devguide -Documentation resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 21 23:22:25 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Sep 2011 21:22:25 +0000 Subject: [docs] [issue13010] devguide doc: ./python.exe on OS X In-Reply-To: <1316450298.9.0.0678816170988.issue13010@psf.upfronthosting.co.za> Message-ID: <1316640145.82.0.874609774847.issue13010@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 22 00:02:38 2011 From: report at bugs.python.org (Arnaud Delobelle) Date: Wed, 21 Sep 2011 22:02:38 +0000 Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION Message-ID: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> New submission from Arnaud Delobelle : The description of the opcode MAKE_FUNCTION in the dis module document is out of date. It still describes the 2.X version of the opcode: """ MAKE_FUNCTION(argc) Pushes a new function object on the stack. TOS is the code associated with the function. The function object is defined to have argc default parameters, which are found below TOS. """ According to http://hg.python.org/cpython/file/default/Python/ceval.c#l2684: 2684 int posdefaults = oparg & 0xff; 2685 int kwdefaults = (oparg>>8) & 0xff; 2686 int num_annotations = (oparg >> 16) & 0x7fff; So the documentation should read something like """ MAKE_FUNCTION(argc) Pushes a new function object on the stack. TOS is the code associated with the function. The function object is defined to have argc & 0xFF positional default parameters, (argc >> 8) & 0xFF keyword only default parameters, and (argc >> 16) & 0x7FFF parameter annotations which are push below TOS in this order. For each keyword only default, the name of the parameter is pushed just below its default value. On top of all the annotations, a tuple is pushed listing the parameter names for these annotations. """ ---------- assignee: docs at python components: Documentation messages: 144393 nosy: arno, docs at python, terry.reedy priority: normal severity: normal status: open title: Dis module - documentation of MAKE_FUNCTION versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 22 00:16:07 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Sep 2011 22:16:07 +0000 Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> Message-ID: <1316643367.6.0.812565034852.issue13026@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Minor edit: in 'which are push below TOS', /push/pushed/. I understand 'in this order' to mean that positional defaults are pushed first so that they end up on the bottom, whereas annotations are pushed last and end up just under the code object. Correct? (This order makes sense given the structure of function headers.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 22 00:21:08 2011 From: report at bugs.python.org (Arnaud Delobelle) Date: Wed, 21 Sep 2011 22:21:08 +0000 Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> Message-ID: <1316643668.77.0.478586944503.issue13026@psf.upfronthosting.co.za> Arnaud Delobelle added the comment: Yes, you are correct. Reading this again, I don't think I should have used the word "pushed" as it sounds like the effect of the opcode is to push stuff onto the stack, whereas I was only trying to describe what is on the stack just before the opcode is executed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 22 09:02:19 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Sep 2011 07:02:19 +0000 Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> Message-ID: <1316674939.42.0.853579461082.issue13026@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Right. This opcode is the end of a sequence of opcodes that sets up the stack in the way expected. Perhaps something like Pushes a new function object on the stack. From bottom to top, the consumed stack must have have argc & 0xFF positional default parameter objects, (argc >> 8) & 0xFF keyword only name, default parameter object pairs (with name and object in separate positions), (argc >> 16) & 0x7FFF parameter annotations, a tuple listing the parameter names for the annotations, and finally a code object as TOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 22 09:33:52 2011 From: report at bugs.python.org (Arnaud Delobelle) Date: Thu, 22 Sep 2011 07:33:52 +0000 Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za> Message-ID: <1316676832.38.0.0790389615376.issue13026@psf.upfronthosting.co.za> Arnaud Delobelle added the comment: This reads a lot better. Perhaps change (with name and object in separate positions) to something like (with name just below object on the stack) ---------- _______________________________________ Python tracker _______________________________________ From heikki.rissanen at rissanen.cc Sun Sep 18 12:19:11 2011 From: heikki.rissanen at rissanen.cc (Hessu) Date: Sun, 18 Sep 2011 13:19:11 +0300 Subject: [docs] Suggestion on Python documentation Message-ID: <2b841ae44bb43a9bacd3b567c71d5f94.squirrel@mail.rissanen.biz> Hi guys, I have been programming with 10+ languages at some point of my life but I'm new in Python so some things just pop up when I'm trying to understand the world of Python. I suggest that the documentation should include much more examples or links. Here's one example from: http://docs.python.org/library/os.path.html "os.path.abspath(path): Return a normalized absolutized version of the pathname path. On most platforms, this is equivalent to normpath(join(os.getcwd(), path))" I'm sure that this explanation is probably very true but a simple example would make it also useful. Anyway, thanks for the great work you're doing. T: Hessu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Heikki Rissanen Email:heikki.rissanen at rissanen.cc Tel:+358 (0)40 579 7116 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From paulkoning at comcast.net Mon Sep 19 02:52:53 2011 From: paulkoning at comcast.net (Paul Koning) Date: Sun, 18 Sep 2011 20:52:53 -0400 Subject: [docs] Memory leak in sample "Noddy" extension module code In-Reply-To: <4E74E48F.6050900@python.org> References: <5D28C5B4-BA13-4354-BA8F-F7FC1DB5FF9B@comcast.net> <4E74E48F.6050900@python.org> Message-ID: <5301B092-6947-4961-8C9D-E1A84C78F495@comcast.net> On Sep 17, 2011, at 2:18 PM, Georg Brandl wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Am 12.09.2011 16:51, schrieb Paul Koning: >> Gentlepeople, >> >> There's a memory leak in the sample code for the Noddy extension module in >> the "Extending and Embedding" manual for 2.7.2. Consider for example >> section 2.1.2, page 36 in the US page size PDF file, function >> Noddy_name(). >> >> There are two places where Py_DECREF(format) is needed, and both are >> missing. One is in the error handler for the creation of the "args" object. >> The other is after the call to PyString_Format(format,args). >> >> The error is repeated a couple of times in the assorted variants of the >> Noddy module example. > > Hey Paul, > > I think the examples are correct: "format" is declared static and only > initialized once per process. Therefore it shouldn't be decref'd. > > Georg Sure enough. That was a bit confusing; perhaps a comment would help. paul From paulkoning at comcast.net Mon Sep 19 03:04:16 2011 From: paulkoning at comcast.net (Paul Koning) Date: Sun, 18 Sep 2011 21:04:16 -0400 Subject: [docs] "sane" tzinfo subclasses Message-ID: Gentlepeople, Section 8.1.6 of the library manual talks about utcoffset(dt)-dst(dt) as the "standard offset" and says that this should not depend on the date or time but only on the location. That seems to assume that the politicians who change timezone rules only change the times when DST is in effect, but don't meddle with the standard offset. Often that is true, at least so long as you don't go all that far into the past. But not always. Consider Venezuela, which changed from standard offset -4:00 to -4:30 in 2007, or Samoa, which is changing from -11:00 to +13:00 end of this year. For that matter, various parts of Indiana seem to be switching from time to time, as recently as a couple of years ago. Admittedly this is not all that sane, but then again it's politics. If datetime.astimezone() relies on this assumption when it's clearly not always satisfied, what goes wrong? See the Olson database for all the gory details; the examples I quoted all can be found in there. paul From alexanderkauer at googlemail.com Wed Sep 21 15:56:26 2011 From: alexanderkauer at googlemail.com (Alexander Kauer) Date: Wed, 21 Sep 2011 15:56:26 +0200 Subject: [docs] Missing information in the C api docs Message-ID: <4E79ED0A.9090008@gmail.com> Hello everybody, recently I embedded Python into one of my applications, which included some string parsing. In my opinion the doc page about parsing arguments (http://docs.python.org/c-api/arg.html) is missing the information, that you must not free the returned const char *, like e.g. said here (http://docs.python.org/c-api/string.html#PyString_AsString). It was quite confusing for my first, so I would suggest adding this tiny bit of information. Have a nice day Alexander Kauer ps: I am not subscripted to the mailing list, so if you want to contact me use my email (alexanderkauer+python at gmail.com) From Josh.Hodson at ATK.COM Wed Sep 21 15:51:01 2011 From: Josh.Hodson at ATK.COM (Hodson, Josh) Date: Wed, 21 Sep 2011 07:51:01 -0600 Subject: [docs] Interface option "-c" Message-ID: I tried to use the "-c" option to run a script called "a" with a method called "Test()", and received an error message as follows: S:\>python -c "import a\n a.Test()" File "", line 1 import a\n a.Test() ^ SyntaxError: unexpected character after line continuation character S:\> If I replace the "\n" with a semicolon, then it works. Documentation for the interface option "-c" reads (http://docs.python.org/using/cmdline.html#command-line): -c ? Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code. I am running 64-bit Python27 on Windows Vista. I have not tried this with any other version of Python or on any other platform. In my personal opinion, the semicolon is cleaner than the '\n' anyway, so I would prefer that the documentation just be updated to say "separated by semicolons" instead of "separated by newlines", but that is assuming all other versions of Python on all platforms behave the same. Thanks, Joshua D. Hodson ATK Aerospace Systems josh.hodson at atk.com (435) 863-3646 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikemol at gmail.com Wed Sep 21 16:49:03 2011 From: mikemol at gmail.com (Michael Mol) Date: Wed, 21 Sep 2011 10:49:03 -0400 Subject: [docs] Bug in http://docs.python.org/install/index.html Message-ID: Under: http://docs.python.org/install/index.html#inst-how-install-works It notes "Windows prefix\Lib\site-packages C:\PythonXY\Lib\site-packages" for default values on Windows. In the paragraph following the table is the text: "prefix and exec-prefix stand for the directories that Python is installed to, and where it finds its libraries at run-time. They are always the same under Windows, and very often the same under Unix and Mac OS X. " I don't know if it's hardcoded into Python distributions to use C, but it's not correct. The correct way to identify what most people think of as C is via the %SYSTEMROOT% environment variable, so the path described would be "%SYSTEMROOT%\PythonXY\Lib\site-packages" (This is still not the correct way to do things on Windows, but it at least shouldn't break on systems with a %SYSTEMROOT% other than C. I've seen configurations like that on systems which boot multiple versions of Windows.) -- :wq From georg at python.org Thu Sep 22 10:12:55 2011 From: georg at python.org (Georg Brandl) Date: Thu, 22 Sep 2011 10:12:55 +0200 Subject: [docs] Interface option "-c" In-Reply-To: References: Message-ID: <4E7AEE07.4070100@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 21.09.2011 15:51, schrieb Hodson, Josh: > I tried to use the ?-c? option to run a script called ?a? with a method > called ?Test()?, and received an error message as follows: > > S:\>python -c "import a\n a.Test()" File "", line 1 import a\n > a.Test() ^ SyntaxError: unexpected character after line continuation > character > > S:\> > > If I replace the ?\n? with a semicolon, then it works. Documentation for > the interface option ?-c? reads > (http://docs.python.org/using/cmdline.html#command-line): > > *-c*? > > > Execute the Python code in /command/. /command/ can be one or more > statements separated by newlines, with significant leading whitespace as in > normal module code. > > I am running 64-bit Python27 on Windows Vista. I have not tried this with > any other version of Python or on any other platform. In my personal > opinion, the semicolon is cleaner than the ?\n? anyway, so I would prefer > that the documentation just be updated to say ?separated by semicolons? > instead of ?separated by newlines?, but that is assuming all other versions > of Python on all platforms behave the same. Hi Josh, I think the issue here is that your command interpreter / shell does not interpret the "\n" as a newline. (The string that Python receives already has to have the newline, Python itself does not translate escapes in it.) You'd have to look into the documentation for your shell how to put newlines in command arguments. As for changing the suggestion to semicolons, it is not equivalent since you cannot run code with suites (if/for/... statements) using semicolons. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAk567gcACgkQN9GcIYhpnLCjYwCfcWfFgSth8MkBSCUAC3EwHz/K EkQAnj3IL9OHTZI68V9iDSJsGSI8V3y2 =T3Ir -----END PGP SIGNATURE----- From report at bugs.python.org Thu Sep 22 10:13:21 2011 From: report at bugs.python.org (Georg Brandl) Date: Thu, 22 Sep 2011 08:13:21 +0000 Subject: [docs] [issue12943] tokenize: add python -m tokenize support back In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za> Message-ID: <1316679201.74.0.37475474155.issue12943@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think the help option needs to be documented, it will document itself. An additional suggestion is to catch errors on tokenizing and exiting with a non-zero exit status in these cases. ---------- _______________________________________ Python tracker _______________________________________ From Eike.Petersen at draeger.com Thu Sep 22 10:12:01 2011 From: Eike.Petersen at draeger.com (Petersen, Eike) Date: Thu, 22 Sep 2011 10:12:01 +0200 Subject: [docs] Little Tutorial Correction Message-ID: <3635BC3AE91B644ABFACC65FC70023FA2105B398FF@CDECLUEXMBX01.corp.draeger.global> Hello, http://docs.python.org/tutorial/introduction.html#lists under this section I read across the following statement: ?All slice operations return a new list containing the requested elements. This means that the following slice returns a shallow copy of the list a: >>> a[:]? But as far as I know the behaviour of the [:] operator is on the contrary called deep copying, since the following will return different lists: A = [1,2,3] B =A[:] A[1]=3 Mit freundlichen Gr??en / Kind Regards, Eike Petersen Werkstudent Section Software Application & Algorithms Research & Development [cid:image002.jpg at 01CC7910.11F83AA0] Dr?ger Medical GmbH Moislinger Allee 53?55 23558 L?beck, Germany eike.petersen at draeger.com www.draeger.com Dr?ger. Technology for Life ? P Please consider the environment before printing this e-mail Sitz der Gesellschaft/Registered office: L?beck; Handelsregister/Commercial register: Amtsgericht/Local court L?beck HRB 4358 HL Vorsitzender des Aufsichtsrats/Chairman of the supervisory board: Stefan Dr?ger Gesch?ftsf?hrer/General manager: Dr. Christian Hauer ---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enth?lt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empf?nger dieser E-mail sein, senden Sie bitte diese an den Absender zur?ck und l?schen Sie die E-mail aus Ihrem System.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 5690 bytes
Desc: image002.jpg
URL: 

From georg at python.org  Thu Sep 22 10:29:37 2011
From: georg at python.org (Georg Brandl)
Date: Thu, 22 Sep 2011 10:29:37 +0200
Subject: [docs] Little Tutorial Correction
In-Reply-To: <3635BC3AE91B644ABFACC65FC70023FA2105B398FF@CDECLUEXMBX01.corp.draeger.global>
References: <3635BC3AE91B644ABFACC65FC70023FA2105B398FF@CDECLUEXMBX01.corp.draeger.global>
Message-ID: <4E7AF1F1.9020308@python.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 22.09.2011 10:12, schrieb Petersen, Eike:
> Hello,
> 
> http://docs.python.org/tutorial/introduction.html#lists under this section
> I read across the following statement:
> 
> ?All slice operations return a new list containing the requested elements. 
> This means that the following slice returns a shallow copy of the list 
> //a//:
> 
>>>> a[:]?
> 
> But as far as I know the behaviour of the [:] operator is on the contrary 
> called deep copying, since the following will return different lists:
> 
> A = [1,2,3] B =A[:] A[1]=3

Hi Eike,

Python does indeed to only a shallow copy, since it does not copy the objects
themselves.  To see this, you can try something like this:

>>> a = [[1, 2], [3]] b = a[:] a[0][0] = 999 a[0]
[999, 2]
>>> b[0]
[999, 2]

cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iEYEARECAAYFAk568fEACgkQN9GcIYhpnLBc7wCeNwbMJfX391dx0yO56Wo1jMYi
PioAoIIgwYl4N2Od+s9ceH5WFFvFydX4
=3pMf
-----END PGP SIGNATURE-----

From report at bugs.python.org  Thu Sep 22 21:00:24 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Thu, 22 Sep 2011 19:00:24 +0000
Subject: [docs] [issue12902] help("modules") executes module code
In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za>
Message-ID: <1316718024.54.0.124032574679.issue12902@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

Since help("modules") just shows a list of modules without any description, maybe it could avoid importing them until further information about individual modules are requested.

Also while trying to do help("modules") twice on py3k, I noticed that the second time many modules are missing from the list.  Is this expected and/or a known issue?

----------
nosy: +rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Sep 22 23:31:51 2011
From: report at bugs.python.org (Sandro Tosi)
Date: Thu, 22 Sep 2011 21:31:51 +0000
Subject: [docs] [issue13030] Be more generic when identifying the Windows
	main dir in	installation doc
Message-ID: <1316727111.41.0.373563358156.issue13030@psf.upfronthosting.co.za>


New submission from Sandro Tosi :

Given I have no knowledge of the windows system, I'm just proxying http://mail.python.org/pipermail/docs/2011-September/005793.html :

>>>
Under: http://docs.python.org/install/index.html#inst-how-install-works


It notes "Windows	prefix\Lib\site-packages	C:\PythonXY\Lib\site-packages"
for default values on Windows.

In the paragraph following the table is the text: "prefix and
exec-prefix stand for the directories that Python is installed to, and
where it finds its libraries at run-time. They are always the same
under Windows, and very often the same under Unix and Mac OS X. "

I don't know if it's hardcoded into Python distributions to use C, but
it's not correct. The correct way to identify what most people think
of as C is via the %SYSTEMROOT% environment variable, so the path
described would be "%SYSTEMROOT%\PythonXY\Lib\site-packages"

(This is still not the correct way to do things on Windows, but it at
least shouldn't break on systems with a %SYSTEMROOT% other than C.
I've seen configurations like that on systems which boot multiple
versions of Windows.)
<<<

----------
assignee: docs at python
components: Documentation
messages: 144422
nosy: brian.curtin, docs at python, sandro.tosi, tim.golden
priority: normal
severity: normal
stage: needs patch
status: open
title: Be more generic when identifying the Windows main dir in installation doc
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From sandro.tosi at gmail.com  Thu Sep 22 23:32:42 2011
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Thu, 22 Sep 2011 23:32:42 +0200
Subject: [docs] Bug in http://docs.python.org/install/index.html
In-Reply-To: 
References: 
Message-ID: 

Hi Michael,
thanks for your email

On Wed, Sep 21, 2011 at 16:49, Michael Mol  wrote:
> Under: http://docs.python.org/install/index.html#inst-how-install-works
>
>
> It notes "Windows ? ? ? prefix\Lib\site-packages ? ? ? ?C:\PythonXY\Lib\site-packages"
> for default values on Windows.
>
> In the paragraph following the table is the text: "prefix and
> exec-prefix stand for the directories that Python is installed to, and
> where it finds its libraries at run-time. They are always the same
> under Windows, and very often the same under Unix and Mac OS X. "
>
> I don't know if it's hardcoded into Python distributions to use C, but
> it's not correct. The correct way to identify what most people think
> of as C is via the %SYSTEMROOT% environment variable, so the path
> described would be "%SYSTEMROOT%\PythonXY\Lib\site-packages"
>
> (This is still not the correct way to do things on Windows, but it at
> least shouldn't break on systems with a %SYSTEMROOT% other than C.
> I've seen configurations like that on systems which boot multiple
> versions of Windows.)

I've opened http://bugs.python.org/issue13030 to track your request.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

From sandro.tosi at gmail.com  Thu Sep 22 23:37:10 2011
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Thu, 22 Sep 2011 23:37:10 +0200
Subject: [docs] Suggestion on Python documentation
In-Reply-To: <2b841ae44bb43a9bacd3b567c71d5f94.squirrel@mail.rissanen.biz>
References: <2b841ae44bb43a9bacd3b567c71d5f94.squirrel@mail.rissanen.biz>
Message-ID: 

Hi Hessu,
thanks a lot for your input!

On Sun, Sep 18, 2011 at 12:19, Hessu  wrote:
> Hi guys,
>
> I have been programming with 10+ languages at some point of my life but
> I'm new in Python so some things just pop up when I'm trying to understand
> the world of Python.

It's really important the judgment of our users: the reader of the
docs, in particularly those looking for to build skills in the
language, because it gives us a new point-of-view.

> I suggest that the documentation should include much more examples or links.

You may well understand we'd need some examples :)

The longer the list, the better, actually.

> Here's one example from: http://docs.python.org/library/os.path.html
>
> "os.path.abspath(path): Return a normalized absolutized version of the
> pathname path. On most platforms, this is equivalent to
> normpath(join(os.getcwd(), path))"
>
> I'm sure that this explanation is probably very true but a simple example
> would make it also useful.

Could you please provide a snippet of code you consider worth adding
to the doc for os.path.abspath() ? Ideally it would be nice if you can
report and issue to http://bugs.python.org, but it's fine if you
follow up here, I'll just proxy to the issue tracker when needed.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

From report at bugs.python.org  Thu Sep 22 23:51:44 2011
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 22 Sep 2011 21:51:44 +0000
Subject: [docs] [issue13026] Dis module - documentation of MAKE_FUNCTION
In-Reply-To: <1316642558.64.0.601129278503.issue13026@psf.upfronthosting.co.za>
Message-ID: <1316728304.51.0.134289004232.issue13026@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

Agreed

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Thu Sep 22 23:57:32 2011
From: report at bugs.python.org (Terry J. Reedy)
Date: Thu, 22 Sep 2011 21:57:32 +0000
Subject: [docs] [issue12902] help("modules") executes module code
In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za>
Message-ID: <1316728652.83.0.341054847373.issue12902@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

As I said in msg143786, the second time only c-coded modules are listed.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 23 00:03:16 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Thu, 22 Sep 2011 22:03:16 +0000
Subject: [docs] [issue12902] help("modules") executes module code
In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za>
Message-ID: <1316728996.43.0.672019306441.issue12902@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

Right, I missed that.
If we change the way the list is created this bug will be probably get fixed too.  If we don't, we should open another issue.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 23 01:40:15 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Thu, 22 Sep 2011 23:40:15 +0000
Subject: [docs] [issue12902] help("modules") executes module code
In-Reply-To: <1315251083.43.0.259542197646.issue12902@psf.upfronthosting.co.za>
Message-ID: <1316734814.9.0.254846330826.issue12902@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

> A separate issue would be a feature request to not do that (assuming it really does).

I tried to verify this (the fact that modules get imported with help('modules')).  Here are the results:
  * Lib/foobar.py:
    - help('modules'): foobar in the list, code is *not* executed;
    - help('foobar'): code is executed;
  * Lib/deleteme/__init__.py:
    - help('modules'): deleteme in the list, code is executed;
    - help('deleteme'): code is executed;
  * Lib/deleteme/__init__.py and Lib/deleteme/foobar.py:
    - help('modules'): deleteme in the list, only __init__ code is executed;
    - help('deleteme.foobar'): foobar code is executed;

So it seems the only code that gets executed with help('modules') is the one in packages' __init__s.  It also seems that the code is executed only once, so doing help('deleteme') after help('modules') doesn't execute the code again.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 23 05:55:27 2011
From: report at bugs.python.org (Meador Inge)
Date: Fri, 23 Sep 2011 03:55:27 +0000
Subject: [docs] [issue12943] tokenize: add python -m tokenize support back
In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za>
Message-ID: <1316750126.45.0.500259482176.issue12943@psf.upfronthosting.co.za>


Meador Inge  added the comment:

> I don't think the help option needs to be documented, it will document 
> itself.

Normally I would document it anyway, but in this case there is only the
one option.  So, I dropped it.

> An additional suggestion is to catch errors on tokenizing and exiting 
> with a non-zero exit status in these cases.

I like that idea.  Sample output:

$ python -m tokenize foo.py
foo.py: error: unknown encoding: meador
$ python -m tokenize foo.py
foo.py:7:2: error: unindent does not match any outer indentation level
$ ./python -m tokenize bogus.py
error: [Errno 2] No such file or directory: 'bogus.py'
$ python -m tokenize foo.py
$ echo '[1,' | ./python -m tokenize
1,0-1,1:            OP             '['            
1,1-1,2:            NUMBER         '1'            
1,2-1,3:            OP             ','            
1,3-1,4:            NL             '\n'           
:2:0: error: EOF in multi-line statement

Attached is the latest patch implementing these suggestions.

----------
Added file: http://bugs.python.org/file23228/issue12943-5.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 23 07:20:11 2011
From: report at bugs.python.org (Georg Brandl)
Date: Fri, 23 Sep 2011 05:20:11 +0000
Subject: [docs] [issue12943] tokenize: add python -m tokenize support back
In-Reply-To: <1315537867.15.0.614423357455.issue12943@psf.upfronthosting.co.za>
Message-ID: <1316755211.55.0.0983796144842.issue12943@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

I would say this looks good now.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 23 21:50:24 2011
From: report at bugs.python.org (Terry J. Reedy)
Date: Fri, 23 Sep 2011 19:50:24 +0000
Subject: [docs] [issue13030] Be more generic when identifying the Windows
	main dir in	installation doc
In-Reply-To: <1316727111.41.0.373563358156.issue13030@psf.upfronthosting.co.za>
Message-ID: <1316807424.78.0.299863901397.issue13030@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

Windows does not require that executables be on any particular 'drive'.

----------
nosy: +terry.reedy

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Sep 25 22:49:58 2011
From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis)
Date: Sun, 25 Sep 2011 20:49:58 +0000
Subject: [docs] [issue13047] imp.find_module("") and imp.find_module(".")
Message-ID: <1316983798.48.0.694425302693.issue13047@psf.upfronthosting.co.za>


New submission from Arfrever Frehtes Taifersar Arahesis :

It's undocumented that imp.find_module("") and imp.find_module(".") try to find __init__.py.

There is also a small difference in behavior between them.
sys.path by default contains "" as the first element, which is sufficient for imp.find_module("."), but not for imp.find_module(""):

$ mkdir /tmp/imp_tests
$ cd /tmp/imp_tests
$ touch __init__.py
$ python3.3 -c 'import imp, sys; print(repr(sys.path[0])); print(imp.find_module("."))'
''
(None, '.', ('', '', 5))
$ python3.3 -c 'import imp, sys; print(repr(sys.path[0])); print(imp.find_module(""))'
''
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named ''

If sys.path contains path (e.g. "." or absolute path) to directory with __init__.py file, then imp.find_module("") will succeed:

$ PYTHONPATH="." python3.3 -c 'import imp, sys; print(repr(sys.path[0:2])); print(imp.find_module("."))'
['', '/tmp/imp_tests']
(None, '.', ('', '', 5))
$ PYTHONPATH="." python3.3 -c 'import imp, sys; print(repr(sys.path[0:2])); print(imp.find_module(""))'
['', '/tmp/imp_tests']
(None, '/tmp/imp_tests/', ('', '', 5))
$ python3.3 -c 'import imp, sys; sys.path.insert(1, "."); print(repr(sys.path[0:2])); print(imp.find_module("."))'
['', '.']
(None, '.', ('', '', 5))
$ python3.3 -c 'import imp, sys; sys.path.insert(1, "."); print(repr(sys.path[0:2])); print(imp.find_module(""))'
['', '.']
(None, './', ('', '', 5))

I think that imp.find_module(".") and imp.find_module("") should have the same behavior, and this behavior should be documented.

----------
assignee: docs at python
components: Documentation, Interpreter Core
messages: 144531
nosy: Arfrever, docs at python
priority: normal
severity: normal
status: open
title: imp.find_module("") and imp.find_module(".")
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Sep 25 22:54:09 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 25 Sep 2011 20:54:09 +0000
Subject: [docs] [issue13047] imp.find_module("") and imp.find_module(".")
In-Reply-To: <1316983798.48.0.694425302693.issue13047@psf.upfronthosting.co.za>
Message-ID: <1316984049.79.0.578483974253.issue13047@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +brett.cannon, ezio.melotti, ncoghlan

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Sep 25 23:05:33 2011
From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis)
Date: Sun, 25 Sep 2011 21:05:33 +0000
Subject: [docs] [issue13048] Handling of paths in first argument of
	imp.find_module()
Message-ID: <1316984733.77.0.135974751185.issue13048@psf.upfronthosting.co.za>


New submission from Arfrever Frehtes Taifersar Arahesis :

It's undocumented that imp.find_module() supports paths with "/" as the first argument:

$ mkdir /tmp/imp_tests
$ cd /tmp/imp_tests
$ mkdir a
$ touch a/b.py
$ python3.3 -c 'import imp; print(imp.find_module("a/b"))'
(<_io.TextIOWrapper name=4 mode='U' encoding='utf-8'>, 'a/b.py', ('.py', 'U', 1))

----------
assignee: docs at python
components: Documentation, Interpreter Core
messages: 144532
nosy: Arfrever, brett.cannon, docs at python, ezio.melotti, ncoghlan
priority: normal
severity: normal
status: open
title: Handling of paths in first argument of imp.find_module()
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Sep 25 23:14:07 2011
From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis)
Date: Sun, 25 Sep 2011 21:14:07 +0000
Subject: [docs] [issue11676] Improve imp.load_module and submodules doc
In-Reply-To: <1301089227.12.0.157951103986.issue11676@psf.upfronthosting.co.za>
Message-ID: <1316985247.62.0.444169539435.issue11676@psf.upfronthosting.co.za>


Changes by Arfrever Frehtes Taifersar Arahesis :


----------
nosy: +Arfrever

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Sep 26 20:03:50 2011
From: report at bugs.python.org (Brett Cannon)
Date: Mon, 26 Sep 2011 18:03:50 +0000
Subject: [docs] [issue13048] Handling of paths in first argument of
	imp.find_module()
In-Reply-To: <1316984733.77.0.135974751185.issue13048@psf.upfronthosting.co.za>
Message-ID: <1317060230.58.0.140442597655.issue13048@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

It's probably not a bad thing it's undocumented either since importing by file path was removed in Python 3, so this is another case where imp.find_module() differentiates from __import__.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Mon Sep 26 20:04:42 2011
From: report at bugs.python.org (Brett Cannon)
Date: Mon, 26 Sep 2011 18:04:42 +0000
Subject: [docs] [issue13047] imp.find_module("") and imp.find_module(".")
In-Reply-To: <1316983798.48.0.694425302693.issue13047@psf.upfronthosting.co.za>
Message-ID: <1317060282.16.0.505030517667.issue13047@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

I don't think this is undocumented as much as it's unexpected behavior. I really doubt this functionality was  on purpose.

----------

_______________________________________
Python tracker 

_______________________________________

From dfsmith at dfsmith.net  Fri Sep 23 09:03:31 2011
From: dfsmith at dfsmith.net (Daniel Smith)
Date: Fri, 23 Sep 2011 00:03:31 -0700
Subject: [docs] Prime numbers
Message-ID: <4E7C2F43.20007@dfsmith.net>

In section 5.1.3 for filter() at
http://docs.python.org/tutorial/datastructures.html;
the description says "For example, to compute primes up to 25:"

However, the output "[5, 7, 11, 13, 17, 19, 23]" omits both the prime 2 
and the prime 3.  (And would list many non-primes >24 if the range were 
increased.)

The example is still useful and relevant, but the description is very 
misleading.

(In fact, I might cite the page on Wikipedia as a sieve algorithm, and 
see how many times 25 is listed as prime... B-)



Daniel Smith, nitpicker.

From katazina.zigo at gmail.com  Sat Sep 24 07:50:00 2011
From: katazina.zigo at gmail.com (Katazina Zigo)
Date: Sat, 24 Sep 2011 07:50:00 +0200
Subject: [docs] 24.6 Idle correction
Message-ID: 

Hi guys,

At http://docs.python.org/library/idle.html:
"cross-platform: works on Windows and Unix" > it works also on Mac

From ajhill007 at gmail.com  Mon Sep 26 14:55:29 2011
From: ajhill007 at gmail.com (AJ Hill)
Date: Mon, 26 Sep 2011 07:55:29 -0500
Subject: [docs] Confusing comment in docs for 3.2.2 section 2.1
Message-ID: 

To the wonderful folks who look after the Python docs,

There is a confusing comment in the last paragraph of section 2.1, Invoking
the Python Interpreter, of the 3.2.2 docs.

Here is the page URL:

http://docs.python.org/py3k/tutorial/interpreter.html#invoking-the-interpreter

Here is the text I am referring to:

When a script file is used, it is sometimes useful to be able to run the
> script and enter interactive mode afterwards. This can be done by passing -i
> before the script. (This does not work if the script is read from standard
> input, for the same reason as explained in the previous paragraph.)
>

The last sentence refers to the previous paragraph (copied here):

Some Python modules are also useful as scripts. These can be invoked using
> python -m module [arg] ..., which executes the source file for module as if
> you had spelled out its full name on the command line.
>

I do not see the connection; it does not seem to explain why you can run a
script and enter interactive mode, but not if the script is included through
standard input.

Thanks again for the wonderful documentation - hope my comments are useful /
clear.

Best regards,

AJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From bill.stephens at sungard.com  Mon Sep 26 20:07:32 2011
From: bill.stephens at sungard.com (Bill Stephens)
Date: Mon, 26 Sep 2011 14:07:32 -0400
Subject: [docs] Tutorial Different Than Reality
Message-ID: 

Hi,



Trying to learn yet another scripting language.

Referring to tutorial on docs.python.org.

Python 3.2.2 installed on Windows7.



Using:

13:25:39.64 C:\Work>python

Python 3.2.2 (default, Sep  4 2011, 09:07:29) [MSC v.1500 64 bit (AMD64)] on
win32

Type "help", "copyright", "credits" or "license" for more information.

>>>



In the tutorial on strings demonstrating surrounding a text string with ???:



*print* """

Usage: thingy [OPTIONS]

     -h                        Display this usage message

     -H hostname               Hostname to connect to

"""



Python handles this differently than the tutorial suggests:



>>> print """

... Usage: thingy [OPTIONS]

...      -h                    Display this usage message

...      -H hostname           Hostname to connect to

... """

  File "", line 5

    """

      ^

SyntaxError: invalid syntax

>>>



Regards,

Bill Stephens



*Sr. Systems Engineer ? Advanced Operations Group/High Availability*

*SunGard Availability Services ? 401 N. Broad Street, Philadelphia, PA 19108
**       *

Normal working hours: 7am-3:30pm M-F ? Phone 215.351.1099 ? Fax 215.351.0708



*Keeping People and Information Connected? ?
http://www.availability.sungard.com/ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From georg at python.org  Tue Sep 27 08:10:46 2011
From: georg at python.org (Georg Brandl)
Date: Tue, 27 Sep 2011 08:10:46 +0200
Subject: [docs] Tutorial Different Than Reality
In-Reply-To: 
References: 
Message-ID: <4E8168E6.7020406@python.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bill,

the tutorial you read is for Python 2.x, while you've installed 3.x, so you'll
have to read the docs at http://docs.python.org/py3k.

regards,
Georg

Am 26.09.2011 20:07, schrieb Bill Stephens:
> Hi,
> 
> 
> 
> Trying to learn yet another scripting language. Referring to tutorial on
> docs.python.org . Python 3.2.2 installed on
> Windows7.
> 
> Using: 13:25:39.64 C:\Work>python Python 3.2.2 (default, Sep  4 2011,
> 09:07:29) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright",
> "credits" or "license" for more information.
>>>> 
> 
> In the tutorial on strings demonstrating surrounding a text string with
> ???:
> 
> *print*""" Usage: thingy [OPTIONS] -h                        Display this
> usage message -H hostname               Hostname to connect to """
> 
> Python handles this differently than the tutorial suggests:
> 
>>>> print """
> ... Usage: thingy [OPTIONS] ...      -h                    Display this
> usage message ...      -H hostname           Hostname to connect to ...
> """ File "", line 5 """ ^ SyntaxError: invalid syntax
>>>> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iEYEARECAAYFAk6BaOYACgkQN9GcIYhpnLDQBACgoKjFlb5LJ1exRXXzaMc0WkT9
7QQAoJeTnIb0d5TX0oqjcundm/MOiqtJ
=74S6
-----END PGP SIGNATURE-----

From report at bugs.python.org  Tue Sep 27 18:29:01 2011
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Tue, 27 Sep 2011 16:29:01 +0000
Subject: [docs] [issue13030] Be more generic when identifying the Windows
	main dir in	installation doc
In-Reply-To: <1316727111.41.0.373563358156.issue13030@psf.upfronthosting.co.za>
Message-ID: <1317140941.23.0.974207538304.issue13030@psf.upfronthosting.co.za>


?ric Araujo  added the comment:

Terry, are you saying that the report is not a bug or that some part of the message is valid and some other part not?  I can?t see clearly what I should do.

Sandro: You can nosy me to all bugs for distutils docs: Doc/distutils, Doc/install, Doc/packaging, Doc/library/packaging.* (and also related docs like site, using, sysconfig)

----------
nosy: +eric.araujo

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Sep 27 21:02:06 2011
From: report at bugs.python.org (R. David Murray)
Date: Tue, 27 Sep 2011 19:02:06 +0000
Subject: [docs] [issue13050] RLock support the context manager protocol but
	this is	not documented
Message-ID: <1317150126.79.0.776566574527.issue13050@psf.upfronthosting.co.za>


Changes by R. David Murray :


----------
assignee: docs at python
components: Documentation
nosy: docs at python, r.david.murray
priority: normal
severity: normal
status: open
title: RLock support the context manager protocol but this is not documented

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Tue Sep 27 21:17:14 2011
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 27 Sep 2011 19:17:14 +0000
Subject: [docs] [issue13030] Be more generic when identifying the Windows
	main dir in	installation doc
In-Reply-To: <1316727111.41.0.373563358156.issue13030@psf.upfronthosting.co.za>
Message-ID: <1317151034.91.0.698006186866.issue13030@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

I said exactly what I said ;-). Upon looking further (following the links), I see that 'install' refers to the disutils setup program install command option. What you should do is make the doc accurate and clear.

What 'accurate' means is for you to say, but not having used install, the doc is not too clear to me. The table headings 'Standard installation location' (of what?) and 'Default value' (for what program?) both seem a bit ambiguous, or rather they seem reversed to me. I would label the columns 'Default module directory' and 'Standard Python location'.

That said, I hope that the actual default module installation directory for install is the actual site-packages directory on my machine, based on where I actually put python, and not the non-existent standard location, which I did not use but which is what the text seems to say (but which would be a behavior design bug to me).

MARTIN: below is the question for you.

The issue raised by the off-tracker OP, Michael Mol, is a different one about how the .msi installer works and whether this doc is correctly describing how it works. The question is whether the default python install directory built into pythonxy...msi is literally "C:\PythonXY\Lib\site-packages" or whether it is actually "%SYSTEMROOT%\PythonXY\Lib\site-packages". Mr. Mol claims that the latter, or something else (unspecified), is better.

----------
nosy: +loewis

_______________________________________
Python tracker 

_______________________________________

From senthil at uthcode.com  Thu Sep 29 01:39:08 2011
From: senthil at uthcode.com (Senthil Kumaran)
Date: Thu, 29 Sep 2011 07:39:08 +0800
Subject: [docs] 24.6 Idle correction
In-Reply-To: 
References: 
Message-ID: <20110928233908.GF4665@mathmagic>

On Sat, Sep 24, 2011 at 07:50:00AM +0200, Katazina Zigo wrote:
> At http://docs.python.org/library/idle.html:
> "cross-platform: works on Windows and Unix" > it works also on Mac

Isn't Mac a Unix too? (Or do people don't think that way) 

-- 
Senthil

From senthil at uthcode.com  Thu Sep 29 01:49:21 2011
From: senthil at uthcode.com (Senthil Kumaran)
Date: Thu, 29 Sep 2011 07:49:21 +0800
Subject: [docs] "sane" tzinfo subclasses
In-Reply-To: 
References: 
Message-ID: <20110928234921.GG4665@mathmagic>

On Sun, Sep 18, 2011 at 09:04:16PM -0400, Paul Koning wrote:
> Gentlepeople,
> 
> Section 8.1.6 of the library manual talks about
> utcoffset(dt)-dst(dt) as the "standard offset" and says that this
> should not depend on the date or time but only on the location.

What would be good note to add to explain that? IIRC, someone at the
top when dealing with datetime and timezones Python docs already
mentions that it cannot be relied up completely, because timezone
rules changes sometimes due to politics of the land.

-- 
Senthil

From senthil at uthcode.com  Thu Sep 29 01:56:34 2011
From: senthil at uthcode.com (Senthil Kumaran)
Date: Thu, 29 Sep 2011 07:56:34 +0800
Subject: [docs] Prime numbers
In-Reply-To: <4E7C2F43.20007@dfsmith.net>
References: <4E7C2F43.20007@dfsmith.net>
Message-ID: <20110928235634.GH4665@mathmagic>

On Fri, Sep 23, 2011 at 12:03:31AM -0700, Daniel Smith wrote:
> However, the output "[5, 7, 11, 13, 17, 19, 23]" omits both the
> prime 2 and the prime 3.  (And would list many non-primes >24 if the
> range were increased.)

Fixed in changeset f612b783bc17

Thanks,
Senthil

From sandro.tosi at gmail.com  Thu Sep 29 11:20:47 2011
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Thu, 29 Sep 2011 11:20:47 +0200
Subject: [docs] 24.6 Idle correction
In-Reply-To: <20110928233908.GF4665@mathmagic>
References: 
	<20110928233908.GF4665@mathmagic>
Message-ID: 

On Thu, Sep 29, 2011 at 01:39, Senthil Kumaran  wrote:
> On Sat, Sep 24, 2011 at 07:50:00AM +0200, Katazina Zigo wrote:
>> At http://docs.python.org/library/idle.html:
>> "cross-platform: works on Windows and Unix" > it works also on Mac
>
> Isn't Mac a Unix too? (Or do people don't think that way)

yes it is, at least in the recent versions of Max OS X it's a freebsd
under the hood. I don't know, tho, if it's known to Mac users hence
the confusion?

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

From report at bugs.python.org  Fri Sep 30 06:05:13 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Fri, 30 Sep 2011 04:05:13 +0000
Subject: [docs] [issue12731] python lib re uses obsolete sense of \w in
	full	violation of UTS#18 RL1.2a
In-Reply-To: <1313090311.62.0.0473644856742.issue12731@psf.upfronthosting.co.za>
Message-ID: <1317355513.26.0.479319861228.issue12731@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

The failing re tests after PEP 393 are:
FAIL lib re found non alphanumeric string  'cafe'
FAIL lib re found non alphanumeric string  '?'
FAIL lib re found non alphanumeric string  ''
FAIL lib re found non alphanumeric string  ''
FAIL lib re found non alphanumeric string  'connector?punctuation'
FAIL lib re found non alphanumeric string  '?_???_??????'
FAIL lib re found non alphanumeric string  '????????????????????????'
FAIL lib re found all alphanumeric string  '???'
FAIL lib re found all alphanumeric string  '???'
FAIL lib re found all alphanumeric string  '???'
FAIL lib re found all alphanumeric string  '?'

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 10:09:03 2011
From: report at bugs.python.org (Petri Lehtinen)
Date: Fri, 30 Sep 2011 08:09:03 +0000
Subject: [docs] [issue13073] message_body argument of
	HTTPConnection.endheaders is	undocumented
Message-ID: <1317370143.22.0.297306447289.issue13073@psf.upfronthosting.co.za>


New submission from Petri Lehtinen :

The argument is essential to avoid slowdown with delayed ACKs and the Nagle algorithm, so it should be documented. It was added when fixing issue 4336. I believe that it's new in Python 2.7.

----------
assignee: docs at python
components: Documentation
messages: 144676
nosy: docs at python, petri.lehtinen
priority: normal
severity: normal
stage: needs patch
status: open
title: message_body argument of HTTPConnection.endheaders is undocumented
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 10:15:34 2011
From: report at bugs.python.org (Geoffrey Bache)
Date: Fri, 30 Sep 2011 08:15:34 +0000
Subject: [docs] [issue13074] Improve documentation of locale encoding
	functions
Message-ID: <1317370534.21.0.426762958064.issue13074@psf.upfronthosting.co.za>


New submission from Geoffrey Bache :

The locale module provides locale.getdefaultlocale and locale.getpreferredencoding. The encodings returned by each are generally subtly different ('ISO8859-1' vs 'ISO-8859-1'), but the difference between these methods is not explained. 

A comment by Martin von L?wis from 2003 in http://bugs.python.org/issue813449 indicates that "getdefaultlocale should not be used in new code", if this is really the case then this should be in the docs. 

Anyone reading the docs from the top will currently encounter getdefaultlocale first and believe that this is the way to get the encoding.

----------
assignee: docs at python
components: Documentation
messages: 144677
nosy: docs at python, gjb1002
priority: normal
severity: normal
status: open
title: Improve documentation of locale encoding functions
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 10:18:34 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Fri, 30 Sep 2011 08:18:34 +0000
Subject: [docs] [issue13074] Improve documentation of locale encoding
	functions
In-Reply-To: <1317370534.21.0.426762958064.issue13074@psf.upfronthosting.co.za>
Message-ID: <1317370714.0.0.567786410402.issue13074@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +ezio.melotti
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 11:21:25 2011
From: report at bugs.python.org (Elmar Zander)
Date: Fri, 30 Sep 2011 09:21:25 +0000
Subject: [docs] [issue13075] PEP-0001 contains dead links
Message-ID: <1317374485.54.0.239839552518.issue13075@psf.upfronthosting.co.za>


New submission from Elmar Zander :

The links in section "Resources" of PEP-0001 are all dead. They point to www.python.org/dev/ and all return a 404. Most of them can still be found via google archive.org, but that's not really how it should be. Maybe some of them are already superseded, but even then I think they have at least historical value and should be kept on python.org.

----------
assignee: docs at python
components: Documentation
messages: 144680
nosy: docs at python, ezander
priority: normal
severity: normal
status: open
title: PEP-0001 contains dead links

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 11:23:50 2011
From: report at bugs.python.org (Senthil Kumaran)
Date: Fri, 30 Sep 2011 09:23:50 +0000
Subject: [docs] [issue13073] message_body argument of
	HTTPConnection.endheaders is	undocumented
In-Reply-To: <1317370143.22.0.297306447289.issue13073@psf.upfronthosting.co.za>
Message-ID: <1317374630.2.0.900302220382.issue13073@psf.upfronthosting.co.za>


Changes by Senthil Kumaran :


----------
assignee: docs at python -> orsenthil
nosy: +orsenthil

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 11:24:15 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Fri, 30 Sep 2011 09:24:15 +0000
Subject: [docs] [issue13075] PEP-0001 contains dead links
In-Reply-To: <1317374485.54.0.239839552518.issue13075@psf.upfronthosting.co.za>
Message-ID: <1317374655.79.0.721881023697.issue13075@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +ezio.melotti
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 15:45:45 2011
From: report at bugs.python.org (Geoffrey Bache)
Date: Fri, 30 Sep 2011 13:45:45 +0000
Subject: [docs] [issue13076] Bad links to 'time' in datetime documentation
In-Reply-To: <1317390308.93.0.874341309843.issue13076@psf.upfronthosting.co.za>
Message-ID: <1317390345.56.0.43202459351.issue13076@psf.upfronthosting.co.za>


Changes by Geoffrey Bache :


----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 15:48:03 2011
From: report at bugs.python.org (R. David Murray)
Date: Fri, 30 Sep 2011 13:48:03 +0000
Subject: [docs] [issue13076] Bad links to 'time' in datetime documentation
In-Reply-To: <1317390308.93.0.874341309843.issue13076@psf.upfronthosting.co.za>
Message-ID: <1317390483.32.0.743190699411.issue13076@psf.upfronthosting.co.za>


Changes by R. David Murray :


----------
stage:  -> needs patch
versions:  -Python 2.6, Python 3.1, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 17:30:42 2011
From: report at bugs.python.org (etuardu)
Date: Fri, 30 Sep 2011 15:30:42 +0000
Subject: [docs] [issue13077] Unclear behavior of daemon threads on main
	thread exit
Message-ID: <1317396642.03.0.535538271179.issue13077@psf.upfronthosting.co.za>


New submission from etuardu :

The definition of daemon thread in the current documentation reads:

?A thread can be flagged as a "daemon thread". The significance of this flag is that the entire Python program exits when only daemon threads are left. [...]?
(http://docs.python.org/library/threading.html#thread-objects)

I think it's not very clear from this that daemon threads themselves terminate when the program (main thread plus other non-daemon threads) terminates. I think this have to be said more explicitly. I'd propose a change with something like:

?A thread can be flagged as a "daemon thread", which means it will get shut down when the overall program terminates. The entire Python program exits when only daemon threads are left.?

----------
assignee: docs at python
components: Documentation
messages: 144691
nosy: docs at python, etuardu
priority: normal
severity: normal
status: open
title: Unclear behavior of daemon threads on main thread exit
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 17:42:49 2011
From: report at bugs.python.org (R. David Murray)
Date: Fri, 30 Sep 2011 15:42:49 +0000
Subject: [docs] [issue13077] Unclear behavior of daemon threads on main
	thread exit
In-Reply-To: <1317396642.03.0.535538271179.issue13077@psf.upfronthosting.co.za>
Message-ID: <1317397369.0.0.79874621126.issue13077@psf.upfronthosting.co.za>


R. David Murray  added the comment:

It seems clear enough to me that when a process terminates ("the entire Python program exits") then all of its threads must terminate.  That's part of the definition of threads, to my understanding.

I think the confusion arises from the use of the word "deamon", which has been discussed as a bad thing elsewhere in this tracker.  A unix user would expect a "daemon" to keep running in the background, whereas here it is exactly the opposite.  See issue 5906 for example, where in the context of Multiprocessing it becomes even more confusing.  Perhaps a similar note that 'daemon' does not mean what it does in unix would be a good idea.

----------
nosy: +r.david.murray
stage:  -> patch review
versions:  -Python 2.6, Python 3.1, Python 3.4

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 19:19:11 2011
From: report at bugs.python.org (Vlad Riscutia)
Date: Fri, 30 Sep 2011 17:19:11 +0000
Subject: [docs] [issue12880] ctypes: clearly document how structure bit
	fields are	allocated
In-Reply-To: <1314930851.91.0.112444630543.issue12880@psf.upfronthosting.co.za>
Message-ID: <1317403151.53.0.993055557363.issue12880@psf.upfronthosting.co.za>


Vlad Riscutia  added the comment:

Attached doc update against tip (though I still hope my patch for configurable allocation strategies will make it in). 

This is my first doc patch so let me know if I missed something. I am basically explaining that bit field allocation is compiler-specific and no assumptions should be made of how a bitfield is allocated. 

I believe this is the better thing to do rather than detailing how GCC and MSVC allocated their bitfields because that would just encourage people to use this feature incorrectly. Most bugs opened on bit fields are because people are toying with the underlying buffer and get other results than what they expect. IMO, when using bitfields one should only access the structure members at a high level and not go read/write the raw memory underneath.

----------
keywords: +patch
Added file: http://bugs.python.org/file23275/bitfield_doc.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 19:51:59 2011
From: report at bugs.python.org (ojab)
Date: Fri, 30 Sep 2011 17:51:59 +0000
Subject: [docs] [issue13079] Wrong datetime format in PEP3101
Message-ID: <1317405119.65.0.993211188436.issue13079@psf.upfronthosting.co.za>


New submission from ojab :

Example in pep3101 is
"Today is: {0:a b d H:M:S Y}".format(datetime.now())
but it should be 
"Today is: {0:%a %b %d %H:%M:%S %Y}".format(datetime.now())

----------
assignee: docs at python
components: Documentation
messages: 144698
nosy: docs at python, ojab
priority: normal
severity: normal
status: open
title: Wrong datetime format in PEP3101
type: behavior
versions: 3rd party

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 21:42:19 2011
From: report at bugs.python.org (Ezio Melotti)
Date: Fri, 30 Sep 2011 19:42:19 +0000
Subject: [docs] [issue13079] Wrong datetime format in PEP3101
In-Reply-To: <1317405119.65.0.993211188436.issue13079@psf.upfronthosting.co.za>
Message-ID: <1317411739.22.0.60759668914.issue13079@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
nosy: +eric.smith, ezio.melotti

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 21:55:44 2011
From: report at bugs.python.org (Eric Snow)
Date: Fri, 30 Sep 2011 19:55:44 +0000
Subject: [docs] [issue13075] PEP-0001 contains dead links
In-Reply-To: <1317374485.54.0.239839552518.issue13075@psf.upfronthosting.co.za>
Message-ID: <1317412544.48.0.304587493408.issue13075@psf.upfronthosting.co.za>


Eric Snow  added the comment:

"Maybe some of them are already superseded, but even then I think they have at least historical value and should be kept on python.org."

+1

----------
nosy: +eric.snow

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Sep 30 22:36:55 2011
From: report at bugs.python.org (Eric V. Smith)
Date: Fri, 30 Sep 2011 20:36:55 +0000
Subject: [docs] [issue13079] Wrong datetime format in PEP3101
In-Reply-To: <1317405119.65.0.993211188436.issue13079@psf.upfronthosting.co.za>
Message-ID: <1317415015.2.0.851327510418.issue13079@psf.upfronthosting.co.za>


Eric V. Smith  added the comment:

Thanks for the report. Fixed in 9a9bd05b9fca.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From deidaramail at gmail.com  Thu Sep 29 06:12:32 2011
From: deidaramail at gmail.com (akatsuki deidara)
Date: Thu, 29 Sep 2011 06:12:32 +0200
Subject: [docs] Epub and A5
Message-ID: 

Hi. Is it possible to have an epub version or an A5 version of the
documentations?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From kmichael.aye at gmail.com  Tue Sep 27 11:50:38 2011
From: kmichael.aye at gmail.com (K.-Michael Aye)
Date: Tue, 27 Sep 2011 11:50:38 +0200
Subject: [docs] Scrollbar in Lion/Safari
Message-ID: <543BCBA4-32A3-493A-88CA-38E9E2483C68@gmail.com>

Dear PythonDoc Team,

in Mac OSX 'Lion', the Safari Browser usually changes the color of the scrollbar automatically to be visible on different backgrounds.
This does not work for docs.python.org currently.
Is there maybe some css hacking required or possible to enable this?

Best regards,
Michael Aye



From paulkoning at comcast.net  Thu Sep 29 03:13:06 2011
From: paulkoning at comcast.net (Paul Koning)
Date: Wed, 28 Sep 2011 21:13:06 -0400
Subject: [docs] "sane" tzinfo subclasses
In-Reply-To: <20110928234921.GG4665@mathmagic>
References: 
	<20110928234921.GG4665@mathmagic>
Message-ID: 


On Sep 28, 2011, at 7:49 PM, Senthil Kumaran wrote:

> On Sun, Sep 18, 2011 at 09:04:16PM -0400, Paul Koning wrote:
>> Gentlepeople,
>> 
>> Section 8.1.6 of the library manual talks about
>> utcoffset(dt)-dst(dt) as the "standard offset" and says that this
>> should not depend on the date or time but only on the location.
> 
> What would be good note to add to explain that? IIRC, someone at the
> top when dealing with datetime and timezones Python docs already
> mentions that it cannot be relied up completely, because timezone
> rules changes sometimes due to politics of the land.
> 
> -- 
> Senthil

I would just get rid of that statement, because it isn't supported by the reality of how timezones are defined.

The larger question is in the doc's claim that datetime.astimezone() relies on this assumption.  Does it really?  If yes, why?  Given that the assumption is not valid, is astimezone() in fact broken?  

That's possibly a code issue rather than a doc issue (if the doc correctly stated the dependence).

	paul