rainwoodman / tinypy

tpy, a pet python forked from tinypy
Other
21 stars 5 forks source link

Need to distinguish mget and get #6

Open rainwoodman opened 5 years ago

rainwoodman commented 5 years ago

If we want to support the following syntax, then we need to distinguish mget (metaget) and get:

x = {}
x.update({})

. shall translate to mget, which first check the meta dict;

[] shall translate get, which will first check the dict

rainwoodman commented 5 years ago

This is now supported. But with a quirk:

'update' in x is false, but x['update'] returns a function
rainwoodman commented 5 years ago

Another way to deal with this is that: