structuring a package?
tmohr at s.netic.de
Mon Jan 5 01:17:57 CET 2009
i have a question on how to structure a package best, would be great if
anybody could give me some hint on this:
Assuming i have a base class GraphicObject and derived from that some
classes like Square, Circle, ...
It looks natural to me to write in a code that uses the package:
That way i'd have to structure the code like this:
Does that make sense like this?
Are there better ways to structure things in Python?
One thing that bothers me is that when i write in circly.py something like
"import graphic", then i can't have the test code for the Circle within
circle.py, at least it looks to me like this.
The closest thing that handles this issue that i could find was PEP 328, but
it doesn't cover this problem.
Thanks for any hints,
More information about the Python-list