Which coding style is better? public API or private method inside class definition

Josh English Joshua.R.English at gmail.com
Wed Jan 5 00:31:52 EST 2011


I think it depends on where you're willing to deal with changes. As it stands, if you make changes to get_all that will effect the way get_even works. If there's a logical chain that your code needs to follow and such changes would be acceptable, use them, because it's easier to change one thing once instead of one thing twice.


In general, I try to code in a way that will reduce the number of places I'll have to change or refactor.

Josh



More information about the Python-list mailing list