You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can't naively union a callable type with another type:
union_of_callables: (int) ->str| (bool) ->str# Syntax error!# Needs extra parens; Not intuitive or user-friendly.union_of_callable2: ((int) ->str) | ((bool) ->str)
# Simpler and can be easily split into multiple lines, as Никита mentioned.
Comparing rules for parentheses in arrow callable syntax (PEP 677)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There’s an active but very slow-moving effort to write official python
type system docs in python/typing, and I figured having an easy to skim
list of the best existing discussions would be handy.
This is a very rough set of notes taken in 2022 to help engineers understand the logic as well as the nontrivial Haskell concepts (e.g. GHC extensions) embodied in that logic.
It is not an official guide from the Duckling authors, and there are likely at least a few errors.
These notes only cover the core Duckling engine, not any logic specific to a specific Dimension. Most dimensions are relatively straightforward, but some are quite complicated - particularly Time - and these notes do not cover those.