|
Re: Quick 'len()' speedup for Pyrex: msg#00048python.pyrex
On Thu, 22 Apr 2004 14:05:56 -0400 "Phillip J. Eby" <pje@xxxxxxxxxxxxxxxxx> wrote: > If your Pyrex code uses the 'len()' builtin, here's a handy quick fix > you can pop in at the beginning of your code: > > cdef extern from "Python.h": > int len "PySequence_Length" (object o) except -1 Does this work with user-defined len(), such as : class MyClass: def __len__(self): return 3 ??? Jiba |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: distutils.cfg and weave etc....: 00048, Voidspace |
|---|---|
| Next by Date: | Re: Quick 'len()' speedup for Pyrex: 00048, Phillip J. Eby |
| Previous by Thread: | Quick 'len()' speedup for Pyrexi: 00048, Phillip J. Eby |
| Next by Thread: | Re: Quick 'len()' speedup for Pyrex: 00048, Phillip J. Eby |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |