Hi,

For some scripts, I write in a a more functional way, using a lot of small
functions outside of any class. Although it makes the code clearer for
specific cases, I have found that it makes debugging and using the repl in
general difficult, as as I have to re-initialise every single objects every 
time.

I have now started to use some kind of state pattern to alleviate this, here's
a simplistic example:

https://github.com/dorfsmay/state_pattern_for_debugging_python/blob/master/dirstats.py

Are there better ways to address this? Any suggestion on this style?

Thanks.

--
http://yves.zioup.com
gpg: 4096R/32B0F416
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to