File: assign_name_before_global_1.py

package info (click to toggle)
python-friendly-traceback 0.7.62%2Bgit20240811.d7dbff6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,264 kB
  • sloc: python: 21,500; makefile: 4
file content (7 lines) | stat: -rw-r--r-- 162 bytes parent folder | download
1
2
3
4
5
6
7
"""Should raise SyntaxError: name 'cc' is assigned to prior to global declaration
"""
aa, bb, cc, dd = 1, 2, 3, 4

def fn():
    cc = 1
    global aa, bb, cc, dd