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

various small details in combinat #38857

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

fchapoton
Copy link
Contributor

some of them are made to please the type-checker mypy

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

Copy link

Documentation preview for this PR (built with commit 61c0240; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

otherwise LGTM.

@@ -251,8 +251,8 @@ def _repr_normal(self):
string_parts = (str(sorted(k)) for k in self)
else:
string_parts = (str(sorted(k, key=str)) for k in self)
string_parts = ", ".join(string_parts).replace("[","{").replace("]","}")
return "[" + string_parts + "]"
string = ", ".join(string_parts).replace("[", "{").replace("]", "}")
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't it a bad idea to call a variable string ? it's also a type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, this is not a reserved keyword

sage: type(string)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 type(string)

NameError: name 'string' is not defined

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

LGTM.

@fchapoton
Copy link
Contributor Author

merci David

@vbraun vbraun merged commit 59a5a5f into sagemath:develop Nov 3, 2024
23 checks passed
@fchapoton fchapoton deleted the micro_details_combi branch November 4, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants