WANT: bad code in python (for refactoring example)

Irmen de Jong irmen.NOSPAM at xs4all.nl
Tue Feb 14 18:12:54 EST 2017


On 14-2-2017 23:44, Makoto Kuwata wrote:
> Hi,
> 
> Is there any *just right* python code to refactor?
> In other words, I'm finding bad code example in python.
> 
> (background)
> I'm teaching Python to some novice programmer, and
> want to show refactoring example to them.
> 
> (required)
> * not good code
> * not too large (for novice programmer)
> * not too complex (for novice programmer)
> * released under open source license
> 
> If you know good material in github or bitbucket to refactor,
> let me know it.
> 
> --
> regards,
> kwatch
> 


No code in text form, but I find the following video by Raymond Hettinger very clear
about the values of refactoring otherwise seemingly fine code

https://youtu.be/wf-BqAjZb8M?t=12m39s

code starts at 12 min. 40 sec.

It does require a bit of background knowledge about Python and the PEP8 code style and
API design.

Irmen




More information about the Python-list mailing list