Hi, another question about programing style.
Many times I create a variable in a method (not the __init__) that I use
in another method. And to do this I have to make that variable an attribute
of object with self.myVariable
My question is if I it is okey to do this:
def foo(self):
myVar = "something"
cmds.joint(n=myVar)
....more code here that uses myVar
....
....
self.myVar = myVar
Is this a normal thing to do, or should I right directly from the beginning
self.myVar = "something"
The main reason is to keep things a little bit shorter, and not see self.
repited all over the code.
--
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/4c554812-164b-43dc-a62b-ce3e3bf0b209%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.