yes, the rb prefix is annoying. I think it makes more cense put all the modules together intead of diferent packages. So the main package would be rigbuilder, and the modules would be guides and skeleton. I will maintain solutions as a package tough. (I can' t remove classes because the code is OOP. I learned from the past when I should avoid classes if I can do the same in a simple module, but here is not the case)
I like the .create_guides() better than createGuides(), although it is not "forbidden" to use capital letters according to pep-8 in methods. I try to respect pep-8, but something are crazy. The 80 characters per line, is definitely crazy, at least for maya. When you have a names all the time like 'L_armA_shoulder_fk_JNT_parentConstraint", 80 characters makes you called a lot longer, because you have to go to the next line all the time. In the end, after testing with 80, 100, and 120, I decided to go with 120. It is what works best I think. A lot of hard core programmers that I´ve woked with, don´t give a f*** about pep-8, and the are amazing programmers. So I try to stay in a middle ground. Following all pep-8 rules makes you slave, and you spend more time thinking about the design, that the actual code I think. El domingo, 25 de septiembre de 2016, 11:33:14 (UTC+1), Marcus Ottosson escribió: > > Consider how it would affect the readability of your project if you: > > a) removed the rb prefix and > b) made each class into a module > > At the moment, rb is used as a namespace. In languages such as C, you > need those to avoid nameclashes and to make your code look readable. But > Python has a nicer way of representing namespaces already, with a dot. And > your classes are verbs, which suggests to me that instantiating it “does > something”, rather than “becomes something”. > > For example, instead of: > > from guides import Guides > guides = Guides() > guides.create_guides() > > You could write: > > import guides > guides.create() > > In fact, I might encourage you to remove all of your classes entirely, and > see what becomes of it. > > -- 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/584a495e-8e3c-46d3-b362-489d869de9dc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
