[Python-3000-checkins] r55551 - python/branches/py3k-struni/Lib/test/test_funcattrs.py

Guido van Rossum guido at python.org
Thu May 24 19:45:51 CEST 2007


How so? Wouldn't it be better to force it to be a unicode object?

On 5/24/07, walter.doerwald <python-3000-checkins at python.org> 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
> Python-3000-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-3000-checkins
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000-checkins mailing list