> > I'm not sure if this is the most efficient way to store the data, actually > I'm pretty sure it's among the worst, heh :p The reason why I'm storing in > a dictionary is that I have some pretty large functions, and I want to be > able to go in and get any object created within the function after it has > run, so I thought dictionaries was the most readable way to do it, do you > have any other suggestions? >
Try using object-oriented programming (OOP) - ie, classes. The problem of associating a common set of data with a set of functions is one of the core issues that OOP was created to solve. Unfortunately, this isn't necessarily an "easy" solution - learning how to properly use classes is something that will take practice - but it's well worth the effort, in my opinion. Also - at a guess, you might also want to try breaking your "pretty large functions" into several smaller ones, if possible... - Paul -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAAssL7bEtFkgWN5W9eccGi6OYNeEMCD0%3D7i5To9Ehdr4d6gC_Q%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
