mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-102302 Micro-optimize inspect.Parameter.__hash__ (#102303)
This commit is contained in:
parent
c2bd55d26f
commit
90801e48fd
2 changed files with 2 additions and 1 deletions
|
|
@ -2805,7 +2805,7 @@ class Parameter:
|
|||
return '<{} "{}">'.format(self.__class__.__name__, self)
|
||||
|
||||
def __hash__(self):
|
||||
return hash((self.name, self.kind, self.annotation, self.default))
|
||||
return hash((self._name, self._kind, self._annotation, self._default))
|
||||
|
||||
def __eq__(self, other):
|
||||
if self is other:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue