News for hackers. Stuff that matters.
Re:Line length in programming by viraptor on Monday February 24, 2014 @06:31AM (#7290227)
Or python if you're already in a function in a function in a class (so 68 chars left). If you also standardised on importing modules, not classes things can get silly. My favourite counter-example to the 80 char limit was a line in openstack which was:

    return some_loaded_module.fairly_descriptive_but_necessarily_long_name(not_very_long_argument)
The way applied to fit it without forced line breaking?

    fdbnln = some_loaded_module.fairly_descriptive_but_necessarily_long_name
    return fdbnln(not_very_long_argument)
(yes, actually using first letters of words) Because yeah... that makes things simpler than just crossing the limit in that place.
Re:Line length in programming by mst on Monday February 24, 2014 @07:38AM (#7290429)
In perl I'd just write -

    return $some_loaded_thing->fairly_descriptive_but_necessarily_long_name(
      $not_very_long_argument
    );
Surely python has something approximating an equivalent?
Re:Line length in programming by collyw on Monday February 24, 2014 @10:19AM (#7291212)
Come on, you can get rid of the return statement if it is the last line in a subroutine.
Re:Line length in programming by viraptor on Monday February 24, 2014 @08:45AM (#7290659)
sorry, it was the return itself that was making it too long already. Basically assigning it locally took just exactly the number of characters, return was sticking out by one or two.