2 ms·
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
by viraptor 13y ago
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.
- mst 13y agoIn 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?
- viraptor 13y agosorry, 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.
- collyw 13y agoCome on, you can get rid of the return statement if it is the last line in a subroutine.