Re: Declaring a class level nested class?

2009-12-03 Thread Jean-Michel Pichavant
cmckenzie 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__():

Re: Declaring a class level nested class?

2009-12-03 Thread Jean-Michel Pichavant
Chris Rebert wrote: On Wed, Dec 2, 2009 at 8: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

Declaring a class level nested class?

2009-12-03 Thread cmckenzie
Sigh, I'm using Google Groups and it seems I can't see my original post and everyone's replies. I'm really keen to reply back, so I'll just re-post my follow up for now and make sure I don't make a habit of this. (I'll get a news reader) Here goes: I agree, I'm C# and Java influenced, but I've

Re: Declaring a class level nested class?

2009-12-03 Thread cmckenzie
On Dec 3, 9:59 am, cmckenzie mckenzi...@gmail.com wrote: Sigh, I'm using Google Groups and it seems I can't see my original post and everyone's replies. I'm really keen to reply back, so I'll just re-post my follow up for now and make sure I don't make a habit of this. (I'll get a news reader)

Re: Declaring a class level nested class?

2009-12-03 Thread Lie Ryan
On 12/3/2009 3:55 PM, cmckenzie wrote: I can't figure out what the correct way to construct the nested class so it can belong to module. which one you want? 1. The Outside's class contains a nested class class Outside(object): class Inside(object): ... 2. The Outside's class

Re: Declaring a class level nested class?

2009-12-03 Thread Lie Ryan
On 12/4/2009 1:59 AM, cmckenzie wrote: Sigh, I'm using Google Groups and it seems I can't see my original post and everyone's replies. I'm really keen to reply back, so I'll just re-post my follow up for now and make sure I don't make a habit of this. (I'll get a news reader) Here goes: I

Re: Declaring a class level nested class?

2009-12-03 Thread Steven D'Aprano
On Thu, 03 Dec 2009 06:59:43 -0800, cmckenzie wrote: It was late when I posted my example, so I don't think I made my question clear enough. I want to be able to construct a class level class variable, so its global to the class, then reference it from a class method. My brain is spinning,

Declaring a class level nested class?

2009-12-02 Thread cmckenzie
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 =

Re: Declaring a class level nested class?

2009-12-02 Thread Chris Rebert
On Wed, Dec 2, 2009 at 8: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:

Re: Declaring a class level nested class?

2009-12-02 Thread inhahe
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