[issue7009] random.randint docs

2009-09-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: Not actually a bug. The documentation is correct. Do, random.randint(0,1) a couple of times and you see 1 appearing. If still not convinced, look into the random.py see that randint(a, b) actually does a return self.randrange(a, b+1) -- nosy: +senthil.

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2009-09-27 Thread Charles Cazabon
Charles Cazabon added the comment: Updated patch attached; handles some of the Pool methods that weren't handled before. Now includes documentation and unit test additions as well. -- Added file: http://bugs.python.org/file14987/worker-lifetime-python2.6.2.patch __

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2009-09-27 Thread Charles Cazabon
Changes by Charles Cazabon : Removed file: http://bugs.python.org/file14947/worker-lifetime-python2.6.2.patch ___ Python tracker ___ ___ Python

[issue7009] random.randint docs

2009-09-27 Thread James G. sack (jim)
New submission from James G. sack (jim) : Docs for 2.6.2 (http://docs.python.org/library/random.html? highlight=random#module-random) presently say """ random.randint(a, b) Return a random integer N such that a <= N <= b. """ It should say ...a <= N < b I wonder if there are other mistakes ther

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread Skip Montanaro
Skip Montanaro added the comment: Applied to trunk as rev 75102. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: Got it. Yes, they're the same patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread R. David Murray
R. David Murray added the comment: Thomas, is the patch you uploaded to rietveld the same as the patches attached to the ticket? If so, Skip can just ignore the rietveld and work from the patch files. Rietveld is really more useful for reviews of longer patches than this one; for patches this s

[issue7004] Py_RETURN_BOOL() convenience macro

2009-09-27 Thread Jon Parise
Jon Parise added the comment: I agree, as well. I didn't consider PyBool_FromLong() because I was expecting to solve the problem using a macro, but that is clearly not the best approach here (insignificant function call overhead aside). -- ___ Pytho

[issue6971] Add the SIO_KEEPALIVE_VALS option to socket.ioctl

2009-09-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ported to py3k in revision 75100 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-27 Thread Thomas W. Barr
Thomas W. Barr added the comment: I'm not actually sure where we go from here. This is my first attempted patch to this project, and I was hoping that someone else would be more knowledgeable about the process;-) -- ___ Python tracker

[issue7005] ConfigParser does not handle options without values

2009-09-27 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: The test "value is not None" in line 620 (of the new version) could be just "value" and get a little more value from less code. I don't think I've ever run across a sample .ini-style file that used unspecified values, though it's frequently done in "flat" c

[issue7005] ConfigParser does not handle options without values

2009-09-27 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue6515] http://docs.python.org/dev/library/unittest.html#load-tests-protocol doesn't make it clear when load_tests support was introduced

2009-09-27 Thread Michael Foord
Michael Foord added the comment: Committed revision 75098. Re-open if you think this isn't sufficient. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ _

[issue6956] Test creation in unittest.TestProgram should be done in one place

2009-09-27 Thread Michael Foord
Michael Foord added the comment: Committed in revision 75095. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue7008] str.title() misbehaves with apostrophes

2009-09-27 Thread Nick Devenish
New submission from Nick Devenish : str.title() capitalizes the first letter after an apostrophe: >>> "This isn't right".title() "This Isn'T Right" The library function string.capwords, which appears to have exactly the same responsibility, doesn't exhibit this behavior: >>> string.capwords("T

[issue7007] Tiny inconsistency in the orthography of "url encoded" in the doc of urllib.parse

2009-09-27 Thread Mitchell Model
New submission from Mitchell Model : The documentation of urllib.parse contains: URL encoded a “url-encoded” string I am not sure what the official usage is, either in Python or more generally. Actually, in formal W3C documents the term used is percent- encoding (with the hyphen, even wh

[issue4887] environment inspection and manipulation API is buggy, inconsistent with "Python philosophy" for wrapping native APIs

2009-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-09-27 Thread Milko Krachounov
Milko Krachounov added the comment: My suggestion is not only unreadable, but wrong. It's even less accurate than hasattr(x, '__call__'), as it doesn't look in all the classes in the MRO. Using isinstance(x, collections.Callable) should probably be the correct replacement for 2to3 and situation

[issue5931] Python runtime name hardcoded in wsgiref.simple_server

2009-09-27 Thread Thijs Triemstra
Thijs Triemstra added the comment: Here's a patch that uses platform.python_implementation instead, producing: >>> from wsgiref import simple_server >>> simple_server.software_version 'WSGIServer/0.1 CPython/2.7a0' >>> This will become relevant when Jython and IronPython start using these m

[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-27 Thread Mark Dickinson
Mark Dickinson added the comment: Committed int_decimal_conversion_trunk.patch in r75084. Thanks, Gawain. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-09-27 Thread Ezio Melotti
Ezio Melotti added the comment: In the PEP3100 [1] there's written, in the "to be removed" list: "callable(): just use hasattr(x, '__call__') (?) [2] [done]" and the note refers to a pdf [2] that instead says: "callable(): just call it, already" If callable() was removed to encourage the EA

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2009-09-27 Thread Svetoslav Agafonkin
Svetoslav Agafonkin added the comment: There is an error in r74687 (3.x) and r74688 (3.1) fixes - in the 'else' clause there should be 'return result' at the end. -- nosy: +slavi status: pending -> open ___ Python tracker

[issue6748] test_debuglevel from test_telnetlib.py fails

2009-09-27 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I can still reproduce this test failure after applying patch from r74638. I use Gentoo ~amd64. -- nosy: +Arfrever title: test test_telnetlib failed -> test_debuglevel from test_telnetlib.py fails __

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2009-09-27 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue6071] no longer possible to hash arrays

2009-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The first thing the function does is checking if the object implements > the old buffer api, but also fails if pb->bf_releasebuffer != NULL. So I > guess it's also making sure the new buffer api is not implemented. > > What's the thought behind this? The i

[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-09-27 Thread Milko Krachounov
New submission from Milko Krachounov : hasattr(x, '__call__') has been suggested as a replacement for callable(x) in the documentation and in the warning when running python2.6 with -3. It is also what 2to3 replaces it with. However, the two are not equivalent. 1. I can add a __call__ attribute

[issue7004] Py_RETURN_BOOL() convenience macro

2009-09-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: I agree with Martin; PyBool_FromLong is sufficient. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker __

[issue7004] Py_RETURN_BOOL() convenience macro

2009-09-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: -1. What's wrong with writing return PyBool_FromLong(x); -- nosy: +loewis ___ Python tracker ___ __