Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to generate account number?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andriy Kornatskyy  
View profile  
 More options Nov 3 2012, 12:24 pm
Newsgroups: comp.lang.python
From: Andriy Kornatskyy <andriy.kornats...@live.com>
Date: Sat, 3 Nov 2012 19:23:36 +0300
Local: Sat, Nov 3 2012 12:23 pm
Subject: RE: How to generate account number?

Tim,

Good point. b32decode seems to be capable to understand such common mistakes (see map01 argument to b32decode), I haven't tried:

http://docs.python.org/2/library/base64.html

Thanks.

Andriy

----------------------------------------

> Date: Sat, 3 Nov 2012 10:34:26 -0500
> From: python.l...@tim.thechases.com
> To: r...@panix.com
> Subject: Re: How to generate account number?
> CC: python-l...@python.org

> On 11/03/12 08:22, Roy Smith wrote:
> > Even better might be base-32 encoding the value. Strings of
> > digits have an information density of about 3.2 bits/char.
> > Base-32 is just about as readable, but gives you 5 bits/char, so
> > you end up with a few less characters (which you still want to
> > chunk into 3 or 4 character groups).

> For things that will be read off a screen/paper, I recommend
> omitting several letters that are easy to mistake visually: i/I/l/1
> and O/0 in particular. The VIN (vehicle identification number) on
> all US cars avoids these characters[*], making it easier to read
> them back without concern for "is that a zero or an oh; and is that
> an ell, a one, a lowercase eye, or a capital eye?" As an encoding
> advantage,

> >>> print len(''.join(c for c in (string.ascii_uppercase +
> string.digits) if c not in "O0iIl1"))
> 32

> the number 32 is pretty handy when dealing with binary :-)

> -tkc

> [*]
> The VIN avoids "Q" too and does use the digits 0/1, but the idea
> holds. Make it easy to ready back.
> --
> http://mail.python.org/mailman/listinfo/python-list


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.