We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At present hash and pygit2.hash have the same repr. We can tell them apart by looking at the __module__ attribute. But not their type.
hash
pygit2.hash
__module__
type
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pygit2 >>> hash, pygit2.hash (<built-in function hash>, <built-in function hash>) >>> id(hash) - id(pygit2.hash) 2918112 >>> pygit2.hash.__module__ 'pygit2._pygit2' >>> hash.__module__ 'builtins' >>> type(hash), type(pygit2.hash) (<class 'builtin_function_or_method'>, <class 'builtin_function_or_method'>) >>>
This will confuse anyone who relies on repr to check that they are using the correct hash function.
repr
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At present
hash
andpygit2.hash
have the same repr. We can tell them apart by looking at the__module__
attribute. But not theirtype
.This will confuse anyone who relies on
repr
to check that they are using the correcthash
function.The text was updated successfully, but these errors were encountered: