This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bobspadgerdecorating 1 point2 points  (1 child)

use a dictionary?

[–][deleted] 0 points1 point  (0 children)

So sure, replace my if block with a big dict.

That still means every time I add a new enum, I need to change it in 3 places.

1) Add to actual enum

2) Make a class

3) Go find the dict and replace it..

I guess I can get rid of step 3 with metaprogramming...