| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fixes #12.
|
this is a WIP. @ncw, for dir(), I need to be able to get at the content of the local scope. |
Sorry, something went wrong.
|
The way I've done that in the past, eg for implementing locals() is to implement them as InternalMethods. Eg here is where the magic is... Lines 1578 to 1600 in eaa7d28 This is where the other magic is! $ git grep InternalMethodLocals
builtin/builtin.go: py.MustNewMethod("locals", py.InternalMethodLocals, 0, locals_doc),
py/method.go: InternalMethodLocals
vm/eval.go: case py.InternalMethodLocals:
That is the only way I could find to avoid using global variables etc. It might be too limiting eventually. |
Sorry, something went wrong.
|
@sbinet after the py.Context merge, I could look at this out if we think dir() is worth it. |
Sorry, something went wrong.
|
@sbinet lmk if this is worth adding/improving so we can work towards a cleared PR section. Also, any suggestions on the next version/tag? I think we're worthy of a 0.1 or 1.0 -- open to discussion. |
Sorry, something went wrong.
|
in order to get the nice discoverability look and feel of CPython into gpython, having a working dir() builtin is definitely a plus. but as we survived w/o it for almost 4 years, I don't think cleaning up this PR should be a blocker for the next tagged version of gpython. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #12.