ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-dev
python-dev
Re: [Python-Dev] bool(container) [was bool(iter([])) changedbetween 2.3 and 2.4]
by Raymond Hettinger other posts by this author
Sep 30 2005 9:29AM messages near this date
Re: [Python-Dev] bool(container) [was bool(iter([])) changed between 2.3 and 2.4] | Re: [Python-Dev] bool(container) [was bool(iter([])) changedbetween 2.3 and 2.4]
[Guido van Rossum]
>  __len__ is for sequences and mappings specifically -- everything that
>  supports __getitem__ should have __len__ and everything that has
>  __len__ should have __getitem__.

That's going a bit far.  Unordered collections (like sets and bags) are
a good counter-example.



Raymond

_______________________________________________
Python-Dev mailing list
Python-Dev@[...].org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.c
om
Thread:
Jim Jewett
Guido van Rossum
Raymond Hettinger
Lisandro Dalcin

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved