Restricting the alphabet of a string
- From: "Nathan Harmston" <ratchetgrid@xxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 12:53:24 +0100
Hi,
I ve being thinking about playing around with bit strings but use in
some encoding problems I m considering and was trying to decide how to
implement a bit string class. Is there a library out there for doing
basic things with bit strings already is my first question?
I know that I can extend string to bit string, but is there anyway I
can force the alphabet to be restricted to 1's and 0's (or even 1, 0
and -1, as an extension to from trinary strings).
class Binary_String(String):
pass
Many Thanks
Nathan
.
- Follow-Ups:
- Re: Restricting the alphabet of a string
- From: John Machin
- Re: Restricting the alphabet of a string
- From: 7stud
- Re: Restricting the alphabet of a string
- Prev by Date: Re: I can't inherit from "compiled" classes ?
- Next by Date: Re: Dict Copy & Compare
- Previous by thread: How do I parse a string to a tuple??
- Next by thread: Re: Restricting the alphabet of a string
- Index(es):
Relevant Pages
|