Note, the Rows class already has .first, .last, .find, .sort, and .exclude methods -- we've just added one more such method. Hopefully most folks will recognize that because .select() returns a Rows object, any subsequent method calls must be operating on the Rows object. Those who don't may also have trouble figuring out the more explicit list comprehension/generator expression code (which prompted this thread to begin with). To make things more clear, you can do:
rows = db().select(db.mytable.myfield) values = rows.column() Anthony On Wednesday, May 28, 2014 5:23:09 PM UTC-4, Leonel Câmara wrote: > > I don't like this new method. People can (due to being used to the method > chaining/cascading patterns which are used quite commonly in DALs) think > that the DAL will only request the given column from the DB when that's not > what's happening. > > I've done this many times using list comprehensions and generator > expressions which are readable to everyone who knows python and doesn't > lead to mistakes. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

