On Sat, 05 Mar 2005 08:52:38 -0500, Kent Johnson <[EMAIL PROTECTED]>
wrote:
>Manlio Perillo wrote:
>> Anyway, here is an example of what I would like to do:
>>
>> #begin
>> def foo(**kwargs): print kwargs
>>
>> foo(a = 1, b = 2, c = 3)
>> #end
>>
>>
>> In the current implementation kwargs is a
Manlio Perillo wrote:
On 3 Mar 2005 11:15:28 -0800, "Lonnie Princehouse"
<[EMAIL PROTECTED]> wrote:
No. I don't think it's possible to read the parse tree used by the
interpreter, especially as it is being created. Here are a couple of
kludgy ideas that might come close, though:
Is this a 'limit
Manlio Perillo wrote:
Anyway, here is an example of what I would like to do:
#begin
def foo(**kwargs): print kwargs
foo(a = 1, b = 2, c = 3)
#end
In the current implementation kwargs is a dict, but I need to have the
keyword argument sorted.
Unfortunately subclassing fron dict and installing the cl
On 3 Mar 2005 11:15:28 -0800, "Lonnie Princehouse"
<[EMAIL PROTECTED]> wrote:
>No. I don't think it's possible to read the parse tree used by the
>interpreter, especially as it is being created. Here are a couple of
>kludgy ideas that might come close, though:
Is this a 'limitation' of the curre
No. I don't think it's possible to read the parse tree used by the
interpreter, especially as it is being created. Here are a couple of
kludgy ideas that might come close, though:
1. Use introspection to have your on_parsing function locate the and
parse the code being executed. I'm not sure if
Hi.
With module parser it is possible to access Python parse trees.
But this only works for 'external' source.
I would like to known if, at least in theory, it can be possible to
access Python parse trees from 'inside' a script.
As a simple example:
def on_parsing(ast):
...
@parsing -> on_pa