Perl is worse!

Steve Lamb grey at despair.rpglink.com
Sat Jul 29 22:35:06 EDT 2000


On Sun, 30 Jul 2000 02:22:31 +0200, Alex Martelli <alex at magenta.com> wrote:
>And of course None can also be converted, it's just not converted
>by a plain int(x).  But it just takes an int(x or 7) to fix that,
>for example (if one wants None to be converted to 7...:-).

    It is my understand that in an int(None or 0) what is happening is that
the None fails, the or kicks in and we're really int()ing an integer in the
first place, not actually converting the None.

>Losing accumulated logs, and/or logging false data, would be utter
>disasters. 

    You're speaking in absolute terms on something which is best determined by
the end user, not the language.  To me, for a lot of the logs I process, no,
it isn't a disaster.  It isn't even a minor annoyance.  It is just a speck of
dust on a rather large desk that I couldn't care less about.  Having the logs
processing puke on me, or any other of dozens of applications I can think of,
because of a inconsiquential burp in the data is the real annoyance.

>bug is clearly the priority; if subtly-false data were being logged
>instead, 

    Uhm, logs processing process logs for one of a variety of uses.  IE, the
data has already been logged, how can it be falsely logged again?

>Why would you need to keep track of all things in the former
>paragraph?  Just be explicit about what is to be done for each
>of the cases it can be, and you're all set.

    Except now you need to do tons of conversion at different levels depending
on what you do with the data.  You either type it up front and have it fail
later, or type it later dozens of times.  Neither is appealing to me.

>Furthermore, I keep pointing out that, if you call the groups method
>of the match object, what Python returns for non-matching groups IS
>UP TO YOU: it will return the argument you pass to groups, None if
>you choose to pass no argument.  So, *what* is supposed to be 'sad'?!

    I don't see where I can tell it to pass something other than None on a
match.  The docs I read, (not here) state that it /will/ return None on a
no-match, not that it /can/ and that you can override it.

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