Re: [Pyobjc-dev] Bridging NSMutableString, a compromise
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-02-07 15:55:02
|
David Eppstein wrote: > > Yet if you need NSStringMethods you would do > > > > s = NSString.stringWithString_("ladieda") > > s.nsstring.someNSStringMethod() > > If you're going to go that far, why not define your unicode subclass > in such a way that s.someNSStringMethod() works? Not entirely sure, but I can think of a couple of reasons: - to make it explicit you're using an actual NSString. This is quite important in the case of methods that modify the string, as the Python string will _not_ reflect the changes in my proposal. - to simplify the implementation. (But then again, with a proper __getattr__ function this is easily solved.) I kindof like the explicit separation between the two objects, but I won't make a huge deal out of it if people insist on merging them this way. Just |