Re: [Tutor] globals and map()

2005-07-19 Thread Kent Johnson
Luis N wrote: > On 7/19/05, *Kent Johnson* <[EMAIL PROTECTED] > > wrote: > > Luis N wrote: > > I'd appreciate some comments on my use of globals and the map > function. > > I don't see the need for the global declaration; desc, vw, > primaryKey are

Re: [Tutor] globals and map()

2005-07-19 Thread Luis N
On 7/19/05, Kent Johnson <[EMAIL PROTECTED]> wrote: Luis N wrote:> I'd appreciate some comments on my use of globals and the map function.>> import metakit> import marshal>> db = metakit.storage('addy.mk ',1)> dbs = db.getas('dbs[db:S,marshal:B]')>> def li(i):> i = i[:-2]>

Re: [Tutor] globals and map()

2005-07-19 Thread Kent Johnson
Luis N wrote: > I'd appreciate some comments on my use of globals and the map function. > > import metakit > import marshal > > db = metakit.storage('addy.mk ',1) > dbs = db.getas('dbs[db:S,marshal:B]') > > def li(i): > i = i[:-2] > return i > > def selectDB(f): > i

[Tutor] globals and map()

2005-07-19 Thread Luis N
I'd appreciate some comments on my use of globals and the map function. The idea here is that (simple) Metakit database definitions can be loaded dynamically from another Metakit database detifintion. (Yes this would likely be easier with a SQL database, don't ask!) Nasty code ahead: import metak