Commit e131b7c
committed
raise TypeError when
Setting special `__iter__` method to `None` is used to mark
objects as non-iterable.
https://docs.python.org/3/reference/datamodel.html#special-method-names
Check if `__iter__` is set to `None` and raise TypeError exception.__iter__ method is None
1 parent 426019e commit e131b7c
2 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10916 | 10916 | | |
10917 | 10917 | | |
10918 | 10918 | | |
10919 | | - | |
10920 | 10919 | | |
10921 | 10920 | | |
10922 | 10921 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | | - | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
538 | 562 | | |
539 | 563 | | |
540 | 564 | | |
| |||
0 commit comments