Re: [Python-Dev] [Python-ideas] What's going on with PEP 448 - Additional Unpacking Generalizations ?

2015-01-20 Thread Guido van Rossum
Thanks very much for your work! I am CC'ing python-dev to see if there are any last calls for PEP 448. Assuming no material objection appear to the new syntax and semantics, I can approve the PEP later this week. To get it committed, you need one of the active committers to give you a code review (

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Neil Girdhar
Okay, I think it's ready for a code review. Would anyone be kind enough to offer comments? On Tue, Jan 20, 2015 at 12:10 PM, Neil Girdhar wrote: > Thanks! > > On Tue, Jan 20, 2015 at 12:09 PM, Benjamin Peterson > wrote: > >> $ ./python Lib/test/test_ast.py -g >> exec_results = [ >> ('Module',

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Benjamin Peterson
$ ./python Lib/test/test_ast.py -g exec_results = [ ('Module', [('Expr', (1, 0), ('NameConstant', (1, 0), None))]), ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, []), [('Pass', (1, 9))], [], None)]), ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Neil Girdhar
Thanks! On Tue, Jan 20, 2015 at 12:09 PM, Benjamin Peterson wrote: > $ ./python Lib/test/test_ast.py -g > exec_results = [ > ('Module', [('Expr', (1, 0), ('NameConstant', (1, 0), None))]), > ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], > None, []), [('Pass', (1, 9))],

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Neil Girdhar
Hi Benjamin, I'm having trouble finding where it is generating the lines below EVERYTHING BELOW IS GENERATED # Neither a call to test_ast nor a make (in case it's generated somewhere else) regenerate those lines if they have been removed. How were those lines generated? Best, Neil O

Re: [Python-Dev] bytes & bytearray

2015-01-20 Thread Trent Nelson
On Tue, Jan 20, 2015 at 11:48:10AM +0200, Paul Sokolovsky wrote: > Hello, > > On Tue, 20 Jan 2015 18:15:02 +1300 > Greg Ewing wrote: > > > Guido van Rossum wrote: > > > On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky > > > mailto:pmis...@gmail.com>> wrote: > > > > > > b.lower_inplace() >

[Python-Dev] Possible "REMOTE HOST IDENTIFICATION HAS CHANGED!" Error.

2015-01-20 Thread Donald Stufft
Just a heads up that people might see a "REMOTE HOST IDENTIFICATION HAS CHANGED!" error when connecting to hg.python.org's SSH (or any other PSF machine). The reason for this is that previously we allowed RSA, ECDSA, and ED25519 host keys. However ECDSA relies on having an unbiased random number g

Re: [Python-Dev] bytes & bytearray

