Sigh.. Yes mix-ins are about mixing classes. No I didn't miss it. No I'm not explaining it. You can type 100 words to my one and not add much. I'm dropping metaclass changes.
Have a nice day, Charles On Jan 13, 2008 12:27 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 10:55 AM 1/13/2008 -0800, Charles Merriam wrote: > >You have a legitimate counter-argument that grouping the > >implementations of __add__ in the metaclass is cleaner than having > >them stand alone and be referenced in. > > You've misunderstood Michele's example code. __add__ in the > metaclass lets you add two *record classes* together, not two records. > > Your proposal didn't support this behavior, nor *any other use case* > for actually having a metaclass (as opposed to class decoration). > > You might find this metaclass tutorial enlightening, especially the > section I've linked to: > > http://www.ibm.com/developerworks/linux/library/l-pymeta2/#h4 > > Understanding this will show you why your original proposal is > completely broken for non-decorator use cases. > > _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
