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

if文見直し #47

Open
Nobu19800 opened this issue Mar 17, 2019 · 0 comments
Open

if文見直し #47

Nobu19800 opened this issue Mar 17, 2019 · 0 comments
Assignees
Labels
bug Something isn't working priority : Low This is Low priority

Comments

@Nobu19800
Copy link

Nobu19800 commented Mar 17, 2019

Describe the bug
リストが空かどうか判定するif文で、以下のように長さが0かどうか判定する部分が複数ある。

if len(consumer_types) > 0:
if len(consumer_types) == 0:

リストが空かどうか判定するにはnotを付けるだけよいため、一旦長さを取得する上記の方法は非効率だと考えられる。

if consumer_types:
if not consumer_types:

To Reproduce

Reproducibility

Expected behavior

Screenshots or Logs

Environment

Additional context

@Nobu19800 Nobu19800 added the bug Something isn't working label Mar 17, 2019
@Nobu19800 Nobu19800 self-assigned this Mar 17, 2019
@Nobu19800 Nobu19800 added the priority : Low This is Low priority label Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority : Low This is Low priority
Projects
None yet
Development

No branches or pull requests

1 participant