ACCEPTED: PEP 285

James Logajan JamesL at Lugoj.com
Thu Apr 4 19:55:39 EST 2002


Eri Ma Franci <max at alcyone.com> wrote:
> Could you find something better to complain about?

Then I'd like to complain that neither you nor Guid va Rossu addressed the 
question I asked in my previous message concerning bools as keys. If a bool 
is to be treated as an int sometimes and sometimes not, I don't recall 
seeing anything about whether it will be treated as an int as a dictionary 
key. If I do:

x = ["is", "are"]
y = {0: "", 1:"s"}

for n in range(3):
   print "There %s %d item%s." % (x[n <> 1], n, y[n <> 1])

Will the behavior be backword compatible and equivalent or not? Simple 
question I assume; waiting for an answer.



More information about the Python-list mailing list