ACCEPTED: PEP 285
Paul Rubin
phr-n2002a at nightsong.com
Thu Apr 4 20:37:13 EST 2002
James Logajan <JamesL at Lugoj.com> writes:
> 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.
Yes, if I understand the PEP, that should still work.
This, however, won't work compatibly:
print "Calm down, it's only %s's and %s's." % (1==1, 1==0)
More information about the Python-list
mailing list