The man behind the mask & "input"


#1

Hi!

In 18.11 "The man behind the mask" the instructions say: Define a function, check_bit4, with one argument, input, an integer.
OK, I did it and it works, no problems here, but seems like 'input' is a reserved work in python, so why I don't have an error if I'm using a reserved word as an argument for a function? http://www.mclibre.org/consultar/python/lecciones/python_entrada_teclado.html
In the interpreter the word 'input' becomes blue, as it should.


#2

hey there,
It is not a reserved word but a built-in-function in python!
You can use it as variable/parameter name but it is a bad practice!

for extra read:


#3

Thanks for the clarification!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.