Re: What are new-style classes?
- From: Terry Han*** <han***@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 09:13:30 -0500
On Tuesday 30 August 2005 04:09 pm, Reinhold Birkenfeld wrote:
> The customary way is to use "class new_class(object):". There's no advantage in using
> __metaclass__ except that you can set it globally for all classes in that module
> (which can be confusing on its own).
>
> My comment mostly referred to "new-style classes must be declared as a subclass of
> a new-style class", which is not true.
Nonsense. "__metaclass__" is simply an implementation detail.
We know that because it begins with "__".
Therefore it is invisible, and any delusion you may have that
you can see it is a complete non-issue.
In Python we call that encapsulation.
;-D
Cheers,
Terry
--
Terry Han*** ( han*** at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
.
- References:
- What are new-style classes?
- From: Vaibhav
- Re: What are new-style classes?
- From: Colin J. Williams
- Re: What are new-style classes?
- From: Reinhold Birkenfeld
- What are new-style classes?
- Prev by Date: Infinity syntax. Re: Bug in string.find; was...
- Next by Date: Re: dynamicly updating an objects fields
- Previous by thread: Re: What are new-style classes?
- Next by thread: Re: What are new-style classes?
- Index(es):