Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-15 Thread Guido van Rossum
You got your snswer 16 hours ago on S.O. On Monday, April 15, 2013, Nikolaus Rath wrote: > Brian Curtin > writes: > > On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath > > > > wrote: > >> [ Note: I already asked this on > >> http://stackoverflow.com/questions/15917502 but didn't get any > >> satis

Re: [Python-Dev] Destructors and Closing of File Objects

2013-04-15 Thread Nikolaus Rath
Brian Curtin writes: > On Fri, Apr 12, 2013 at 12:04 AM, Nikolaus Rath wrote: >> [ Note: I already asked this on >> http://stackoverflow.com/questions/15917502 but didn't get any >> satisfactory answers] > > Sorry, but that's not a reason to repost your question to this list. > If you have to ask

[Python-Dev] mimetypes broken on Windows

2013-04-15 Thread Ben Hoyt
Hi folks, The built-in mimetypes module is broken on Windows, and it has been since Python 2.7 alpha 1. On all Windows systems I've tried, guess_type() returns the wrong mime type for common types like .png and .jpg. For example (on Python 2.7.4 and 3.3.1): >>> import mimetypes >>> mimetypes.gues

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Glenn Linderman
On 4/15/2013 4:21 PM, Larry Hastings wrote: On 04/15/2013 09:31 AM, Eli Bendersky wrote: Would it make sense to think about adding this in the scope of the argument clinic work, or is it too unrelated? This seems like a commonly needed thing for large parts of the stdlib (where the C accelerat

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Larry Hastings
On 04/15/2013 09:31 AM, Eli Bendersky wrote: Would it make sense to think about adding this in the scope of the argument clinic work, or is it too unrelated? This seems like a commonly needed thing for large parts of the stdlib (where the C accelerator overrides Python code). From my perspect

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Alexandre Vassalotti
On Mon, Apr 15, 2013 at 12:56 AM, David Lam wrote: > I tried to find an example in the source which addressed this, but > found that the docstrings in similar cases to be largely duplicated. > I find this annoying too. It would be nice to have a common way to share docstrings between C and Pytho

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Skip Montanaro
> Would it make sense to think about adding this in the scope of the argument > clinic work, or is it too unrelated? This seems like a commonly needed thing > for large parts of the stdlib (where the C accelerator overrides Python > code). Or maybe separate doc strings from both code bases altoget

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Joao S. O. Bueno
On 15 April 2013 13:31, Eli Bendersky wrote: > > > > On Mon, Apr 15, 2013 at 3:45 AM, Nick Coghlan wrote: >> >> On Mon, Apr 15, 2013 at 8:17 PM, Maciej Fijalkowski >> wrote: >> > On Mon, Apr 15, 2013 at 9:56 AM, David Lam >> > wrote: >> >> I tried to find an example in the source which addresse

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Eli Bendersky
On Mon, Apr 15, 2013 at 3:45 AM, Nick Coghlan wrote: > On Mon, Apr 15, 2013 at 8:17 PM, Maciej Fijalkowski > wrote: > > On Mon, Apr 15, 2013 at 9:56 AM, David Lam > wrote: > >> I tried to find an example in the source which addressed this, but > >> found that the docstrings in similar cases to

Re: [Python-Dev] Deciding against the CLA

2013-04-15 Thread Guido van Rossum
Can we get this discussion off python-dev? It's not going to change, and this is not the forum to express your disagreement. On Mon, Apr 15, 2013 at 12:15 AM, Ben Finney wrote: > Steven D'Aprano writes: > >> On 13/04/13 20:30, Ben Finney wrote: >> > "Stephen J. Turnbull" writes: >> >> A failur

Re: [Python-Dev] [Python-checkins] cpython: Issue #17693: CJK encoders now use the new Unicode API (PEP 393)

2013-04-15 Thread Nick Coghlan
On Mon, Apr 15, 2013 at 3:36 AM, Victor Stinner wrote: > Hi, > > 2013/4/14 Nick Coghlan : >> On Sun, Apr 14, 2013 at 10:06 AM, victor.stinner >> wrote: >>> http://hg.python.org/cpython/rev/d621bdaed7c3 >>> changeset: 83317:d621bdaed7c3 >>> user:Victor Stinner >>> date:Sun Apr 1

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Nick Coghlan
On Mon, Apr 15, 2013 at 8:17 PM, Maciej Fijalkowski wrote: > On Mon, Apr 15, 2013 at 9:56 AM, David Lam wrote: >> I tried to find an example in the source which addressed this, but >> found that the docstrings in similar cases to be largely duplicated. >> For instance, _datetimemodule.c, decimal_

Re: [Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread Maciej Fijalkowski
On Mon, Apr 15, 2013 at 9:56 AM, David Lam wrote: > Recently I helped out on issue16954 which involved filling in docstrings > for methods and classes in ElementTree.py > > While doing so, I tried to test my work in the interpreter like this... > > >>> from xml.etree.ElementTree import Element

Re: [Python-Dev] Deciding against the CLA

2013-04-15 Thread Stephen J. Turnbull
Ben Finney writes: > As it currently stands, the Contributor Agreement grants special > legal privilege in the work (the power to unilaterally re-license > the work) to the PSF. "I hate to disagree, Sir, but that turns out to be incorrect."[0] First, it's not the Contributor Agreement, it's t

Re: [Python-Dev] Deciding against the CLA

2013-04-15 Thread Glenn Linderman
On 4/15/2013 12:15 AM, Ben Finney wrote: Steven D'Aprano writes: On 13/04/13 20:30, Ben Finney wrote: "Stephen J. Turnbull" writes: A failure to sign the CLA is already a decision not to contribute to the distribution As someone who cannot in good faith sign the CLA, that characterisation

[Python-Dev] Sharing docstrings between the Python and C implementations of a module

2013-04-15 Thread David Lam
Recently I helped out on issue16954 which involved filling in docstrings for methods and classes in ElementTree.py While doing so, I tried to test my work in the interpreter like this... >>> from xml.etree.ElementTree import Element >>> help(Element) ...but found that help() showed nothi

Re: [Python-Dev] Deciding against the CLA

2013-04-15 Thread Ben Finney
Steven D'Aprano writes: > On 13/04/13 20:30, Ben Finney wrote: > > "Stephen J. Turnbull" writes: > >> A failure to sign the CLA is already a decision not to contribute > >> to the distribution > > > > As someone who cannot in good faith sign the CLA, that > > characterisation is far from accurat