<div dir="ltr">This is probably far-fetched where Python is concerned but I still think that it could be useful. It is based on an idea that I had 36 years ago!<div><br></div><div>Quite simply, the principle is to allow changes to variables within a function body (for example) but not outside of it, rather like the Functional Programming paradigm. That of course excludes the use of global variables and requires functions to return whatever is needed to the outer scope. In my experience, globals are only needed to implement persistent (inter-call) states anyway, so assuming that such a feature is available in the language I believe that the "Read Only" proposal is viable.</div>
<div><br></div><div>This is highly unlikely to be implemented in Python any time soon (even with an Interpreter/compiler option) and would imply some performance overhead but I still think that it is a nice idea.</div><div>
<br></div><div>Any comments? Would a "Persistent Variables" PEP be interesting in its own right?</div><div><br></div><div><br></div><div>Thanks ...</div><div><br></div><div>Richard</div><div><br></div></div>