comparison puzzle? bug?

Discussion in 'Python' started by Charles Hixson, Mar 23, 2005.

  1. I hesitate to call this a bug, as at my level of expertise that seems
    .... unlikely. But I can't think of any other explanation:

    This is an extract from some longer code:
    print "item = ", item
    print "item[0] < lvl = %d < %d = " %(item[0], lvl), bool(item[0] < lvl)
    print "item[0] == lvl = %d == %d = " %(item[0], lvl), bool(item[0]
    == lvl)
    print "item[0] > lvl = %d > %d = " %(item[0], lvl), bool(item[0] ==
    lvl)
    yields:
    item = [1, 'A', '/home/.../data/n1a.gif', <Surface(102x78x32 SW)>]
    tem[0] < lvl = 1 < 0 = False
    item[0] == lvl = 1 == 0 = False
    item[0] > lvl = 1 > 0 = False

    I abbreviated that file path. Any ideas what's going on?
    Charles Hixson, Mar 23, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    3
    Views:
    6,641
    Nedu N
    Aug 6, 2003
  2. dwa

    Design Puzzle!

    dwa, Jun 10, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    362
    Cowboy \(Gregory A. Beamer\) [MVP]
    Jun 10, 2004
  3. Shankara Narayanan

    Booking puzzle....

    Shankara Narayanan, Jun 17, 2004, in forum: ASP .Net
    Replies:
    20
    Views:
    912
    bredal Jensen
    Jun 30, 2004
  4. VB Programmer
    Replies:
    2
    Views:
    425
    Alan Lambert
    Nov 4, 2004
  5. Deepu
    Replies:
    1
    Views:
    228
    ccc31807
    Feb 7, 2011
Loading...

Share This Page