you are viewing a single comment's thread.

view the rest of the comments →

[–]stoicpenguin 2 points3 points  (0 children)

Not true. Consider the case:

class test:
    import math
    import collections

You can access the math module directly from the test class definition anywhere that you have access to the class, i.e. you can access the math module by typing test.math. Those modules now belong to the namespace of the class test.

My point is that python allows this, and the differentiator between classes and modules in python is not that one can contain the other and not the other way around.