question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document None checks

See original GitHub issue

We discussed and dismissed a similar idea some time ago… What about: if value?: <suite> instead of if value is not None: <suite> to avoid cases were value would evaluate to False even if not None?

It’s just some characters, but fits the ?? logic well.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
evhubcommented, Apr 3, 2018

I’m not sure how to make this more clear, but Coconut already has universal PEP 505 support. Not only that, but Coconut supports lots of things PEP 505 doesn’t support, such as:

maybe_none = None
maybe_none?[0]
maybe_none?(arg)
maybe_none?$(arg)
maybe_none?$[0]
maybe_none?[]
maybe_none?.

Clearly if so many people are confused on this issue, I need to make the documentation better, so I’m leaving this issue open with the idea of adding all of the above to the documentation.

0reactions
ArneBachmanncommented, Apr 3, 2018

OK, I understand the rationale. Looking forward to potential PEP 505 universal support, if coming.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to check whether a file is empty or not - python
False means a non-empty file. So let's write a function: import os def file_is_empty(path): return os.stat(path).st_size==0.
Read more >
Set up a library to require check out of files - Microsoft Support
Learn how to set up a library checkout to require people have to check out a document before they can edit it, and...
Read more >
[BUG] [DOC] None should be checked with is None in docs · Issue ...
I saw that the documentation is written for beginners too. I think checking the None as it would be a boolean expression in...
Read more >
Safely open apps on your Mac - Apple Support
An app that has been notarized by Apple indicates that Apple checked it for malicious software and none was detected. Notarized app alert....
Read more >
Check non-driver ID card mailing status - New York DMV
We will mail your photo non-driver ID card to your address on our records. ... You can check the mailing status of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found