diff options
| author | Rapptz <[email protected]> | 2018-09-23 06:12:26 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-09-23 06:12:26 -0400 |
| commit | 00a445310b796ad0a8325b9eb7c01cbf1f4b61dc (patch) | |
| tree | 3d7a07781a48df5a123b0636ff61b442e4ba12c1 /docs | |
| parent | [commands] Properly parse bool when inside a typing.Union (diff) | |
| download | discord.py-00a445310b796ad0a8325b9eb7c01cbf1f4b61dc.tar.xz discord.py-00a445310b796ad0a8325b9eb7c01cbf1f4b61dc.zip | |
[commands] Allow for backtracking parsing with typing.Optional
Original code by zephyrkul.
This new parsing mode allows for backtracking in case of failure
when a typing.Union[..., NoneType] or a typing.Optional[...] is used.
This means that if a type would fail to parse, the view is undo'd to
a previous state, passing the default parameter to the callback, and
then continuing on the next parameter as if nothing had happened.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions