deque vs list: performance notes
Courageous
jkraska1 at san.rr.com
Sun Jun 4 15:46:27 EDT 2000
More information about the Python-list mailing list
Sun Jun 4 15:46:27 EDT 2000
- Previous message (by thread): Awsome Site
- Next message (by thread): deque vs list: performance notes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ben Wolfson wrote: > > On Sun, 04 Jun 2000 19:18:03 GMT, Courageous <jkraska1 at san.rr.com> > wrote: > > >it would also be possible to allow my deque > >implementation to be concatenated in as well, but I didn't do it, > >because I didn't want to force the module dependency. > > Surely that code could be wrapped in #ifdef/#endif? Well, of course. I tend to think about these things as binary releases, but I suppose I could put conditional compilation code in yes. That's a good idea. :)- Another option would be to create a single ADT module which contained *all* the container classes: deque, dlist, pqueue, and anything else I come up with. Right now, the python idiom for using these things is usually something like: import deque d = deque.create() ... but it could just as easily be ... import adt dq = adt.deque() pq = adt.pqueue(n) dl = adt.dlist(n) BTW, I was trying to figure out how to pass 'optional' args to external C functions and couldn't grok it. Anyone know how? (I wanted pqueue and dlist to default to 10 or something if no n was offered). C/
- Previous message (by thread): Awsome Site
- Next message (by thread): deque vs list: performance notes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list