Re: Number validation issue

Discussion in 'Python' started by Dennis Lee Bieber, Feb 23, 2013.

  1. On Sat, 23 Feb 2013 10:11:04 +0100, Morten Engvoldsen
    <> declaimed the following in
    gmane.comp.python.general:

    > >
    > > Hi,
    > >

    > Yes true, i need to generate weight at run time rather than hard coding it,
    > following are some solution:
    >
    > Since the max length of thenumber should be 25 and minimum should be 2 so
    > code will be in this way:
    >
    > def is_valid_isbn13(isbn13):


    Isn't an ISBN13 -- by definition -- 13 digits (ignoring hyphens).

    If your goal is to compute a checksum for a non-fixed length of
    data, I'd suggest changing the name of the function.
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Feb 23, 2013
    #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. Morten Engvoldsen

    Number validation issue

    Morten Engvoldsen, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    87
    Morten Engvoldsen
    Feb 22, 2013
  2. Alec Taylor

    Re: Number validation issue

    Alec Taylor, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    95
    Alec Taylor
    Feb 22, 2013
  3. Alec Taylor

    Re: Number validation issue

    Alec Taylor, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    75
    Alec Taylor
    Feb 22, 2013
  4. Morten Engvoldsen

    Re: Number validation issue

    Morten Engvoldsen, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    90
    Morten Engvoldsen
    Feb 22, 2013
  5. Morten Engvoldsen

    Re: Number validation issue

    Morten Engvoldsen, Feb 22, 2013, in forum: Python
    Replies:
    0
    Views:
    90
    Morten Engvoldsen
    Feb 22, 2013
Loading...

Share This Page