Re: [Python-Dev] Any grammar experts?

2015-01-25 Thread R. David Murray
On Mon, 26 Jan 2015 01:21:24 +0100, Antoine Pitrou wrote: > On Sun, 25 Jan 2015 14:59:42 -0800 > Guido van Rossum wrote: > > On Sun, Jan 25, 2015 at 7:32 AM, Georg Brandl wrote: > > > > > On 01/25/2015 04:08 PM, Antoine Pitrou wrote: > > > > On Sat, 24 Jan 2015 21:10:51 -0500 > > > > Neil Girdh

Re: [Python-Dev] Any grammar experts?

2015-01-25 Thread Antoine Pitrou
On Sun, 25 Jan 2015 14:59:42 -0800 Guido van Rossum wrote: > On Sun, Jan 25, 2015 at 7:32 AM, Georg Brandl wrote: > > > On 01/25/2015 04:08 PM, Antoine Pitrou wrote: > > > On Sat, 24 Jan 2015 21:10:51 -0500 > > > Neil Girdhar wrote: > > >> To finish PEP 448, I need to update the grammar for syn

Re: [Python-Dev] Disassembly of generated comprehensions

2015-01-25 Thread Nick Coghlan
On 26 Jan 2015 07:58, "Greg Ewing" wrote: > > Petr Viktorin wrote: >> >> On Sun, Jan 25, 2015 at 12:55 PM, Neil Girdhar wrote: >> >>> How do I disassemble a generated comprehension? >>> >> Put it in a function, then get it from the function's code's constants. > > > It would be handy if dis had a

Re: [Python-Dev] Any grammar experts?

2015-01-25 Thread Guido van Rossum
On Sun, Jan 25, 2015 at 7:32 AM, Georg Brandl wrote: > On 01/25/2015 04:08 PM, Antoine Pitrou wrote: > > On Sat, 24 Jan 2015 21:10:51 -0500 > > Neil Girdhar wrote: > >> To finish PEP 448, I need to update the grammar for syntax such as > >> > >> {**x for x in it} > > > > Is this seriously allowe

Re: [Python-Dev] Why are generated files in the repository?

2015-01-25 Thread Nick Coghlan
On 26 Jan 2015 02:33, "R. David Murray" wrote: > > On Sun, 25 Jan 2015 14:00:57 +1000, Nick Coghlan wrote: > > It's far more developer friendly to aim to have builds from a source > > check-out "just work" if we can. That's pretty much where we are today > > (getting external dependencies for the

Re: [Python-Dev] Disassembly of generated comprehensions

2015-01-25 Thread Greg Ewing
Petr Viktorin wrote: On Sun, Jan 25, 2015 at 12:55 PM, Neil Girdhar wrote: How do I disassemble a generated comprehension? Put it in a function, then get it from the function's code's constants. It would be handy if dis had an option to disassemble nested functions like this automatically.

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Cyd Haselton
Thanks...this looks interesting Antonio. I'm not familiar enough with Makefile syntax and creation to know if this can help in my case and (fingers crossed) I believe I've just about solved my original undefined reference to dlopen problem, but I'll be bookmarking it for future reference (and in c

Re: [Python-Dev] Why are generated files in the repository?

2015-01-25 Thread R. David Murray
On Sun, 25 Jan 2015 14:00:57 +1000, Nick Coghlan wrote: > It's far more developer friendly to aim to have builds from a source > check-out "just work" if we can. That's pretty much where we are today > (getting external dependencies for the optional parts on *nix can still be > a bit fiddly - it m

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Cyd Haselton
Since (judging from the lack of responses) setup.py can't be removed from the Makefile, I kept troubleshooting.I've managed to get the build to complete and make install runs instead of throwing an undefined reference right off the bat, unfortunately I've run into the following: ImportError: No mo

Re: [Python-Dev] Disassembly of generated comprehensions

2015-01-25 Thread Petr Viktorin
On Sun, Jan 25, 2015 at 12:55 PM, Neil Girdhar wrote: > How do I disassemble a generated comprehension? > > For example, I am trying to debug the following: > dis.dis('{**{} for x in [{1:2}]}') > 1 0 LOAD_CONST 0 ( at > 0x10160b7c0, file "", line 1>) >

Re: [Python-Dev] Any grammar experts?

2015-01-25 Thread Georg Brandl
On 01/25/2015 04:08 PM, Antoine Pitrou wrote: > On Sat, 24 Jan 2015 21:10:51 -0500 > Neil Girdhar wrote: >> To finish PEP 448, I need to update the grammar for syntax such as >> >> {**x for x in it} > > Is this seriously allowed by the PEP? What does it mean exactly? It appears to go a bit far.

Re: [Python-Dev] Any grammar experts?

2015-01-25 Thread Antoine Pitrou
On Sat, 24 Jan 2015 21:10:51 -0500 Neil Girdhar wrote: > To finish PEP 448, I need to update the grammar for syntax such as > > {**x for x in it} Is this seriously allowed by the PEP? What does it mean exactly? Regards Antoine. ___ Python-Dev maili

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Antoine Pitrou
On Sun, 25 Jan 2015 05:22:48 + "Gregory P. Smith" wrote: > Why doesn't our Makefile supply that flag with the make parallelism level > in the sharedmods step? If I run "make -j4" here, it works (on the default branch). Regards Antoine. ___ Python-

Re: [Python-Dev] Disassembly of generated comprehensions

2015-01-25 Thread Neil Girdhar
Perfect, thanks! On Sun, Jan 25, 2015 at 7:08 AM, Petr Viktorin wrote: > On Sun, Jan 25, 2015 at 12:55 PM, Neil Girdhar > wrote: > > How do I disassemble a generated comprehension? > > > > For example, I am trying to debug the following: > > > dis.dis('{**{} for x in [{1:2}]}') > > 1

[Python-Dev] Disassembly of generated comprehensions

2015-01-25 Thread Neil Girdhar
How do I disassemble a generated comprehension? For example, I am trying to debug the following: >>> dis.dis('{**{} for x in [{1:2}]}') 1 0 LOAD_CONST 0 ( at 0x10160b7c0, file "", line 1>) 3 LOAD_CONST 1 ('') 6 MAKE_FUNCTION

Re: [Python-Dev] Why are generated files in the repository?

2015-01-25 Thread Neil Girdhar
That makes sense. Thanks for explaining. On Sun, Jan 25, 2015 at 4:55 AM, Thomas Wouters wrote: > > > On Sun, Jan 25, 2015 at 5:05 AM, Neil Girdhar > wrote: > >> But you can remove Python/graminit.c and "make clean && make" works, >> right? >> > > If you can write to the directory, yes. Except

Re: [Python-Dev] Can Python Be Built Without Distutils

2015-01-25 Thread Antonio Cavallo
I tried a Makefile based build of python (+ some module) in the past for Android (and macos): https://bitbucket.org/cavallo71/android There was no particular problem in dropping autoconfigure+setup.py in the process: the only real problem was the pgen must be compiled on the host machine (b

Re: [Python-Dev] Why are generated files in the repository?

2015-01-25 Thread Thomas Wouters
On Sun, Jan 25, 2015 at 5:05 AM, Neil Girdhar wrote: > But you can remove Python/graminit.c and "make clean && make" works, right? > If you can write to the directory, yes. Except if you build in a way that you can't run pgen on the host system, like in a cross build (this may have been fixed wi