This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Odd behavior with unicode.translate on OSX.
Type: Stage:
Components: Unicode Versions:
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: lemburg Nosy List: doerwalter, jemfinch, lemburg, titanstar
Priority: normal Keywords:

Created on 2004-09-22 13:00 by jemfinch, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg22513 - (view) Author: Jeremy Fincher (jemfinch) Date: 2004-09-22 13:00
d = {ord('f'): 'eff '}
for i in range(100):
....s = u'f' * i
....print i

On my Panther laptop, that fails at i=25 with a MemoryError:

*** malloc: vm_allocate(size=1677725696) failed (error code=3)
*** malloc[2346]: error: Can't allocate region
Traceback (most recent call last):
..File "<stdin>", line 4, in ?

It works fine on the Linux and BSD boxes I was able to test on, 
msg22514 - (view) Author: Jeremy Fincher (jemfinch) Date: 2004-09-22 13:10
Logged In: YES 

Oops, that 'eff ' should be u'eff ', obviously.  Sorry about that.
msg22515 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2004-09-22 17:23
Logged In: YES 

This is probably a duplicate of bug 828737 ("unicode translate 
leaks memory"), which should be fixed in the current version 
2.3.4. Which version of Python are you using?
msg22516 - (view) Author: Rune Holm (titanstar) Date: 2004-09-29 02:56
Logged In: YES 

I can reproduce this on panther with python 2.3 (Apple Computer, Inc. 
build 1495). However, with the current 2.4 CVS head (as of 29 Sept) 
compiled on the same computer, this bug is gone.
msg22517 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2004-09-29 10:42
Logged In: YES 

Thanks for the check, closing the report.
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40942
2004-09-22 13:00:20jemfinchcreate