Steven D'Aprano a écrit :
(snip)
> Having said that, here is a good example of self-modifying code:
> 
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68429
> 
> The RingBuffer class dynamically modifies itself once it is full so that
> its behaviour changes.
> 

This is nothing more than a pythonic implementation of the state 
pattern. I would not call this "self-modifying code", since the code 
itself is not modified.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to