[sqlalchemy] Re: Column __repr__ with sqlalchemy types instead of db-specific object instances?

2006-11-08 Thread jeffk
Michael Bayer wrote: __repr__() really annoys me because no matter what i do with it, people tell me im using it incorrectly. technically, __repr__() is supposed to return a string that when eval'ed would return the object instance. which is not realistic for an object like Table since its

[sqlalchemy] Re: Column __repr__ with sqlalchemy types instead of db-specific object instances?

2006-11-08 Thread Michael Bayer
when you reflect a table from the DB, and you get back PGString, that is the actual type instance. In some cases, table reflection could be mapped to a type instance that is specific to that DB (such as MySQL's enum). i dont think changing the __repr__ of all the db- specific types to

[sqlalchemy] Re: Column __repr__ with sqlalchemy types instead of db-specific object instances?

2006-11-05 Thread Michael Bayer
__repr__() really annoys me because no matter what i do with it, people tell me im using it incorrectly. technically, __repr__() is supposed to return a string that when eval'ed would return the object instance. which is not realistic for an object like Table since its an enormous construction.