Re: [Pyobjc-dev] depythonify_c_value rejects non-ascii, non-unicode strings
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2004-01-21 17:41:03
|
On Jan 21, 2004, at 12:38 PM, Ronald Oussoren wrote: > > On 21 jan 2004, at 18:20, Marc-Antoine Parent wrote: > [...] >> So let me then make a plea for an API so that a PyObjC program can >> tell the bridge to use an encoding other than the system default, if >> specified, even if the default behaviour remains identical, i.e. >> throw exceptions upon non-ascii strings. > > I don't like introducing global switches like this, libraries may > modify the switch and change the behaviour of other code. > > Too bad that sitecustomize.py cannot in the same directory as a script > (dirname(sys.argv[0] is added after site.py finishes). BTW. does > anyone know why sys.setdefaultencoding is removed in site.py? E.g. why > is it good that users cannot change the default encoding after the > interpreter has initialized? sys.setdefaultencoding is probably removed in site.py for the same reason you don't like global switches.. someone could sys.setdefaultencoding in a module that you use, for example. -bob |