On Wed, 13 Aug 2008 23:40:50 -0400, Calvin Spealman wrote:

> I know every rule has its exceptions. I put "don't nest classes" in with
> other similar rules I will claim, where I think its safest to say "Never
> do this!", because only then will you know that, should you actually do
> it at some point, you've got a reason good enough to break a "rule".

I would put it like this:

"Never nest classes, unless you need to, or to win a bet."

I've never yet needed to nest a class inside a class, but I've used a 
"class factory function", a function that returned classes.


-- 
Steven
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to