Skip to content

Commit 00b1e37

Browse files
author
Peter Szabo
committed
fixed error message of TypeError for unorderable types
old error message is by Python 3.5, new by Python 3.6
1 parent 7eca295 commit 00b1e37

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

cs/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ Už jsi někdy slyšela výraz "srovnávat jablka a hrušky"? Zkusme v Pythonu e
444444
>>> 1 > 'django'
445445
Traceback (most recent call last):
446446
File "<stdin>", line 1, in <module>
447-
TypeError: unorderable types: int() > str()
447+
TypeError: '>' not supported between instances of 'int' and 'str'
448448
```
449449

450450
Zde vidíš, že stejně jako nelze srovnávat "jablka a hrušky", Python není schopen porovnávat řetězce (`str`) a čísla (`int`). Místo toho zobrazí **TypeError** a říká nám, že tyto dva typy nelze srovnávat společně.

de/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Die Redewendung "Äpfel mit Birnen zu vergleichen" hast du bestimmt schon einmal
447447
>>> 1 > 'django'
448448
Traceback (most recent call last):
449449
File "<stdin>", line 1, in <module>
450-
TypeError: unorderable types: int() > str()
450+
TypeError: '>' not supported between instances of 'int' and 'str'
451451
```
452452

453453
Unterschiedliche Dinge, hier die Datentypen Zahlen (`int`) und Strings (`str`), lassen sich auch in Python nicht miteinander vergleichen. In solch einem Fall liefert uns Python einen **TypeError** und sagt uns, dass diese zwei Datentypen nicht miteinander verglichen werden können.

en/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ Have you heard of the expression "comparing apples to oranges"? Let's try the Py
503503
>>> 1 > 'django'
504504
Traceback (most recent call last):
505505
File "<stdin>", line 1, in <module>
506-
TypeError: unorderable types: int() > str()
506+
TypeError: '>' not supported between instances of 'int' and 'str'
507507
```
508508

509509
Here you see that just like in the expression, Python is not able to compare a number (`int`) and a string (`str`).

es/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ Puedes darle a Python todos los números para comparar que quieras, y siempre te
397397
>>> 1 > 'django'
398398
Traceback (most recent call last):
399399
File "<stdin>", line 1, in <module>
400-
TypeError: unorderable types: int() > str()
400+
TypeError: '>' not supported between instances of 'int' and 'str'
401401

402402

403403
Aquí verás que al igual que en la expresión, Python no es capaz de comparar un número (`int`) y un string (`str`). En cambio, muestra un **TypeError** y nos dice que los dos tipos no se pueden comparar.

fr/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ Vous connaissez l'expression "on ne compare pas les choux et les carottes" ? Ess
445445
>>> 1 > 'django'
446446
Traceback (most recent call last):
447447
File "<stdin>", line 1, in <module>
448-
TypeError: unorderable types: int() > str()
448+
TypeError: '>' not supported between instances of 'int' and 'str'
449449
```
450450

451451
Comme vous le voyez, Python n'est pas capable de comparer un nombre (`int`) et une chaîne de caractères (`str`). À la place, il nous montre une **TypeError** et nous dit que les deux types ne peuvent pas être comparés.

hu/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Hallottad már azt a kifejezést hogy "almákat narancsokkal összehasonlítani"
410410
>>> 1 > 'django'
411411
Traceback (most recent call last):
412412
File "<stdin>", line 1, in <module>
413-
TypeError: unorderable types: int() > str()
413+
TypeError: '>' not supported between instances of 'int' and 'str'
414414

415415

416416
Láthatod, hogy ugyanúgy, mint a kifejezéseknél, a Python nem tudja összehasonlítani a számot (`int`) a stringgel (`str`). Ehelyett **TypeError** típusú hibát dob, azaz megmondja, hogy két különböző típust nem lehet egymással összehasonlítani.

it/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ Hai sentito parlare dell'espressione "comparare mele e arance"? Proviamo l'equiv
406406
>>> 1 > 'django'
407407
Traceback (most recent call last):
408408
File "<stdin>", line 1, in <module>
409-
TypeError: unorderable types: int() > str()
409+
TypeError: '>' not supported between instances of 'int' and 'str'
410410

411411

412412
Dall'espressione puoi capire che Python non è in grado di mettere a confronto un numero (`int`) e una stringa (`str`). Ci mostra invece un **TypeError** e ci dice che i due tipi non possono essere messi a confronto.

ko/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ True
505505
>>> 1 > 'django'
506506
Traceback (most recent call last):
507507
File "<stdin>", line 1, in <module>
508-
TypeError: unorderable types: int() > str()
508+
TypeError: '>' not supported between instances of 'int' and 'str'
509509
```
510510

511511
이처럼 파이썬은 숫자(`int`)와 문자열(`str`)을 비교할 수 없어요. 대신 **TypeError**를 보여줘 두 타입이 서로 비교 대상이 아니라는 것을 알려줍니다.

pl/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ Znasz powiedzenie "porównywać jabłka z gruszkami"? Zobaczmy, jak działa jego
425425
>>> 1 > 'django'
426426
Traceback (most recent call last):
427427
File "<stdin>", line 1, in <module>
428-
TypeError: unorderable types: int() > str()
428+
TypeError: '>' not supported between instances of 'int' and 'str'
429429

430430

431431
Widać, że podobnie jak w powiedzeniu, Python nie jest w stanie porównać liczby (`int`) ze stringiem (`str`). Zamiast tego zwraca nam **TypeError** i mówi nam, że te dwa typy nie mogą być porównywane ze sobą.

pt/python_introduction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ Já ouviu a expressão "comparar maçãs com laranjas"? Vamos tentar o equivalen
503503
>>> 1 > 'django'
504504
Traceback (most recent call last):
505505
File "<stdin>", line 1, in <module>
506-
TypeError: unorderable types: int() > str()
506+
TypeError: '>' not supported between instances of 'int' and 'str'
507507
```
508508

509509
Aqui vemos que assim como na expressão, Python não é capaz de comparar um número (`int`) e uma string (`str`).

0 commit comments

Comments
 (0)