Skip to content

alexbepple/currency-conversion-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is an example for working with legacy code that I use in teaching.

The code is the Python version of the example that Brett Schuchert has used in talks about working with legacy code.

Git branches

  • master The legacy code we start out with.
  • golden_master Now we have an integration test and a pseudo-unit test that uses a Python form of monkey patching: namespace overriding.
  • solution is not complete, but a significant step forward.
    • Classes extracted.
    • Class for currency symbols extracted.
    • Extracted caching to decorator pattern. – While very OO, this is not very Pythonic. What would be a better solution? Something with Python decorators?

Credits

Thanks to Brett Schuchert for this prolific example – and for generally publishing everything on his wiki under the Creative Commons Attribution-ShareAlike license.

License

This material is published under the same CC BY-SA 2.5 license as Brett’s talk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages