Python 3.3 vs. MSDOS Basic

Tim Daneliuk tundra at
Wed Feb 20 23:59:59 CET 2013

On 02/20/2013 04:49 PM, Tim Daneliuk wrote:
> On 02/20/2013 12:38 PM, Ian Kelly wrote:
>> On Wed, Feb 20, 2013 at 7:21 AM, Tim Daneliuk <tundra at> wrote:
>>> Thanks.  I was specifically curious about your use of dynamic programming.
>>> What about this algorithm makes it particularly an example of this?  Is
>>> it your use of memoization or something other than this?
>> In retrospect, I was using the term overly broadly, as the algorithm
>> does not really use dynamic programming.  I should have written
>> "memoization" instead.
> That's why I asked.  Dynamic Programming itself is a sort of wide
> term and I was curious which version of it you found useful.
> Thanks for the discussion.

One other point of interest:  The formal notion of Dynamic Program
is to decompose problems into potentially overlapping subproblems
and only solve each subproblem once, and reapply the results as
needed.  Hence, your use of memoization is indeed an example of
Dynamic Programming.

Notwithstanding the formal ideas of a Dynamic Program, my interest in this
context really had more to do with the word "dynamic".  Languages
like Python are "dynamic" in the sense that a running program can
actually generate new code as it runs.  This makes it possible to
write adaptive programs that morph as they run, typically in response
to their inputs and state.***  I was thinking that perhaps
you'd done something in this sense of the word in solving the OPs

*** To be sure, you can do this in assembler too, it's just much
more convenient in dynamic languages like Python.

Tim Daneliuk     tundra at
PGP Key:

More information about the Python-list mailing list