The initializiation of variables etc. in portage.py happens quite randomly.
To improve code readability, please move all initialization away from "in between the functions" to either the beginning or the end of portage.py.
portage.py (should cvs go well) won't even technically exist, the remaining variable/tree initializations will end up in portage/__init__.py
Sidenote, patches are always welcome (if the code in question wasn't already marked for potentially being gutted, it probably wouldn't be undertaken since it's asthetic restructuring- more important things to fix).
Closing due to old age.