-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Conversation
Documentation preview for this PR (built with commit 61c0240; changes) is ready! 🎉 |
There was a problem hiding this 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("]", "}") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
merci David |
some of them are made to please the type-checker
mypy
📝 Checklist