On Jul 13, 2006, at 2:02 AM, Greg Ewing wrote: > Jeroen Ruigrok van der Werven wrote: > >> - Open classes would be nice. > > What do you mean by "open classes"? Python > classes already seem pretty open to me, by > the standards of other languages!
I'm guessing he's talking about being like Ruby or Objective-C where you can add methods to any other class in the runtime. Basically we'd have that if the built-in classes were mutable, but that just really encourages fragile code. The big problem you run into with open classes is that you end up depending on two libraries that have a different idea of what the "foo" method on string objects should do. Adding open classes would make it easier to develop DSLs, but you'd only be able to reasonably do one per interpreter (unless you mangled the class in a "with" block or something). -bob _______________________________________________ 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