I was just using SQLAlchemy as an example. Much of TG seems to lean more towards using kwargs than nonkwargs, as in the scheduler examples.
turbogears.scheduler.add_interval_task(action=do_something, taskname='do_something', initialdelay=0, interval=10) Same code from the first post. Nothing to do with function, just style. Personally, I can remember names easier than the order of arguments. By using, I mean use kwargs instead of nonkwargs in methods and not use any nonkwargs. On Thu, April 26, 2007 1:35 am, Christoph Zwerschke wrote: > tsume wrote: >> The question is more about style. Do you think Webware will stay with >> using nonkeyword arguments, or start using keyword arguments. Much new >> software which is python based, like SQLAlchemy, seem to all be adapting >> kwargs. > > It's still unclear for me what you mean with "using" keyword arguments. > > Isn't it mostly a matter of the users whether they use keywords > arguments or not, or rather a matter of where it is appropriate and > where not? If you're using SQLAlchemy, you aren't using only kwargs > either. For instance, when I define > > addresses = Table('addresses', metadata, > Column('address_id', Integer, primary_key = True), > Column('user_id', Integer, ForeignKey("users.user_id")), > Column('street', String(100)), > Column('city', String(80)), > Column('state', String(2)), > Column('zip', String(10)) > ) > > I'm using one kwarg and 15 non-kwargs, i.e. I do not say > > Column(name='user_id', type=Integer, > ForeignKey=ForeignKey("users.user_id")) > > And conversly, Webware already makes use of kwargs in a lot of places. > The only thing Webware is maybe we can provide better argument names and > more reasonable defaults in a few places. > > -- Chris ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss