New submission from jeff deifik <[EMAIL PROTECTED]>: I compiled python 3.0 on a cygwin platform.
Here is my modest function: def List_to_String(lis): # return str.join(lis, '') # This is fast, but seems broke in 3.0 s = '' # This is really slow, but works in 3.0 for l in lis: s = s + l return s Here is my test case: def test_List_to_String(self): inp = ['f', 'r', 'e', 'd', ' ', 'i', 's'] out = 'fred is' self.assertEqual(jefflib.List_to_String(inp), out) Here is what happens when I try to run the commented out version (the one with the join): ERROR: test_List_to_String (__main__.TestJefflibFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "./jefflib_test.py", line 96, in test_List_to_String self.assertEqual(jefflib.List_to_String(inp), out) File "/cygdrive/c/documents and settings/deifikj/jeff/scripts/jefflib.py", lin e 256, in List_to_String return str.join(lis) TypeError: descriptor 'join' requires a 'str' object but received a 'list' Of course, it worked fine in python 2.6. I am baffled. ---------- components: None messages: 76924 nosy: lopgok severity: normal status: open title: problem with str.join type: crash versions: Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4534> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com