- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | r.david.murray |
|---|---|
| Recipients | Zero, docs@python, r.david.murray, terry.reedy |
| Date | 2013-08-01.20:26:32 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1375388792.26.0.533463547564.issue18558@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
That would give you a false positive, though. It would return True for the 'y' in my example, which is not iterable. So Iterable's behavior here is an example of the Python design rule "resist the temptation to guess". As Terry said, new classes should implement an __iter__ method. The __getitem__ iteration support is for backward compatibility. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2013-08-01 20:26:32 | r.david.murray | set | recipients: + r.david.murray, terry.reedy, Zero, docs@python |
| 2013-08-01 20:26:32 | r.david.murray | set | messageid: <1375388792.26.0.533463547564.issue18558@psf.upfronthosting.co.za> |
| 2013-08-01 20:26:32 | r.david.murray | link | issue18558 messages |
| 2013-08-01 20:26:32 | r.david.murray | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
