This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年05月14日 09:35 by pitrou, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg243164 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2015年05月14日 09:35 | |
inspect.Signature objects are immutable, but they are not hashable. It would be useful if they were. (I would have a similar request for bound arguments but unfortunately their mutability may make it less desirable) |
|||
| msg243169 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年05月14日 10:22 | |
([],) is immutable, but is not hashable. If default values affect the hash, the signature can't be always hashable. |
|||
| msg243171 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2015年05月14日 10:23 | |
But that kind of makes my point. While ([],) is not hashable, other tuples are hashable. |
|||
| msg243172 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2015年05月14日 10:24 | |
Also, a workaround would be to id() the defaults when hashing. |
|||
| msg243189 - (view) | Author: Yury Selivanov (Yury.Selivanov) * | Date: 2015年05月14日 13:20 | |
Signatures and Parameters are already hash able in 3.5. Please close the issue. |
|||
| msg243190 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2015年05月14日 13:20 | |
Oh, great! Thank you. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:16 | admin | set | github: 68376 |
| 2015年05月14日 13:20:39 | pitrou | set | status: open -> closed resolution: out of date messages: + msg243190 stage: resolved |
| 2015年05月14日 13:20:04 | Yury.Selivanov | set | nosy:
+ Yury.Selivanov messages: + msg243189 |
| 2015年05月14日 10:24:53 | pitrou | set | messages: + msg243172 |
| 2015年05月14日 10:23:52 | pitrou | set | messages: + msg243171 |
| 2015年05月14日 10:22:19 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg243169 |
| 2015年05月14日 09:35:04 | pitrou | create | |