[Tutor] optimization: faster than for

elis aeris hunter92383 at gmail.com
Mon Jul 2 00:17:14 CEST 2007


of course. but i tried only the code, not rewriting the pixelget part into
that, because I have to understand it first.


so, i should look into ipython's doc for this code?


ok,

import array
def f7(list):
    return array.array('B', list).tostring()
f7([97, 98, 99])
Out[6]:'abc'


searching with ipython search engine returns returns  "parrel computing"

ack,

so i call the array.array function, and tostring()   function,

I have no idea how to read that. @_@
what a great one liner!





On 7/1/07, Luke Paireepinart <rabidpoobear at gmail.com> wrote:
>
> elis aeris wrote:
> > my reply
> > oh crancky!   C#  !
> >
> > http://en.wikipedia.org/wiki/Iron_Python
> >
> > i better try to find the best way to do it with the official python
> > genre before venturing into that world of pain without PIL !
> Please don't reply directly to me.
>
> Iron Python is an implementation of Python in .NET
> similarly Jython is an implementation of Python in Java.
> This doesn't have anythign to do with their libraries.
> The example code
> > >> In [4]:import array
> > >> In [5]:def f7(list):
> > >>    .5.:  return array.array('B', list).tostring()
> > >>    .5.:
> > >>
> > >> In [6]:f7([97, 98, 99])
> > >> Out[6]:'abc'
> Would run in IronPython, Jython or cPython.
> The way that the code is marked up (adding In or >>> before each line)
> is a feature of the IDE that one uses.
> Did you even try the code?
> -Luke
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070701/771dadac/attachment.htm 


More information about the Tutor mailing list