Python Forum
NameError: name is not defined
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NameError: name is not defined
#8
(Sep-25-2017, 08:46 PM)ichabod801 Wrote: Refactoring is basically reorganizing your code. The problem is the if/elif/else structure of your code. If you structured your code differently, you wouldn't run into the problems you are having. You could fix your code without restructuring it, by defining dummy values for DSC and the other similar variables at the beginning. But in the long run that structure would lead to other problems as you expanded your code.

How would I restructure it?
Reply


Messages In This Thread
NameError: name is not defined - by SnekLover123 - Sep-25-2017, 07:58 PM
RE: NameError: name is not defined - by buran - Sep-25-2017, 08:03 PM
RE: NameError: name is not defined - by buran - Sep-25-2017, 08:08 PM
RE: NameError: name is not defined - by ichabod801 - Sep-25-2017, 08:46 PM
RE: NameError: name is not defined - by SnekLover123 - Sep-26-2017, 02:55 AM
RE: NameError: name is not defined - by sparkz_alot - Sep-25-2017, 08:53 PM
RE: NameError: name is not defined - by ichabod801 - Sep-26-2017, 03:12 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm getting a NameError: ...not defined. vonArre 2 605 Mar-24-2024, 10:25 PM
Last Post: vonArre
  Getting NameError for a function that is defined JonWayn 2 1,241 Dec-11-2022, 01:53 PM
Last Post: JonWayn
Question Help with function - encryption - messages - NameError: name 'message' is not defined MrKnd94 4 3,257 Nov-11-2022, 09:03 PM
Last Post: deanhystad
  [split] NameError: name 'csvwriter' is not defined. Did you mean: 'writer'? cathy12 4 3,658 Sep-01-2022, 07:41 PM
Last Post: deanhystad
  NameError: name ‘app_ctrl’ is not defined 3lnyn0 0 1,653 Jul-04-2022, 08:08 PM
Last Post: 3lnyn0
  NameError: name 'hash_value_x_t' is not defined Anldra12 5 2,104 May-13-2022, 03:37 PM
Last Post: deanhystad
  NameError: name 'cross_validation' is not defined tmhsa 6 13,829 Jan-17-2022, 09:53 PM
Last Post: TropicalHeat
  NameError: name “x” is not defined ... even though x is defined campjaybellson 7 15,723 Oct-20-2021, 05:39 PM
Last Post: deanhystad
  NameError: name 'Particle' is not defined in Pygame drunkenneo 4 3,628 Aug-15-2021, 06:12 PM
Last Post: bowlofred
  NameError: name 'u1' is not defined (on parser code Python) Melcu54 1 3,007 Jul-26-2021, 04:36 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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