-
Notifications
You must be signed in to change notification settings - Fork 21
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
Formatting around "and" #40
Comments
I think the ideal here is:
|
oh hai, imo, the ‘ideal’ is far from ideal.
that said, here's a quick attempt that would be closer to ‘ideal’, and lo and behold, it doesn't suffer from perceived formatting ‘problems’ either: class C:
def __eq__(self, other):
if not isinstance(other, type(self)):
return NotImplemented
if self.__slots__ != other.__slots__:
return False
for x in self.__slots__:
if getattr(self, x) != getattr(other, x):
return False
return True the ‘ideal’ solution would be to not write any code at all, and use |
This ticket is not a discussion of that |
which is way more subtle and complex than this ticket seems to imply; see psf/black#2156 (comment) |
I'm not thrilled with this diff:
The text was updated successfully, but these errors were encountered: