Python Forum
Block of code, scope of variables and surprising exception
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Block of code, scope of variables and surprising exception
#8
(Apr-04-2020, 04:19 PM)arbiel Wrote: will modify my code, and my way of coding in the future.

While doing it also refactor your (current and future) code to not use global and nonlocal.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: Block of code, scope of variables and surprising exception - by perfringo - Apr-05-2020, 09:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to create a variable only for use inside the scope of a while loop? Radical 10 1,963 Nov-07-2023, 09:49 AM
Last Post: buran
  Library scope mike_zah 2 887 Feb-23-2023, 12:20 AM
Last Post: mike_zah
  python multiple try except block in my code -- can we shorten code mg24 10 6,409 Nov-10-2022, 12:48 PM
Last Post: DeaD_EyE
  Scope of variable confusion Mark17 10 2,980 Feb-24-2022, 06:03 PM
Last Post: deanhystad
  "If Len(Word) == 0" Code Block in Pig Latin Program new_coder_231013 3 2,141 Jan-02-2022, 06:03 PM
Last Post: deanhystad
  Variable scope issue melvin13 2 1,614 Nov-29-2021, 08:26 PM
Last Post: melvin13
  Try,Except,Else to check that user has entered either y or n (Code block pasted) RandomNameGenerator 3 2,373 Jun-29-2021, 08:21 PM
Last Post: RandomNameGenerator
  Variable scope - "global x" didn't work... ptrivino 5 3,118 Dec-28-2020, 04:52 PM
Last Post: ptrivino
  Python Closures and Scope muzikman 2 1,889 Dec-14-2020, 11:21 PM
Last Post: muzikman
  code with exception arguments doen't work MaartenRo 1 1,989 Aug-09-2020, 06:06 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020