Hi,<br>Okey i will change the function name :) Do you have any suggestion to generate the weight at run time rather than hard coding it...<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>---------- Forwarded message ----------<br>From: Dennis Lee Bieber <<a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>
Cc: <br>Date: Sat, 23 Feb 2013 14:03:23 -0500<br>Subject: Re: Number validation issue<br>On Sat, 23 Feb 2013 10:11:04 +0100, Morten Engvoldsen<br>
<<a href="mailto:mortenengv@gmail.com">mortenengv@gmail.com</a>> declaimed the following in<br>
gmane.comp.python.general:<br>
<br>
> ><br>
> > Hi,<br>
> ><br>
>  Yes true, i need to generate weight at run time rather than hard coding it,<br>
> following are some solution:<br>
><br>
> Since the max length of thenumber should be 25 and minimum should be 2 so<br>
> code will be in this way:<br>
><br>
> def is_valid_isbn13(isbn13):<br>
<br>
        Isn't an ISBN13 -- by definition -- 13 digits (ignoring hyphens).<br>
<br>
        If your goal is to compute a checksum for a non-fixed length of<br>
data, I'd suggest changing the name of the function.<br>
--<br>
        Wulfraed                 Dennis Lee Bieber         AF6VN<br>
        <a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>    <a href="HTTP://wlfraed.home.netcom.com/" target="_blank">HTTP://wlfraed.home.netcom.com/</a><br>
<br></blockquote></div><br>