Re: How does python build its AST

2007-12-08 Thread MonkeeSage
On Dec 8, 3:32 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 7, 9:23 am, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > A quick question about how python parses a file into compiled > > bytecode. Does it parse the whole file into AST first and then compile > > the AST, or does it build and compil

Re: How does python build its AST

2007-12-08 Thread Carl Banks
On Dec 7, 9:23 am, MonkeeSage <[EMAIL PROTECTED]> wrote: > A quick question about how python parses a file into compiled > bytecode. Does it parse the whole file into AST first and then compile > the AST, or does it build and compile the AST on the fly as it reads > expressions? (If the former case

Re: How does python build its AST

2007-12-07 Thread MonkeeSage
On Dec 8, 12:20 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "MonkeeSage" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | 1.) What is the benefit of doing a two phase compilation (parsing/ > | compiling), rather than a single, joint parse + compile phase (as in > | interactive

Re: How does python build its AST

2007-12-07 Thread Terry Reedy
"MonkeeSage" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | 1.) What is the benefit of doing a two phase compilation (parsing/ | compiling), rather than a single, joint parse + compile phase (as in | interactive mode)? As far as I know (without looking at the code), there is no di

Re: How does python build its AST

2007-12-07 Thread MonkeeSage
On Dec 7, 4:29 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "MonkeeSage" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > |A quick question about how python parses a file into compiled > | bytecode. Does it parse the whole file into AST first and then compile > | the AST, or does

Re: How does python build its AST

2007-12-07 Thread Terry Reedy
"MonkeeSage" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |A quick question about how python parses a file into compiled | bytecode. Does it parse the whole file into AST first and then compile | the AST, or does it build and compile the AST on the fly as it reads | expressions? (I

Re: How does python build its AST

2007-12-07 Thread Kay Schluehr
On Dec 7, 5:03 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > On Dec 7, 9:50 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > > > On Dec 7, 3:23 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > > A quick question about how python parses a file into compiled > > > bytecode. Does it parse the whole file

Re: How does python build its AST

2007-12-07 Thread Michael Spencer
MonkeeSage wrote: > A quick question about how python parses a file into compiled > bytecode. Does it parse the whole file into AST first and then compile > the AST, or does it build and compile the AST on the fly as it reads > expressions? (If the former case, why can't functions be called before

Re: How does python build its AST

2007-12-07 Thread Jason
On Dec 7, 9:03 am, MonkeeSage <[EMAIL PROTECTED]> wrote: > On Dec 7, 9:50 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > > > On Dec 7, 3:23 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > > A quick question about how python parses a file into compiled > > > bytecode. Does it parse the whole file

Re: How does python build its AST

2007-12-07 Thread MonkeeSage
On Dec 7, 9:50 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On Dec 7, 3:23 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > A quick question about how python parses a file into compiled > > bytecode. Does it parse the whole file into AST first and then compile > > the AST, or does it build and comp

Re: How does python build its AST

2007-12-07 Thread Kay Schluehr
On Dec 7, 3:23 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > A quick question about how python parses a file into compiled > bytecode. Does it parse the whole file into AST first and then compile > the AST, or does it build and compile the AST on the fly as it reads > expressions? (If the former case