On Mon, Feb 27, 2017 at 1:56 PM likage <[email protected]> wrote:
> Hi all,
>
> I am trying to conform my code to fit into length width of 80 characters,
> pep8 style
>
>
> Suppose if I have a code like this:
> class something():
> def __init__(self):
> ...
> self.uiSetupNormalSmooth = cmds.radioButton(label='Geometry
> normal',
> align='right',
> onCommand=lambda*args:
> self.setupCallback("uiSetupNormalCol", True))
>
>
> My question here is, for the onCommand line, the limit of 80 characters
> (from left to right) stops ar .`..self.s`, my question here would be how or
> what is the best way to conform this line?
>
> Will it be like this:
> self.uiSetupNormalSmooth = cmds.radioButton(label='Geometry
> normal',
> align='right',
> onCommand=(lambda*args
> :
> self.
> setupCallback("uiSetupNormalCol", True)))
>
>
I would recommend not trying to do so much in a single line:
cbk = lambda *args: self.setupCallback("uiSetupNormalCol", True)
self.uiSetupNormalSmooth = cmds.radioButton(label='Geometry normal',
align='right',
onCommand=cbk)
Justin
--
> 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/bf0a3f06-3327-4b67-a948-a637b487fff7%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/bf0a3f06-3327-4b67-a948-a637b487fff7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAPGFgA2P%2BG7YGH1ig4OTzuK7oUZ0QWpJEcSTs1xT0FWb%3DyCtsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.