implicit variable declaration and access

Cameron Laird claird at lairds.us
Mon Jun 13 20:08:02 EDT 2005


In article <877jgy88do.fsf at hector.domek>,
Peter Dembinski  <pdemb at gazeta.pl> wrote:
>Benji York <benji at benjiyork.com> writes:
>
>[snap]
>
>>> code = x + '= 0'
>>> exec(code)
>>
>> You should generally stay away from exec for lots of reasons.
>
>Code 'refactorizability' is one of them.

There's an affirmative way to express this that I can't now make
the time to generate.  Yes, you're both right that, as popular as
some make out such coding is in Lisp (and Perl and PHP), the per-
ception that there's a need for it generally indicates there's a
cleaner algorithm somewhere in the neighborhood.  In general,
"application-level" programming doesn't need exec() and such.

PyPy and debugger writers and you other "systems" programmers 
already know who you are.

My own view is that refactorizability is one of the secondary
arguments in this regard.



More information about the Python-list mailing list