2015-01-20 Thread Guido van Rossum
On Tue, Jan 20, 2015 at 1:48 AM, Paul Sokolovsky wrote: > The point of inplace operations (memoryview's, other stuff already in > Python) is to avoid unneeded memory allocation and copying. For 1Tb > bytearray with 1Tb of RAM, it will be very hard to do. (Ditto for 100K > bytearray with 150K RAM.

Re: [Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2015, at 11:34, Neil Girdhar wrote: > My question first: > test_ast is mostly generated code, but I can't find where it is being > generated. I am pretty sure I know how to fix most of the introduced > problems. Who is generating test_ast?? It generates itself.

[Python-Dev] PEP 448 (almost finished!) — Question regarding test_ast

2015-01-20 Thread Neil Girdhar
My question first: test_ast is mostly generated code, but I can't find where it is being generated. I am pretty sure I know how to fix most of the introduced problems. Who is generating test_ast?? Update: So far, I've done the following: Updated the patch to 3.5 Fixed the grammar to accept fin

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
(in fact, it was Python/getargs.c) On Tue, Jan 20, 2015 at 10:01 AM, Neil Girdhar wrote: > Okay, found it thanks. > > On Tue, Jan 20, 2015 at 9:59 AM, Neil Girdhar > wrote: > >> Good eye! I did the following grep: >> >> ~/cpython: grep -R takes.exac * >> Doc/c-api/bytes.rst: Identical to :c:

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
Okay, found it thanks. On Tue, Jan 20, 2015 at 9:59 AM, Neil Girdhar wrote: > Good eye! I did the following grep: > > ~/cpython: grep -R takes.exac * > Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except > that it takes exactly two > Doc/c-api/unicode.rst: Identical to :c:

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
Good eye! I did the following grep: ~/cpython: grep -R takes.exac * Doc/c-api/bytes.rst: Identical to :c:func:`PyBytes_FromFormat` except that it takes exactly two Doc/c-api/unicode.rst: Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two Doc/library/unittest.mock.rst

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
Sorry, I should have provided more context. Best, Neil On Tue, Jan 20, 2015 at 9:55 AM, Brett Cannon wrote: > > > On Tue Jan 20 2015 at 9:53:52 AM Benjamin Peterson > wrote: > >> >> >> On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote: >> > This is a mailing to discuss the development *of* P

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
Hi Skip, I'm trying to finish the implementation of PEP 448. I have updated the patch to 3.5, fixed the grammar, and the ast. There is a bug with the argument counting or unpacking, which I can't seem to locate. Best, Neil On Tue, Jan 20, 2015 at 9:53 AM, Skip Montanaro wrote: > On Tue, Jan

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Brett Cannon
On Tue Jan 20 2015 at 9:53:52 AM Benjamin Peterson wrote: > > > On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote: > > This is a mailing to discuss the development *of* Python, not its *use*. > > You should be able to get help from python-list or #python on IRC. > > To be fair, he's asking to de

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Stefan Ring
On Tue, Jan 20, 2015 at 3:35 PM, Neil Girdhar wrote: > I get error: > > TypeError: init_builtin() takes exactly 1 argument (0 given) > > The only source file that can generate that error is > Modules/_ctypes/_ctypes.c, but when I make changes to that file such as: > > PyErr_Format(PyExc_Ty

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2015, at 09:51, Brett Cannon wrote: > This is a mailing to discuss the development *of* Python, not its *use*. > You should be able to get help from python-list or #python on IRC. To be fair, he's asking to debug his patch in https://bugs.python.org/issue2292

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Brett Cannon
This is a mailing to discuss the development *of* Python, not its *use*. You should be able to get help from python-list or #python on IRC. On Tue Jan 20 2015 at 9:44:48 AM Neil Girdhar wrote: > I get error: > > TypeError: init_builtin() takes exactly 1 argument (0 given) > > The only source fil

Re: [Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Skip Montanaro
On Tue, Jan 20, 2015 at 8:35 AM, Neil Girdhar wrote: > > I get error: > > TypeError: init_builtin() takes exactly 1 argument (0 given) > > The only source file that can generate that error is > Modules/_ctypes/_ctypes.c, but when I make changes to that file such as: > > PyErr_Format(PyExc

[Python-Dev] How do I ensure that my code is being executed?

2015-01-20 Thread Neil Girdhar
I get error: TypeError: init_builtin() takes exactly 1 argument (0 given) The only source file that can generate that error is Modules/_ctypes/_ctypes.c, but when I make changes to that file such as: PyErr_Format(PyExc_TypeError, "call takes exactly %d arguments XYZA

Re: [Python-Dev] bytes & bytearray

2015-01-20 Thread Paul Sokolovsky
Hello, On Tue, 20 Jan 2015 18:15:02 +1300 Greg Ewing wrote: > Guido van Rossum wrote: > > On Mon, Jan 19, 2015 at 11:43 AM, Paul Sokolovsky > > mailto:pmis...@gmail.com>> wrote: > > > > b.lower_inplace() > > b.lower_i() > > > > Please don't go there. The use cases are too rare. > > An