Discord.py: Emoji is unhashable

Created on 26 Feb 2019  路  1Comment  路  Source: Rapptz/discord.py

Title. Even though Emoji is supposed to be inherited from abc.Hashable.
An eval print(discord.Emoji.__hash__) spits out None and print(issubclass(discord.Emoji, discord.mixins.Hashable)) gives True.
This happens even before the cog update I think, and doesn't happen in commit b79a53c at least.

bug v1.0-alpha

>All comments

Thanks for the report.

If you're curious, this broke during #1815. When a type gets a __eq__, the language removes its __hash__ so you have to define it (again).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danshat picture danshat  路  3Comments

j0hnmeow picture j0hnmeow  路  3Comments

ghost picture ghost  路  3Comments

TunaHobby picture TunaHobby  路  3Comments

adhoc92 picture adhoc92  路  3Comments