| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Sorry, something went wrong.
Sorry, something went wrong.
| """ | ||
| yield | ||
|
|
||
| def __check_delay(delay): |
There was a problem hiding this comment.
Nitpick: Does it really need double underscore? If you want to mark something as "private API" use one leading underscore
Sorry, something went wrong.
There was a problem hiding this comment.
Get it!
Thank you
Sorry, something went wrong.
|
|
||
| SEC_TO_NS = 1000 * 1000 * 1000 | ||
|
|
||
| if not (isinstance(delay, int) or isinstance(delay, float)): |
There was a problem hiding this comment.
| if not (isinstance(delay, int) or isinstance(delay, float)): | |
| if not isinstance(delay, (int, float)): |
Sorry, something went wrong.
There was a problem hiding this comment.
Wow! This is much clearer now.
Sorry, something went wrong.
| SEC_TO_NS = 1000 * 1000 * 1000 | ||
|
|
||
| if not (isinstance(delay, int) or isinstance(delay, float)): | ||
| raise TypeError(f"'{type(delay)} object cannot be interpreted as an integer'") |
There was a problem hiding this comment.
| raise TypeError(f"'{type(delay)} object cannot be interpreted as an integer'") | |
| raise TypeError(f"{type(delay)} object cannot be interpreted as an integer") |
There's no need for single quotes.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok
Thank you
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.