>
> And I donĀ“t think it is uglier

Both are readable for sure, I agree, 120 is not bad at all. It is good to
see that you put some thought not only what your code does but also how
does it look.

Just another piece of advise - For the perspective of version control
system in particular, there is a huge implication in using
 class MyClass(object):


    def someMethod(
        some_big_argument_name,
        another_big_argument,
        and_yet_another_huge_argument_name,  # Note the ',' (not
technically needed)
        ):


Instead of

class MyClass(object):

def someMethod(some_big_argument_name, another_big_argument,and_yet_
another_huge_argument_name):

am not sure how much version control you use but when you add that extra
trailing ',' in the last argument, you are future proofing for adding extra
argument in propective which will be detected by the version control more
clearly:

Here version control system will report that one line was changed and
another added
- and_yet_another_huge_argument_name
+ and_yet_another_huge_argument_name,
+ some_new argument,
)

as compared to more clear (here the version control system will that only
one line was added),

and_yet_another_huge_argument_name,

+ some_new argument
)

The same goes for lists, sets and dictionaries as python allows for a
trailing comma at the end of last argument/element. This is the most
important reason for it.

But in the end, the whole idea is to be readable, and as beautiful as
possible. I am not advocating excessive use of PEP-8 (I am surely not PEP-8
police, actually far from it), my emphasis is more on using PEP-8 to your
advantage. Each coder has a personal and distinctive style, so much that
sometimes I can look at the code and know the person who wrote it before
even running `git blame` on a file. As coders, the onus of writing good
readable code lies on the author, for the benefit of those who will it read
it later (sometimes even the author himself) and we should write every
piece of code being constantly aware of that fact.

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPaTLMRN21%3DBfPD%3DzuT9hQ%3Dt1CBH8SqO0i-_9OCverAPatR-DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to