News for hackers. Stuff that matters.
Re:Beyond PEP 8 – Best practices for beautiful intelligible ... by bpicolo on Friday August 07, 2015 @06:15PM (#10025336)
Then use better whitespace rules. Not to mention the helper isn't capturing any closure here so it's not particularly useful inline, and even when they are you can refactor variable capture to new functions. Nested definitions in python are pretty rare, and oft unnecessary

    if __name__ == '__main__':
        def this_is_a_function(*args, **kwargs):
            def this_is_a_helper_function(
                arg1, 
                arg2='this line is now indented 12 chars!'
            ):
                this_long_variable = (
                    "Don't put an expression here unless you "
                    "want to use useless intermediate variabls."
                )
                return this_long variable if var else 'really short here'
            return 1
Re:Beyond PEP 8 – Best practices for beautiful intelligible ... by JadeNB on Saturday August 08, 2015 @04:36PM (#10028594)
Surely the fact that there are two typos in your code, one of them in the name of a variable (`this_long_variable` vs `this_long variable`), indicates that things can go wrong when you abstract out a literal to a variable?
Re:Beyond PEP 8 – Best practices for beautiful intelligible ... by bpicolo on Sunday August 09, 2015 @12:45PM (#10030653)
I literally copy pasted from the other guy and added whitespace.