Skip to content

move_only_function: more concise Python script - #2429

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
AlexGuteniev:interpolation
Jan 20, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
AlexGuteniev:interpolation

Conversation

@AlexGuteniev

Copy link
Copy Markdown
Contributor

TIL what is string interpolation

TIL what is string interpolation
@AlexGuteniev Alex Guteniev (AlexGuteniev) changed the title More concise Python script move_only_function: more concise Python script Dec 17, 2021
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the enhancement Something can be improved label Dec 17, 2021
@StephanTLavavej

This comment has been minimized.

Comment thread tools/move_only_function_specializations/move_only_function_specializations.py Outdated
@cbezault Curtis J Bezault (cbezault) removed their assignment Jan 14, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

Verified that the script's output still matches the product code, again.



print(cvref_permutations("", "false", "is_invocable_r_v") + "\n" \
+ "#ifdef __cpp_noexcept_function_type" + "\n" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"..." + "..." is a bit silly when we can simply concatenate the two strings. Not worth resetting testing, however.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I preferred this way for consistency with other occurrences where "\n" is a separate string

@StephanTLavavej

Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit de24597 into microsoft:main Jan 20, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for improving code clarity of this script! 🐍 👓 😸

@AlexGuteniev
Alex Guteniev (AlexGuteniev) deleted the interpolation branch January 20, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants