it seems to me like it should work just fine if you just take out the
second line where it just says nestedClass

On Wed, Dec 2, 2009 at 11:55 PM, cmckenzie <mckenzi...@gmail.com> wrote:
> Hi.
>
> I'm new to Python, but I've managed to make some nice progress up to
> this point. After some code refactoring, I ran into a class design
> problem and I was wondering what the experts thought. It goes
> something like this:
>
> class module:
>   nestedClass
>
>   def __init__():
>      self.nestedClass = nested()
>      print self.nestedClass.nestedVar
>
>   class nested():
>      nestedVar = 1
>      def __init__(self):
>         print "Initialized..."
>
> I can't figure out what the correct way to construct the "nested"
> class so it can belong to "module".
>
> I want a class level construct of "nested" to belong to "module", but
> I keep getting nestedClass isn't defined.
>
> My example isn't great or 100% accurate, but I hope you get the idea.
>
> Thanks.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to