Skip to content

Commit

Permalink
Clarify the documentation on method chaining (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgek committed Mar 3, 2020
1 parent 8515387 commit 24018cd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Expand Up @@ -26,12 +26,19 @@ if 1 == 1 and \
2 == 2:
print('Do not do that!')

# Do not reimplement chaining:
# Do not use for method chaining:
some_object \
.call_method() \
.call_other() \
.call_method(param1, param2) \
.call_other(keyword=value) \
.finalize()

# Instead use:
some_objects.call_method(
param1, param2,
).call_other(
keyword=value
).finalize()

```

## Error codes
Expand Down

0 comments on commit 24018cd

Please sign in to comment.