mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Use unicode and stop supporting str8
This commit is contained in:
parent
fe53713506
commit
7e95befeda
2 changed files with 9 additions and 15 deletions
|
@ -258,8 +258,8 @@ def test_func_globals():
|
|||
def test_func_name():
|
||||
def f(): pass
|
||||
verify(f.__name__ == "f")
|
||||
f.__name__ = str8("g")
|
||||
verify(f.__name__ == str8("g"))
|
||||
f.__name__ = "g"
|
||||
verify(f.__name__ == "g")
|
||||
cantset(f, "__globals__", 1)
|
||||
cantset(f, "__name__", 1)
|
||||
# test that you can access func.__name__ in restricted mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue