Perl is worse!

Steve Lamb grey at despair.rpglink.com
Sun Jul 30 20:46:17 EDT 2000


On 30 Jul 2000 21:07:02 GMT, Martijn Faassen <m.faassen at vet.uu.nl> wrote:
>print bar

    This is different than

bar

>Ahum, the latter isn't really possible in Python. Your integer wil never
>ever be converted to a noninteger. 

    Yes it will.  int(), str(), etc, etc, etc...  I never said the language
converted it, I just said it was converted and Python certainly does that.

>And you need to remember what all your operations do to any data type
>that they may encounter. I don't.

    I never have yet.  :)

>1 isn't mutable into anything at all either, by the way. Neither are
>strings. The name 'b' can however be made to point to something else.
>That is an entirely different thing though, and from the way you're
>speaking I'm not entirely clear whether you understand this yet.

    OK, to be strict.  None can't be converted, neither can 1.  For some
reason, however, b, which was pointing to 1 can be made to point to something
else which we'll call the integer formerly known as 1 where as None things
cannot be repointed from.  None is like that really nasy uncle everone has who
scratches himself in public and has a huge beer belly.  You don't want to
look, but you are compelled to until the end of time.

    The net result, of course, is that int() can point b to something else in
some cases and not others, or, in layman's terms, it can convert certain
things and not others.  However, since the docs for int do state "convert"
both in the language and in the book I have I don't think it was too bad of me
to have used that term, no?

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list