Something like:

     (db.mytable.id == 3).ignore_common_filters().select()

Or:

     (db.mytable.id == 3).select(ignore_common_filters=True)

'One way of doing it' is an argument for fixing it and officially
deprecating the old way. I'd sympathize with the objections more if it
meant actual legacy breakage, but that's not necessary in this case.

My main concern, though, is not syntactical but rather that Set
requires a good ~5 minute detour to explain that, 'This is the way it
is even though it doesn't make sense.' Again, we're talking about the
hardest to understand aspect of web2py. I'm sure you're familiar with
how most students new to web programming are very sketchy on the
relational model (or databases in general). Web2py takes that model
and abstracts it to Python in a clever but disorienting way. Every
measure that minimizes that confusion would pay dividends for
learners. I'm creating web2py learning material now, and DAL basics
are consistently the biggest challenge.

At the very least, the docs should be updated to point out that Set is
a legacy design mistake. As it is, learners will confuse themselves
trying to justify its existence.

Reply via email to