Ask coding questions

← Back to all posts
Python repl bug?
QuantumCodes (26)

There exists an inbuilt hash(val) function where x is a variable. It can hash x.

Usually inbuilt funvtions have a color in replit IDE zuch as str(x) but the hash(x) doesnt have any color and doesnt come in suggestions. Its white like variables (white if you use dark mode)

Is this a bug/mistake that replit forgot to add that functuon to list of inbuilt functions?

int() #has color
str() #has color
hash() #doesnt have
#COLORS IN IDE. NOT HERE
Answered by Coder100 (18934) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18934)

No, those aren't really bugs, the syntax highlighter isn't always correct a lot of the times, and the devs probably have a reason for it.

Anyways, hash isn't entirely a type per se, as str and int are.
https://replit.com/@Coder100/BasicUnderstatedLint-try-this-out.

int and str are probably highlighted for that reason.

QuantumCodes (26)

@Coder100 thx. But i think it should be highlighted

Coder100 (18934)

well you can send feedback ig
still it isn't really a type @QuantumCodes