Fuzzyman wrote:
> Hello,
> 
> To create a classic (old style) class, I write :
> 
> class foo:
>     pass
> 
> To do the equivalent as a new style class, I write :
> 
> class foo(object):
>     pass
> 
> *Should* I in fact write :
> 
> class foo(object):
>     def __init__(self, *args, **kwargs):
>         object.__init__(self)
> 
> ?

I don't believe so.

> Also, can anyone explain any tangible benefit of inheriting from
> object, when not explicitly using any features of new style classes ?

This class might not, but you (or someone else) may decide later to 
subclass it and want to use those features. It's a good habit to get 
into even if you don't initially plan on using those features.

-- 
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

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

Reply via email to