Re: [Python-Dev] floatformat vs float_format

2009-01-01 Thread Eric Smith
David Cournapeau wrote: Hi, In python 2.6, there have been some effort to make float formatting more consistent between platforms, which is nice. Unfortunately, there is still one corner case, for example on windows: print a -> print 'inf' print '%f' % a -> print '1.#INF' The difference being

[Python-Dev] patch suggestion for webbrowser

2009-01-01 Thread Yinon Ehrlich
Hi, enclosed a patch for webbrowser which will find applications/batch files ending with .com or .cmd too. Yinon Index: Lib/webbrowser.py === --- Lib/webbrowser.py(revision 68118) +++ Lib/webbrowser.py(working copy) @@ -10

Re: [Python-Dev] patch suggestion for webbrowser

2009-01-01 Thread Oleg Broytmann
On Thu, Jan 01, 2009 at 02:24:02PM +0200, Yinon Ehrlich wrote: > enclosed a patch for webbrowser which will find applications/batch files > ending with .com or .cmd too. Please submit the patch to the issue tracker: http://bugs.python.org/ Oleg. -- Oleg Broytmannhttp://phd.

Re: [Python-Dev] test_subprocess and sparc buildbots

2009-01-01 Thread Georg Brandl
Alexandre Vassalotti schrieb: > On Tue, Dec 30, 2008 at 10:41 PM, Daniel (ajax) Diniz > wrote: >> A reliable way to get that in a --with-pydebug build seems to be: >> >> ~/py3k$ ./python -c "import locale; locale.format_string(1,1)" >> * ob >> object : >> type: tuple >> refcount: 0 >> addre

[Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Ulrich Eckhardt
Hi! There are lots of files that are framed with an extern "C" stanza when compiled under C++. Now, I appreciate that header files are made suitable for use with C++ with that, but WTF are those doing in .c files??? puzzled greetings Uli ___ Python-D

Re: [Python-Dev] test_subprocess and sparc buildbots

2009-01-01 Thread Daniel (ajax) Diniz
Georg Brandl wrote: > > This only occurs --with-pydebug, I assume? For me, on 32 bits Linux, yes, only --with-pydebug*. > It is the same basic problem as in http://bugs.python.org/issue3299, > which I analysed some time ago. Yes, I guess my 'catch' is exactly that. But it might be a red herring

Re: [Python-Dev] test_subprocess and sparc buildbots

2009-01-01 Thread Nick Coghlan
Daniel (ajax) Diniz wrote: > Georg Brandl wrote: >> This only occurs --with-pydebug, I assume? > > For me, on 32 bits Linux, yes, only --with-pydebug*. > >> It is the same basic problem as in http://bugs.python.org/issue3299, >> which I analysed some time ago. > > Yes, I guess my 'catch' is exa

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Nick Coghlan
Ulrich Eckhardt wrote: > Hi! > > There are lots of files that are framed with an extern "C" stanza when > compiled under C++. Now, I appreciate that header files are made suitable for > use with C++ with that, but WTF are those doing in .c files??? I believe it is to allow building the Python s

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Alexander Belopolsky
The relevant revision is r45330: . """ Author: anthony.baxter Date: Thu Apr 13 02:06:09 2006 UTC (2 years, 8 months ago) Log Message: spread the extern "C" { } magic pixie dust around. Python itself builds now using a C++ compiler. Still lots and lo

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Christian Heimes
Alexander Belopolsky schrieb: > The relevant revision is r45330: > . > > """ > Author: anthony.baxter > Date: Thu Apr 13 02:06:09 2006 UTC (2 years, 8 months ago) > Log Message: > spread the extern "C" { } magic pixie dust around. Python itself

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Alexander Belopolsky
On Thu, Jan 1, 2009 at 11:05 PM, Christian Heimes wrote: .. > You might be interested in the bug report > http://bugs.python.org/issue4665. Skip pointed out that Python 2.6 no > longer compiles with a C++ compiler due to missing casts. C++ is more > restrict when it comes to implicit casts from (a

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Adam Olsen
On Thu, Jan 1, 2009 at 10:17 PM, Alexander Belopolsky wrote: > On Thu, Jan 1, 2009 at 11:05 PM, Christian Heimes wrote: > .. >> You might be interested in the bug report >> http://bugs.python.org/issue4665. Skip pointed out that Python 2.6 no >> longer compiles with a C++ compiler due to missing

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Alexander Belopolsky
On Fri, Jan 2, 2009 at 12:58 AM, Adam Olsen wrote: .. > > As C++ has more specific ways of allocating memory, they impose this > restriction to annoy you into using them. And so does Python API: see PyMem_NEW and PyMem_RESIZE macros. > We won't be using them, and the extra casts and nothing but

Re: [Python-Dev] floatformat vs float_format

2009-01-01 Thread David Cournapeau
On Thu, Jan 1, 2009 at 6:43 PM, Eric Smith wrote: > David Cournapeau wrote: >> >> Hi, >> >> In python 2.6, there have been some effort to make float formatting >> more consistent between platforms, which is nice. Unfortunately, there >> is still one corner case, for example on windows: >> >> print

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Adam Olsen
On Thu, Jan 1, 2009 at 11:24 PM, Alexander Belopolsky wrote: > On Fri, Jan 2, 2009 at 12:58 AM, Adam Olsen wrote: > .. >> >> As C++ has more specific ways of allocating memory, they impose this >> restriction to annoy you into using them. > > And so does Python API: see PyMem_NEW and PyMem_RESIZE

Re: [Python-Dev] #ifdef __cplusplus?

2009-01-01 Thread Alexander Belopolsky
On Fri, Jan 2, 2009 at 2:26 AM, Adam Olsen wrote: .. > Compiling as C++ is too obscure of a feature to warrant uglifying the > code. Malloc casts may be hard to defend, but most of python code base already has them, there is little to be gained from having these casts in some places and not other