optimization question

Bengt Richter bokr at oz.net
Mon Aug 12 15:31:05 EDT 2002


On Mon, 12 Aug 2002 17:55:50 GMT, Andrew Koenig <ark at research.att.com> wrote:

>Bo> Before send to you this 'a in blah' I thought, that probably you
>Bo> working with binary data. But anyway here's something missed,
>Bo> maybe in whole design. I dunno: I just don't like this way:
>Bo> array[a:b] == c Maybe we should know more about what are you
>Bo> doing. For example, what is that "poorly specified input data" --
>Bo> is it some binary data or plain/text or mixed or....?.. :/
>
>I'm trying to write a library that will let its users specify
>how to extract data from large sequences (not necessarily strings
>of characters).  The question I asked pertains to one small corner
>of the overall problem.  As the library is far from complete, I
>don't yet know how large a corner it is.
>
Do you want to write an extension that will do for generalized sequences
what the struct module does for C structs? I.e., along with a raw data reference
pass it a descriptor string to tell it what kind of raw data/seq you are accessing,
and then provide methods to "extract data."

But then if you want to let users "specify how to extract data" and not just call
your fixed primitive methods, maybe you want to invent some kind of regular expression
syntax and a compiler to generate access objects for your sequences, analogous to what
the re module does? Is this the kind of thing you have in mind? BTW is this for biotech?

Regards,
Bengt Richter



More information about the Python-list mailing list