That makes some sense, but the question is not what are you doing in your code, but more what do we want to encourage among people who don't know what they're doing. Once you've got your own scheme worked out, obviously, you're going to call your declarative_base() whatever you like, but for somebody who is copying out of the tutorial, they probably haven't thought it through--they may not even keep their models in a separate module--and giving them a less ambiguous default to copy from might have benefits.
I don't think "longer and more annoying to type" is a particularly persuasive argument. Clarity trumps concision. Of course, there is a point at which concision improves clarity, but I think that point is somewhere between ThisClassIsTheBaseClassForDeclarativeModels and Declarative, not between Declarative and Base. On Wed, 2008-04-02 at 17:35 -0400, Bobby Impollonia wrote: > I like having the base of my models be <mypackage>.model.Base . That > name does a good job of describing what role the class plays; it is > the common base on which each model is built. > > If I were mixing declarative and non-declarative models, then I could > understand wanting the declarative ones to be distinguished as such, > but as long as I have a common base for my models (which is also the > case in the declarative documentation), I like it being called > model.Base rather than being named after an implementation detail. > > Declarative is also longer and more annoying to type. > > On Wed, Apr 2, 2008 at 5:21 PM, Michael Bayer <[EMAIL PROTECTED]> wrote: > > > > > > > > On Apr 2, 2:41 pm, "J. Cliff Dyer" <[EMAIL PROTECTED]> wrote: > > > It makes me twitch when I see the following: > > > > > > Base = declarative_base(metadata=metadata) > > > > > > class Spam(Base): > > > ... > > > > > > Base is a singularly undescriptive name to use for the base class of a > > > declarative table class. People are doing this because it's in the > > > documentation. If it were changed there, I think people would generally > > > follow along. Would others be in favor of changing the documentation to > > > something like this? > > > > > > Declarative = declarative_base(metadata=metadata) > > > > > > class Spam(Declarative): > > > ... > > > > > > I'd be happy to implement the change throughout the declarative docs if > > > there's support for the idea. > > > > > > > Its widely known that I defer all naming decisions to others....do we > > like Declarative, or something more ActiveRecord-y ? > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---