Perl is worse!

Paul Foley see at below
Sun Jul 30 22:27:24 EDT 2000


On Mon, 31 Jul 2000 00:46:17 GMT, Steve Lamb wrote:

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

>> 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.

To me, at least, "convert" gives the impression that the value is
being changed into something else.  That never actually happens.
int(), str(), etc., don't change anything, they just make a new object
somehow based on the old.

>> 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

Neither can anything else, in the sense that "converted" means
"changed".  Certainly None or 1 or anything else can be "converted" in
the same way that int(x) "converts" strings into an integers.  E.g.,

  def convert(x):
      return x or 42

now convert(None) "converts" None into 42, proving once and for all
that "None can be converted".  Are you claiming there's somehow a
difference between my convert() function above and the builtin int()
function?

> 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

Nonsense.

  b = 1
  b = "foo"

now b is the string "foo".

  b = None

and now b is None, but type

  b = "foo"

and what do you know, b is "foo" again, contrary to your claim that
"None things cannot be repointed from".

[I don't think I have a nasy uncle...maybe a nosy neighbor...]

-- 
Nomina stultorum in parietibus et portis semper videmus.      -- Cicero

(setq reply-to
  (concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))



More information about the Python-list mailing list