Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Jeffrey Yasskin
On 7/26/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > (Personally > I'd like to use strings for the keys since {'TEXT': 'stuff'} is a lot > clearer than {1413830740: 'stuff'} when encountered in a debugging > session.) Good argument. You now have a patch that uses str() instead of b2i(). _

Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Ronald Oussoren
On 27 Jul, 2007, at 5:38, Jeffrey Yasskin wrote: I've sent the patch as http://python.org/sf/1761465 using Guido's suggestion of using bytes, but I do philosophically prefer Talin's and Ronald's suggestions. On 7/25/07, Ronald Oussoren <[EMAIL PROTECTED]> wrote: I've CC-ed Jack Jansen as he ha

Re: [Python-3000] pep 3124 plans

2007-07-26 Thread Jeffrey Yasskin
On 7/23/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > For example, one pattern that sometimes comes up in writing methods > is that you have a base class that always wants to do something > *after* the subclass version of the method is called. To implement > that without method combination, you

Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Guido van Rossum
On 7/26/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > I've sent the patch as http://python.org/sf/1761465 using Guido's > suggestion of using bytes, but I do philosophically prefer Talin's and > Ronald's suggestions. I've checked in what you submitted; at this point I take whatever I can get if

Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Jeffrey Yasskin
I've sent the patch as http://python.org/sf/1761465 using Guido's suggestion of using bytes, but I do philosophically prefer Talin's and Ronald's suggestions. On 7/25/07, Ronald Oussoren <[EMAIL PROTECTED]> wrote: > I've CC-ed Jack Jansen as he has maintained the Mac libraries for ages (from > wa

Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Alex Holkner
Greg Ewing wrote: > Ronald Oussoren wrote: >> No. Four-character-constants are *not* strings or byte arrays, they are >> integer literals. > > Well, in Pascal they were character arrays -- it > was only when they switched to C that they became > ints. Conceptually they're still the same thing. >

Re: [Python-3000] struni and the Apple four-character-codes

2007-07-26 Thread Greg Ewing
Ronald Oussoren wrote: > No. Four-character-constants are *not* strings or byte arrays, they are > integer literals. Well, in Pascal they were character arrays -- it was only when they switched to C that they became ints. Conceptually they're still the same thing. Python isn't C, and doesn't hav

Re: [Python-3000] interaction between locals, builtins and except clause

2007-07-26 Thread Lisandro Dalcin
On 7/26/07, Eduardo EdCrypt O. Padoan <[EMAIL PROTECTED]> > Python thinnks range is local, because you referenced it, even if an > error ocurred. Use 'global range' at the top of the file. Yes, I understand all that. I just wanted to know if the result of this locals + except + globals interaction

Re: [Python-3000] interaction between locals, builtins and except clause

2007-07-26 Thread Eduardo \"EdCrypt\" O. Padoan
On 7/26/07, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > Porting to Py3K, I modified a function like the followin, using a > trick for it working in Py2.x . > > def __iter__(self): > if self == _mpi.INFO_NULL: > return > try:range = xrange > except: pass

[Python-3000] interaction between locals, builtins and except clause

2007-07-26 Thread Lisandro Dalcin
Porting to Py3K, I modified a function like the followin, using a trick for it working in Py2.x . def __iter__(self): if self == _mpi.INFO_NULL: return try:range = xrange except: pass nkeys = _mpi.info_get_nkeys(self) for nthkey in range(