Python

Python exception types

Në shqip: Llojet e gabimeve në Python

ShpjegimiSQ

Gabimet më të shpeshta: ValueError (vlerë e gabuar, si int("abc")), TypeError (tip i gabuar, si "a" + 1), KeyError (çelës që s'ekziston), IndexError (indeks jashtë listës), ZeroDivisionError, AttributeError dhe NameError.

EnglishEN

The most common errors: ValueError (wrong value, like int("abc")), TypeError (wrong type, like "a" + 1), KeyError (missing key), IndexError (index out of the list), ZeroDivisionError, AttributeError and NameError.

Si ta mendosh

Si dritat e ndryshme në panelin e veturës: secila tregon një problem tjetër.

Lexoje në anglisht

Like the different warning lights on a car dashboard: each points to a different problem.

Shembull kodipython

int("abc")          # ValueError
"a" + 1             # TypeError
{"a": 1}["b"]       # KeyError
[1, 2][5]           # IndexError

Terma të lidhur