Browse Source

Iterable duck types

pull/46/head
Jure Šorn 5 years ago
parent
commit
91f90c9a79
1 changed files with 11 additions and 11 deletions
  1. 22
      web/script_2.js

22
web/script_2.js

@ -106,17 +106,17 @@ const DIAGRAM_7_A =
'+------------+----------+------------+----------+--------------+\n'; '+------------+----------+------------+----------+--------------+\n';
const DIAGRAM_7_B = const DIAGRAM_7_B =
'┏━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n' + '┏━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━┓\n' +
'┃ │ Iterable Collection Sequence │ abc.Sequence ┃\n' + '┃ │ Iterable │ Collection │ Sequence │ abc.Sequence ┃\n' +
'┠────────────┼────────────────────────────┼──────────────┼──────────────┨\n' + '┠────────────┼────────────┼────────────┼────────────┼──────────────┨\n' +
'┃ iter() │ ! ! │ ✓ ┃\n' + '┃ iter() │ ! │ ! │ ✓ │ ✓ ┃\n' +
'┃ contains() │ │ ✓ ┃\n' + '┃ contains() │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
'┃ len() │ ! ! │ ! ┃\n' + '┃ len() │ │ ! │ ! │ ! ┃\n' +
'┃ getitem() │ ! │ ! ┃\n' + '┃ getitem() │ │ │ ! │ ! ┃\n' +
'┃ reversed() │ │ ✓ ┃\n' + '┃ reversed() │ │ │ ✓ │ ✓ ┃\n' +
'┃ index() │ │ ✓ ┃\n' + '┃ index() │ │ │ │ ✓ ┃\n' +
'┃ count() │ │ ✓ ┃\n' + '┃ count() │ │ │ │ ✓ ┃\n' +
'┗━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n'; '┗━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━━━━┛\n';
const DIAGRAM_8_A = const DIAGRAM_8_A =
'BaseException\n' + 'BaseException\n' +

|||||||
100:0
Loading…
Cancel
Save