[Python-Dev] User's complaints

Bob Ippolito bob at redivi.com
Thu Jul 13 12:25:16 CEST 2006


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



More information about the Python-Dev mailing list