[Python-ideas] A "within" keyword
dkteresi at gmail.com
Fri Jun 8 14:41:54 EDT 2018
One of the features I miss from languages such as C# is namespaces that
work across files - it makes it a lot easier to organize code IMO.
Here's an idea I had - it might not be the best idea, just throwing this
out there: a "within" keyword that lets you execute code inside a
namespace. For example:
cool_namespace = types.SimpleNamespace()
foo() # prints "foo run"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas