name 'times' is used prior to global declaration - But IT IS declared!

后端 未结 5 912
不思量自难忘°
不思量自难忘° 2020-12-05 23:11

I\'m coding a small program to time and show, in a ordered fashion, my Rubik\'s cube solvings. But Python (3) keeps bothering me about times being used prior to global decla

5条回答
  •  醉酒成梦
    2020-12-05 23:47

    From the Python Docs

    Names listed in a global statement must not be used in the same code block textually preceding that global statement.

提交回复
热议问题