Nick Coghlan wrote: >> The person whose 'complaints' I was stating says that DSLs (Domain >> Specific Languages for those who, like me, were confused about the >> acronym) are a big part of what he is after and one per interpreter is >> fine by him. He also realises that the application(s) he needs them >> for might be unusual. He doesn't specifically need the builtin types >> to be extendable. It's just nice to be able to define a single class >> in multiple modules. Even C++ allows this to some extent (but not as >> much as he'd like). > > I'm somewhat confused as to how Python's classes aren't open. Sure, types like > the builtin types that don't have a __dict__ aren't open because there isn't > anywhere to put the extensions, but metaclassing lets you do whatever you want > to any other class:
you don't even need metaclass trickery to deal with the "define a single class in multiple modules" problem; just use multiple inheritance to bring all the component classes together. </F> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com