Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 505 -- None-aware operators #3

Open
aroberge opened this issue Feb 22, 2020 · 0 comments
Open

PEP 505 -- None-aware operators #3

aroberge opened this issue Feb 22, 2020 · 0 comments

Comments

@aroberge
Copy link
Owner

PEP 505 proposes to use ? and ?? as new syntax element to create compact expressions dealing with identifiers that could have a value of None.

maybe() from sorcery as well as maybe() from pymaybe appear to have implemented a similar functionality through function calls instead of the proposed and currently invalid Python syntax described in PEP 505.

It might be possible to write an import hook that would convert the proposed syntax into calls to one of the existing maybe() functions, thus allowing one to experiment with the proposed syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant