[Python-Dev] Re: PEP 285: Adding a bool type (original) (raw)
Mark McEahern marklists@mceahern.com
Wed, 3 Apr 2002 12:26:32 -0600
- Previous message: [Python-Dev] Re: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Ka-Ping Yee]
What about this:
>>> d = {} >>> d[0] = 'zero' >>> d[False] = 'false' >>> len(d) 1 or 2?
This returns:
1
Just curious: If you were using True and False as keys to a dictionary, would you ever expect len(d) to return something > 2?
// mark
- Previous message: [Python-Dev] Re: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]