why not extending the syntax for classes, too ?
Michael Hudson
mwh at python.net
Tue Feb 11 07:29:36 EST 2003
mis6 at pitt.edu (Michele Simionato) writes:
> Having not followed the thread on python-dev, I see now that we are
> talking about different things, whence the confusion.
If you *had* followed python-dev, there's no guarantee things would
have made more sense...
> > > I was thinking to chain with commas, as in
> > >
> > > class C is Traced,Profiled,Protected: #etc. etc.
> >
> > Does that do the moral equivalent of
> >
> > class _Foo(Traced,Profiled,Protected):
> > pass
> >
> > C = _Foo('C', (), {whatever})
> >
> > ?
> >
> > Cheers,
> > M.
>
> No, I was too much implicit.
>
> class C(B) is Traced,Profiled,Protected:
>
> to me was
>
> class C(B): __metaclass__=type(
> "TracedProfiledProtected",(Traced,Profiled,Protected),{})
>
> with Traced, Profiled and Protected all metaclasses.
That's actually more-or-less the same thing :-)
> At this point, I wonder if Holger and Erik are talking about yet
> another functionality ...
Could well be.
Cheers,
M.
--
#ifndef P_tmpdir
printf( "Go buy a better computer" );
exit( ETHESKYISFALLINGANDIWANTMYMAMA );
-- Dimitri Maziuk on writing secure code, asr
More information about the Python-list
mailing list