On Tuesday, March 19, 2019 at 9:49:48 PM UTC-5, Chris Angelico wrote:
> I would recommend parsing in two broad steps, as CPython does:
>
> 1) Take the source code and turn it into an abstract syntax tree
> (AST). This conceptualizes the behaviour of the code more-or-less the
> way the programmer w
On Wed, Mar 20, 2019 at 1:31 PM wrote:
>
> On Tuesday, March 19, 2019 at 3:48:27 PM UTC-5, Chris Angelico wrote:
> > > I can see in vartest() that it's using a LOAD_GLOBAL for that, yet
> > > first() and second() don't go searching upstairs for a meow variable.
> > > What is the basis behind thi
On Tuesday, March 19, 2019 at 3:48:27 PM UTC-5, Chris Angelico wrote:
> > I can see in vartest() that it's using a LOAD_GLOBAL for that, yet first()
> > and second() don't go searching upstairs for a meow variable. What is the
> > basis behind this?
> >
>
> Both first() and second() assign to th
On Wed, Mar 20, 2019 at 7:23 AM wrote:
>
> I got hit on the head and decided to try to write something of a Python
> interpreter for embedding. I'm starting to get into the ugly stuff like
> scoping. This has been a good way to learn the real deep details of the
> language. Here's a situation:
I got hit on the head and decided to try to write something of a Python
interpreter for embedding. I'm starting to get into the ugly stuff like
scoping. This has been a good way to learn the real deep details of the
language. Here's a situation:
>>> meow = 10
>>> def vartest():
... x = 1
..