On Sun, 23 Jan 2005 21:00:25 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote:
> Peter Hansen wrote:
> > snacktime wrote:
> >> Is there a module that sets the parity of a string?
> >
> > As to the specific question: a module is not really required.
> 
> But here's one for you anyway.  It raises an exception if any
> input character is non-ASCII, otherwise when you call set_parity()
> with a string and a parity parameter of 'even', 'mark', 'none',
> 'odd', or 'space', it returns a string of the same length with
> the high (parity) bits set appropriately.

Thanks for the code example, I'm not quite up to speed on python
enough  to make this a trivial exercise as of yet.

Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to