jepler at inetnebr.com (Jeff Epler) writes: > This particular example can be done with very nearly the same syntax in > standard Python---a dot instead of whitespace between let/set and the > variable in question. > >>> import letset, __main__; letset.setup(__main__) > >>> let.x = 3 > >>> x > 3 > >>> let.x = 4 > Traceback (most recent call last): Thanks for the ideas. I think my coworkers might kill me if I programmed this way, though. How do I use this for local variables? Like so? import letset class Locals: pass def add10(x): l = Locals() letset.setup(l) l.let.y = 10 return x + l.y Seems kind of cumbersome and slow and doesn't handle variable "x". |>oug
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4