On Sunday, June 23, 2013 10:13:00 AM UTC-4, Alan Etkin wrote:Perhaps it is not too important but I am worried it will slow down parsing of rows and pickling/unpickling of sessions containing rows.
I don't really think we need the overwriting of __repr__, however, in
case it is implemented, I would suggest to use the case convention for
classes in Python (something like Web2pyLong I suppose). I know you are
aware of the notation but just in case.
Good point. I think I went with lowercase because long itself is lowercase (being a built-in type).
Besides, it might happen that
users could actually expect the row integer __repr__ to behave like in
the standard Python object. So we would solve one small issue while opening
another one.
Yes, that's one misgiving I have. I assume it's not too likely that any application code will really rely on the "L" being appended when __repr__ is applied, but if someone is doing some debugging, they might be confused by seeing values printed without the "L" that are not simple int's. Not sure how big an issue this would be, and I suppose the documentation could clear it up.
I don't have a particularly strong opinion either way. Some folks seem to be bothered by the mid-stream switch to long's, and this seems like a way to stick with long's but resolve the serialization problem. I guess there's also the option of making it configurable via an argument to DAL().
Anthony