3 ms·
From what I gather, the Pythonic way to write that would be: some_object.do_something().do_something()\ .do_something().last_thing() Basically, go to th
by pyre 15y ago
From 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)