Re: random.gauss vs. random.normalvariate

2009-08-15 Thread John Haggerty
On Sat, Aug 15, 2009 at 7:23 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote: On Sat, 15 Aug 2009 14:34:36 -0600, John Haggerty bouncy...@gmail.com declaimed the following in gmane.comp.python.general: What does the term thread safe mean exactly. I never had to program with threads

Re: ignored test cases in unittest

2009-08-15 Thread Terry Yin
Yes, should be more than 200. But now 187+ are running (some are 'ignored').It's a personal project, I just don't feel safe without all the testing as it grows bigger and bigger. On Sun, Aug 16, 2009 at 11:40 AM, John Haggerty bouncy...@gmail.com wrote: So you are saying you have several

Re: random.gauss vs. random.normalvariate

2009-08-15 Thread Paul Rubin
Dennis Lee Bieber wlfr...@ix.netcom.com writes: No language can guard against independent access of a shared/global object by multiple threads... Erlang? -- http://mail.python.org/mailman/listinfo/python-list

Re: random.gauss vs. random.normalvariate

2009-08-15 Thread John Haggerty
Erlang I assume is a computer programming language? On Sat, Aug 15, 2009 at 10:18 PM, Paul Rubin http://phr...@nospam.invalidwrote: Dennis Lee Bieber wlfr...@ix.netcom.com writes: No language can guard against independent access of a shared/global object by multiple threads...

Re: Python or ActionScript 3.0

2009-08-15 Thread Sebastian Bassi
On Sat, Aug 15, 2009 at 10:29 PM, Douglas Alandarkwate...@gmail.com wrote: Python doesn't run in your typical web browser, but it is common to use Python for doing the server-side programming, along with a Python- based web development framework, such as Django. You could use Jython to make a

Re: Komodo(!)

2009-08-15 Thread Kee Nethery
On Aug 14, 2009, at 1:55 PM, William wrote: Personally, I rather like Wing I tried Wing and basically as a newbie, there were too many setup parameters that I did not know how to set correctly and I could never get it to work for me. It runs under X11 and I guess that was just a bit

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Steven D'Aprano
On Sat, 15 Aug 2009 20:00:23 -0700, Douglas Alan wrote: So, as far as I can tell, Python has no real authority to throw stones at C++ on this little tiny particular issue. I think you're being a tad over-defensive. I asked a genuine question about a quote in somebody's signature. That's a

Re: redoing libgmail interface to smtplib blah?

2009-08-15 Thread John Haggerty
I did detect one problem thus far File test.py, line 152 if len(args) == 1 and args[0] = -c: On Sat, Aug 15, 2009 at 7:23 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote: On Sat, 15 Aug 2009 14:23:26 -0600, John Haggerty bouncy...@gmail.com declaimed the following in

Re: Python or ActionScript 3.0

2009-08-15 Thread Michel Claveau - MVP
Hi! Python doesn't run in your typical web browser Yes, Python can do it... on Windows. Two (examples) ways: - ActiveScripting (PythonScript), include in PyWin32 - Gestalt (who mix Python, Ruby Javascript, via Silverlight) And alse, these two solutions run OK in HTA (HTml Application) for

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-15 Thread Douglas Alan
On Aug 16, 1:05 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 15 Aug 2009 20:00:23 -0700, Douglas Alan wrote: So, as far as I can tell, Python has no real authority to throw stones at C++ on this little tiny particular issue. I think you're being a tad

Xah's Edu Corner: The importance of syntax notations.

2009-08-15 Thread Xah Lee
Xah's Edu Corner: The importance of syntax notations. http://www.stephenwolfram.com/publications/recent/mathml/mathml_abstract.html this article should teach the coding sophomorons and computer “science” idiotic authors who harbor the notion that syntax is not important, picked up by all the

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Okay, I do not think this has been fixed yet. Anyone calling getresponse() can indeed use buffering=True, it can mess things up if the do not close the connection afterwards. The addition of the sockbuf parameter to HTTPConnection as proposed

[issue6117] Fix O(n**2) performance problem in socket._fileobject

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: backported to release26-maint in r74456. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6117 ___

[issue4879] Allow buffering for HTTPResponse

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I believe there will be a problem with the patch committed in r68532. If getresponse(buffering=True) is called, extra data on the socket may be consumed by the socket.makefile() buffer which will cause problems if the connection is not closed

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Mark Summerfield
Mark Summerfield m...@qtrac.eu added the comment: Hi, I've noticed 3 differences between the re and regex engines. I don't know if they are intended or not, but thought it best to mention them. (I used the issue2636-20090810#3.zip version.) Python 2.6.2 (r262:71600, Apr 20 2009, 09:25:38)

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Why not allow True or an integer as values for a buffer_size parameter to the HTTPConnection constructor. False would be the default, which would mean no buffering as currently is the case. True would mean use buffering of the default

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: I agree that the C type 'char' is a byte, not a character. So Python3 should creates a Python bytes object for the ctypes c_char_p type. Since Python 3.1 is out, is it too late to change it in the 3.x branch? :-) Maybe for Python 3.2? I

[issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32

2009-08-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: srid, I'm not sure why you added your comment; a couple of sentences explaining where the output you posted comes from (what machine, what version of Python, under what circumstances) would be really useful. If you're able to reproduce

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for this patch, Alexandre! I'm +1 on applying a version of this patch. I'm not convinced that the variable-length part (i.e., fixed_length=None) of int.as_bytes is all that useful; the choices that need to be made about how to

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Eric Eisner
Eric Eisner e...@mit.edu added the comment: Is there some pre-existing naming convention of as_X and fromX? It seems strange that two related functions would have a different use of underscores. -- nosy: +ede ___ Python tracker

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I agree with the comments which were made on the following points: - please use consistent naming (`as_bytes` / `from_bytes`, or `asbytes` / `frombytes`; my preference goes to the former, especially now that we have `bit_length`) - default

[issue1424148] urllib.FancyURLopener.redirect_internal looses data on POST!

2009-08-15 Thread John J Lee
John J Lee jj...@users.sourceforge.net added the comment: If you have a feature request, please open a separate ticket. This one is about an alleged bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424148

[issue6707] dir() on __new__'d module w/o dict crashes 2.6.2

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks for the report! Fixed in r74457. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6707

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: Simplification of mark's first two problems: Problem 1: looks like regex's negative look-head assertion is broken re.findall(r'(?!a)\w', 'abracadabra') ['b', 'r', 'c', 'd', 'b', 'r'] regex.findall(r'(?!a)\w', 'abracadabra') []

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I agree that it's a bug. Letting Benjamin decide whether to put it in 3.1.1 :) -- assignee: theller - benjamin.peterson nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Sounds ok to me. 2009/8/15 Georg Brandl rep...@bugs.python.org: Georg Brandl ge...@python.org added the comment: I agree that it's a bug.  Letting Benjamin decide whether to put it in 3.1.1 :) -- assignee: theller -

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-08-15 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: issue2636-20090815.zip fixes the bugs found in msg91598 and msg91607. The regex engine currently lacks some of the optimisations that the re engine has, but I've concluded that even with them the extra work that the engine needs

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I agree that it's a bug. Letting Benjamin decide whether to put it in 3.1.1 :) And what about 3.0.x? Is this branch still alive or not? -- ___ Python tracker rep...@bugs.python.org

[issue6239] c_char_p return value returns string, not bytes

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2009/8/15 STINNER Victor rep...@bugs.python.org: STINNER Victor victor.stin...@haypocalc.com added the comment: I agree that it's a bug. Letting Benjamin decide whether to put it in 3.1.1 :) And what about 3.0.x? Is this branch

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The reason is that users expect gc.collect() to make its best to diminish memory use. Clearing free lists can allow deallocting some arenas which otherwise would still contain some used memory blocks. As the comment says: /* Clear all free lists

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It's certainly possible to do so, do you have a patch? -- nosy: +pitrou, rhettinger priority: - normal stage: - needs patch type: - performance ___ Python tracker rep...@bugs.python.org

[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces

2009-08-15 Thread Senthil
Senthil orsent...@gmail.com added the comment: Fixed and Committed revision 74462 -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6557 ___

[issue1023290] proposed struct module format code addition

2009-08-15 Thread Josiah Carlson
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: I'm not a big fan of the names, but as long as the functionality exists, people can easily alias them as necessary. I've not actually looked at the patch, but as long as it does what it says it does, it looks good. My only

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Anything that adds a new parameter can not be backported to 2.6 as that counts as an API change / feature addition. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2576

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The reason is that users expect gc.collect() to make its best to diminish memory use. I thought GC was expected to eliminate reference cycles. Perhaps there ought to be a separate API, such as sys.clear_freelists(), to

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton
New submission from Jim Fulton j...@zope.com: I've attached a script that demonstrates the problem. When run with Python 2.5, it outputs statistics. When run with Python 2.6.2 it generates a TypeError: python2.6 hotshotbug.py Traceback (most recent call last): File hotshotbug.py, line 5, in

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2009-08-15 Thread Jim Fulton
Jim Fulton j...@zope.com added the comment: Fred might be interested. :) -- nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6710 ___

[issue4879] Allow buffering for HTTPResponse

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: trunk r74463 now forces the HTTPResponse to close afterwards when buffering=True to avoid the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4879

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: trunk r74463 now forces the HTTPResponse with buffering=True to close afterwards using a HTTPResponse._must_close flag similar to what was suggested in buffered_socket.diff in this issue. -- ___

[issue6695] PyXXX_ClearFreeList for dict, set, and list

2009-08-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le samedi 15 août 2009 à 22:06 +, Raymond Hettinger a écrit : Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The reason is that users expect gc.collect() to make its best to diminish memory use. I thought GC

[issue6704] better col_offset for AST in statements like for a, b in ...

2009-08-15 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks for the patch! Commited in r74464. -- nosy: +benjamin.peterson resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6704

[issue2576] httplib read() very slow due to lack of socket buffer

2009-08-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I am also unable to reproduce the reported problem using the pastebin.ca/973578 code. The time to download 400mb from localhost remains the same regardless of buffering=False (default) or True. The problem still exists but it is better

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Alex
Alex alex.gay...@gmail.com added the comment: Antoine, I hope to have some time to write a patch for this in the coming week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6690 ___

[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

2009-08-15 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6690 ___

<    1   2