Chewing one's arm off to avoid VBScript (was RE: Serious privacy leak in Python for Windows)

Mark McEahern marklists at mceahern.com
Thu Jan 17 09:40:56 EST 2002


> dsavitsk wrote:
> In fact if VBScript was a sex partner, that I woke with in my arms, it
> would be so ugly that I would chew my arm of to avoid waking it up in
> the morning ;-)

I've never quite thought of it that way, but I'm not shocked by the strength
of your loathing for VBScript:

I wrote this on my weblog
(http://www.markmceahern.com/2001_12_30_archive#8352000):

  i want to share my joy in python with the following trivia:

    # let's create a dictionary
    dict = {'a': 'first letter', 'b': 'second letter'}
    for key in dict.keys():
      print "%s = %s" % (key, dict[key])

  compare that to vbscript:

    ' let's create a dictionary
    set dict = createobject("scripting.dictionary")
    dict.add "a", "first letter"
    dict.add "b", "second letter"
    k = dict.keys()
    s = ""
    for i = 0 to ubound(k)
      s = s & "k = " & dict.item(k(i)) & vbCrLf
    next
    msgbox s ' or response.write s for asp

  btw, this is an example of what people mean when they say vb is verbose.

in python, if you want a dictionary, you can just write it.  not so in
vbscript.  likewise, consider this abomination of syntax for accessing an
item:

	dict.item(k(i))

i mean, what the f*** is that?  ;-)  compare that to:

	dict[key]

cheers,

// mark





More information about the Python-list mailing list