3 ms·
Yeah. That's the hack I use, but it makes it a bit no pythonic.
by phzbOx 15y ago
Yeah. That's the hack I use, but it makes it a bit no pythonic.
- pyre 15y agoFrom what I gather, the Pythonic way to write that would be: some_object.do_something().do_something()\ .do_something().last_thing() Basically, go to the end of the line and wrap with an indent. That's the way that I see most function calls with a long list of arguments in Python. In Perl, you might see something like: GetOptions( 'h|help' => \my $help ); Whereas in Python you would see: parser.add_option('-h','--help',meta="HELP",target="HELP", help="Print help message",action="store_true",default=False)