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

Use set comprehension directly instead of calling set() #88

Merged
merged 1 commit into from
Jun 23, 2022
Merged

Use set comprehension directly instead of calling set() #88

merged 1 commit into from
Jun 23, 2022

Conversation

ThibFrgsGmz
Copy link
Contributor

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s) void
Has Unit Tests (y/n) n
Builds Without Errors (y/n) Let CI run
Unit Tests Pass (y/n) Let CI run
Documentation Included (y/n) n

Change Description

The goal of this PR is to use set comprehensions directly instead of calling set().

Rationale

The Pythonic way to create a set from a generator is to use comprehensions. It is not necessary to use set around a generator expression to get an object of that type, since there are understandings for those types.
Using comprehensions instead of methods is slightly shorter.

Testing/Review Recommendations

void

Future Work

void

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, confirmed this feature is in 3.7+

@LeStarch LeStarch closed this Jun 16, 2022
@LeStarch LeStarch reopened this Jun 16, 2022
@LeStarch LeStarch merged commit a197c4e into nasa:devel Jun 23, 2022
@ThibFrgsGmz ThibFrgsGmz deleted the feat/coll-to-builtin-comprehension branch July 20, 2022 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants