Immutable and Mutable Types
Duncan Booth
duncan.booth at invalid.invalid
Mon Mar 17 16:31:45 EDT 2008
Matthew Woodcraft <mattheww at chiark.greenend.org.uk> wrote:
> In article <Xns9A64A2776A5Aduncanbooth at 127.0.0.1>,
> Duncan Booth <duncan.booth at suttoncourtenay.org.uk> wrote:
>> I don't have a copy of 1.4 to check so I'll believe you, but you can
>> certainly get the output I asked for with much more recent versions.
>
>> For the answer I actually want each asterisk substitutes for exactly
>> one character.
>
> Then I'll guess you're looking for something like '0==0', with Python
> 2.2 or so (so that you'd get the PyTrue object).
>
Yes, that was the answer I was looking for: CPython 1.5.x (or maybe
earlier?) to 2.2.x without a bool type but separate values for true and
false (as used by PyWin). Also it seems that Jython 2.2.1 (and probably
other versions) behaves the same way.
I'm intrigued though by Stargaming's answer with 1//1, I must look into
that one.
More information about the Python-list
mailing list