Cerca

Heus ací els resultats de la cerca.

4.1 PEP 257 – Docstring Conventions
13 Resultats, Darrera modificació:
de that you want to test, e.g.: <code python>def fun(val): return val * 2 user_value = int(input("Enter the value: ")) # fun(user_value) # user_value = user_value + "foo" print(fun(user_value))</code> * they can help you plan yo... pe //str// helps us minimize the risk of certain (un)expected situations – it reduces the risk of pass
3.1 PEP 8 – Introduction
10 Resultats, Darrera modificació:
le conventions. These tools can be installed and run locally, or accessed online. We want to show you ... n> pip install pycodestyle </code> * You can run it on a file or files to obtain information about... tion”. Examples: <code python ❌> # Bad: def my_fun_one(x, y): return x * y def my_fun_two(a, b): return a + b </code> <code python ✔> def my_fun
2.1 PEP 20 – The Zen of Python
5 Resultats, Darrera modificació:
o to the editor window, type in ''import this'', run the code, and voilà! Can you see what happens? W... program will not crash. On the contrary, it will run without any problems and output a fine result. Al... t’s analyze the following example: <code python> fun(1, 2, 3) fun(a=1, b=2, c=3) </code> The two function invocations may be the same, but not necessaril