Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nonlocal_and_global.py 350B

123456789101112
  1. """Test that a name is both nonlocal and global in the same scope."""
  2. # pylint: disable=missing-docstring,global-variable-not-assigned,invalid-name,nonlocal-without-binding
  3. def bad(): # [nonlocal-and-global]
  4. nonlocal missing
  5. global missing
  6. def good():
  7. nonlocal missing
  8. def test():
  9. global missing
  10. return test