Python Forum
Limiting valid values for a variable in a class
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting valid values for a variable in a class
#2
Not sure I really understand the question but, you can a have a predefined list of types. If it's not in the list throw a message instead of setting the variable.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts


Reply


Messages In This Thread
RE: Limiting valid values for a variable in a class - by menator01 - Jul-03-2020, 01:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is this a valid variable name? Skaperen 6 1,920 Jun-05-2024, 10:13 PM
Last Post: Skaperen
  Printing out incidence values for Class Object SquderDragon 3 1,357 Apr-01-2024, 07:52 AM
Last Post: SquderDragon
  Script getting reindexing only valid error cubangt 1 3,820 Dec-07-2023, 04:06 PM
Last Post: cubangt
Question Use function, retry until valid Ashcora 8 3,674 Jan-06-2023, 10:14 AM
Last Post: Ashcora
  Variable Types in a class nafshar 9 4,972 Oct-07-2022, 07:13 PM
Last Post: deanhystad
  store all variable values into list and insert to sql_summary table mg24 3 2,111 Sep-28-2022, 09:13 AM
Last Post: Larz60+
  can Inner Class reference the Outer Class's static variable? raykuan 6 9,293 Jul-01-2022, 06:34 AM
Last Post: SharonDutton
  Compare variable with values in a file paulo79 1 1,965 Apr-22-2022, 03:16 AM
Last Post: Pedroski55
  How to add for loop values in variable paulo79 1 2,223 Mar-09-2022, 07:20 PM
Last Post: deanhystad
  dict class override: how access parent values? Andrey 1 2,642 Mar-06-2022, 10:49 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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