No, don't revert the patch; but you could try to think of a cheap way to get the code attributes that are always strings to be unicode objects.
On 5/24/07, Walter Dörwald <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > How so? > > It fixes the test. > > > Wouldn't it be better to force it to be a unicode object? > > func_name is set from code->co_name, so co_name should be a unicode > object etc., so this opens a can of worms. Of course this should indeed > be fixed eventually. > > So should I revert the patch? > > Servus, > Walter > > > On 5/24/07, walter.doerwald <[email protected]> wrote: > >> Author: walter.doerwald > >> Date: Thu May 24 19:34:27 2007 > >> New Revision: 55551 > >> > >> Modified: > >> python/branches/py3k-struni/Lib/test/test_funcattrs.py > >> Log: > >> Fix test_funcattrs.py: __name__ attribute must be str8. > >> > >> > >> Modified: python/branches/py3k-struni/Lib/test/test_funcattrs.py > >> ============================================================================== > >> --- python/branches/py3k-struni/Lib/test/test_funcattrs.py (original) > >> +++ python/branches/py3k-struni/Lib/test/test_funcattrs.py Thu May 24 > >> 19:34:27 2007 > >> @@ -258,8 +258,8 @@ > >> def test_func_name(): > >> def f(): pass > >> verify(f.__name__ == "f") > >> - f.__name__ = "g" > >> - verify(f.__name__ == "g") > >> + f.__name__ = str8("g") > >> + verify(f.__name__ == str8("g")) > >> cantset(f, "__globals__", 1) > >> cantset(f, "__name__", 1) > >> # test that you can access func.__name__ in restricted mode > >> _______________________________________________ > >> Python-3000-checkins mailing list > >> [email protected] > >> http://mail.python.org/mailman/listinfo/python-3000-checkins > >> > > > > > > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000-checkins mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000-checkins
