Michael Bayer wrote: > at what point did we even have a __getattr__ on RowProxy ? the close () > method on there is not very important, more important on ResultProxy. > but you do have "items", "keys", "values", etc. also somewhat generic > names. without SVN annotating to see if it was my idea originally, id > say why not just say row['colname'] as opposed to row.colname ? > (SqlSoup a nicer alternative if you really want somerow.attribute ?)
Back on 25/1/06 in response to my question asking: "Is there any reason why Result/RowProxy doesn't or couldn't support column accessors in the same way as the mapper does? i.e. row.col2 in addition to or instead of row['col2'], row[mytable.c.row2] This would be more consistent and would make switching from mapper <=> table based code easier and maybe a little more intuitive." A certain Michael Bayer :-) wrote: > > why dont you add __getattr__ to RowProxy ...and make your dream a reality > ! :) (plus maybe a nod in the sqlconstruction.myt doc) So I did. (IIRC it was around the same time as some other changes to the existing keys, values, etc) I'd be interested to hear what people think? Is anyone else using it? Is it going to be more trouble than it is worth? As I said in the original email, I like it because it is consistent with the way direct table-based code works. Robert Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users