Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes
  • Loading branch information
JelleZijlstra committed Apr 22, 2025
commit 8266a5e358818e686b789c166093a3677bf1259e
5 changes: 5 additions & 0 deletions Lib/annotationlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ def __eq__(self, other):
and self.__forward_is_class__ == other.__forward_is_class__
and self.__cell__ == other.__cell__
and self.__owner__ == other.__owner__
and (
(tuple(sorted(self.__extra_names__.items())) if self.__extra_names__ else None) ==
(tuple(sorted(other.__extra_names__.items())) if other.__extra_names__ else None)
)
)

def __hash__(self):
Expand All @@ -245,6 +249,7 @@ def __hash__(self):
self.__forward_is_class__,
self.__cell__,
self.__owner__,
tuple(sorted(self.__extra_names__.items())) if self.__extra_names__ else None,
))

def __or__(self, other):
Expand Down
1 change: 0 additions & 1 deletion Lib/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def iter_fields(node):
Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields``
that is present on *node*.
"""
print(node)
for field in node._fields:
try:
yield field, getattr(node, field)
Expand Down