Re: Axiom on the client and server, Client-side object caches was Re: Any ideas why Axiom is acting odd?
Robert Gravina <[email protected]> Mon, 3 Jul 2006 15:43:05 +0900
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Message-ID | <[email protected]> |
On 2006/07/03, at 15:36, Robert Gravina wrote: > e.g. > import types > if type(myitem.books) is types.IntType: > myitem.books = cache.get(myitem.books) > for book in myitem.books: > print book.name oops, that should be import types for book in myitem.books: if type(myitem.book) is types.IntType: myitem.books = cache.get(myitem.books) print book.name and maybe with callbacks for book in myitem.books: if type(myitem.book) is types.IntType: myitem.books = cache.get(myitem.books).addCallback(gotBook) def gotBook(book): print book.name Although I'm not sure we'd get them in order! OK, maybe this would only work well for references to an object, not looping through whole lists of them. Robert