Re: [Pyobjc-dev] Auto bridging instances by conversion
Brought to you by:
ronaldoussoren
From: David E. <epp...@ic...> - 2003-02-04 07:37:49
|
On 2/4/03 8:03 AM +0100 Ronald Oussoren <ous...@ci...> wrote: > Be warned that some (many?) C functions assume that if an object is an > instance of PyString_Type (either directly or an instance of a subclass > of str) they can use PyString_AS_STRING on it. The same thing is true for > most other buildin types. This means the NS* types can never be a full > substitute for native python types (which is really too bad). What about the new Python 2.3 basestring type? Would inheriting from that convince callers that it's a string without letting them think they can use low-level string representation details? Of course, it would be bad if pyobjc required 2.3... -- David Eppstein UC Irvine Dept. of Information & Computer Science epp...@ic... http://www.ics.uci.edu/~eppstein/ |