you also can probably say: assign_mapper(None, class, table, extension=sac.ext, **otherargs)
however, id mostly recommend making a little "assignmapper" method of your own that sets up the class the way you want, using your global SAContext, but just taking it from the global scope instead of requiring it as an argument to the function. in fact this is really how assignmapper should work: from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.assignmapper import setup sac =SAContext(<args>) mapper = setup(extension=sac.ext) # then use "mapper" just like the regular "mapper" class MyClass(object):pass mapper(MyClass, sometable, ....) if people think its a good idea, SAContext itself could just have "mapper" on it: from sqlalchemy import * from sqlalchemy.orm import * sac = SAContext(<args>) mapper = sac.mapper class MyClass(object):pass mapper(MyClass, sometable, ....) the main idea here is that you just use the "mapper" function to make mappers; its the twiddly things at your import level that change its semantics. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
