(b)
| 540 | |
| 541 | |
| 542 | def iter_chars(b): |
| 543 | # In Python 2, we can iterate bytes or str with individual characters, but Python 3 onwards |
| 544 | # changed that behavior so that when iterating bytes we actually get ints! |
| 545 | if isinstance(b, bytes): |
| 546 | # i.e.: do something as struct.unpack('3c', b) |
| 547 | return iter(struct.unpack(str(len(b)) + "c", b)) |
| 548 | return iter(b) |
| 549 | |
| 550 | |
| 551 | if IS_JYTHON or PYDEVD_USE_SYS_MONITORING: |
no outgoing calls
no test coverage detected