Re: Struggling with basics

Discussion in 'Python' started by Jason, Sep 25, 2005.

  1. Jason

    Jason Guest

    Rather than reply to those individuals, just a big "thanks" to those
    that have helped.

    It's definitely making sense, the fact that I need to show the
    two-element tuple to show correctly was one of those head-slapping moments.

    And Dennis Lee Bieber hit the nail on the head when he mentioned that
    I'd declared the initial scores as strings, yet I was comparing them
    against integers. I simply removed the single-quotes from the scores
    and everything slotted into place.

    Again, I now have the list working, apart from the list is reversed (as
    per Dennis Lee Bieber mentioned). I'm afraid I don't understand what
    you mean about the DIFF report but I'll investigate further and learn a
    bit more.

    Again, thanks for the assistance.
    Jason, Sep 25, 2005
    #1
    1. Advertising

  2. Jason wrote:
    > Rather than reply to those individuals, just a big "thanks" to those
    > that have helped.
    >
    > It's definitely making sense, the fact that I need to show the
    > two-element tuple to show correctly was one of those head-slapping moments.
    >
    > And Dennis Lee Bieber hit the nail on the head when he mentioned that
    > I'd declared the initial scores as strings, yet I was comparing them
    > against integers. I simply removed the single-quotes from the scores
    > and everything slotted into place.
    >
    > Again, I now have the list working, apart from the list is reversed (as
    > per Dennis Lee Bieber mentioned). I'm afraid I don't understand what
    > you mean about the DIFF report but I'll investigate further and learn a
    > bit more.


    Please bear in mind: If you just remove the quotes from '00050', you will get
    a value of 40. This is because integer literals with leading zeroes are inter-
    preted as octal.

    Reinhold
    Reinhold Birkenfeld, Sep 25, 2005
    #2
    1. Advertising

  3. Jason

    Jason Guest

    Reinhold Birkenfeld wrote:
    > Jason wrote:
    >> Rather than reply to those individuals, just a big "thanks" to those
    >> that have helped.
    >>
    >> It's definitely making sense, the fact that I need to show the
    >> two-element tuple to show correctly was one of those head-slapping moments.
    >>
    >> And Dennis Lee Bieber hit the nail on the head when he mentioned that
    >> I'd declared the initial scores as strings, yet I was comparing them
    >> against integers. I simply removed the single-quotes from the scores
    >> and everything slotted into place.
    >>
    >> Again, I now have the list working, apart from the list is reversed (as
    >> per Dennis Lee Bieber mentioned). I'm afraid I don't understand what
    >> you mean about the DIFF report but I'll investigate further and learn a
    >> bit more.

    >
    > Please bear in mind: If you just remove the quotes from '00050', you will get
    > a value of 40. This is because integer literals with leading zeroes are inter-
    > preted as octal.
    >
    > Reinhold



    Doh!

    Just found that out! lol.

    OK I'm going to read a bit more in the manual now; I'm determined to
    crack this nut by the morning.
    Jason, Sep 25, 2005
    #3
  4. On Sun, 25 Sep 2005 22:16:05 +0100, Jason <>
    declaimed the following in comp.lang.python:


    > you mean about the DIFF report but I'll investigate further and learn a
    > bit more.
    >

    DIFF is a common utility on many systems (though it took me a while
    to find one I could use on my home system... (I need to check deeper
    into if the VS2005 beta, or what ever, includes WinDiff -- I finally
    tricked the NetBeans system into running its Diff on Python files).

    Diff compares (in simple cases) two files line by line, and
    generates a report of where the files are different. Note: it has to
    make multiple passes because adding and deleting lines means a lot is
    still the same, but they aren't the same "line number".

    I ran diff on your source (as copied from the message) against my
    source (a copy of yours with my edits in place). Then supplied the
    report. Essentially, a type of patch program (assuming your actual file
    matched what I pulled from the message, though I doubt that) could
    process the report automatically, converting your file into mine by
    removing lines with < in front of them, inserting lines with >...
    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
    Dennis Lee Bieber, Sep 26, 2005
    #4
    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. Martin
    Replies:
    6
    Views:
    660
    Martin
    Dec 29, 2003
  2. One Handed Man \( OHM#\)

    Struggling With Concept

    One Handed Man \( OHM#\), Jun 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    367
    Jared
    Jun 12, 2004
  3. Guest
    Replies:
    5
    Views:
    392
    Guest
    Dec 26, 2004
  4. John
    Replies:
    1
    Views:
    401
    =?Utf-8?B?RWx0b24gVw==?=
    Oct 20, 2005
  5. Jason

    Struggling with basics

    Jason, Sep 25, 2005, in forum: Python
    Replies:
    8
    Views:
    295
    Jason
    Sep 26, 2005
Loading...

Share This Page