You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than have an application provide an iterable list of objects (like,
say, 'changes') *and* a value like 'num_changes', it'd be right handy if
the template could simply ask for the length of the list in some way.
Original issue reported on code.google.com by cmpilato on 19 Dec 2008 at 6:57
The text was updated successfully, but these errors were encountered:
Actually, right now, we don't allow an iterable -- just sequences. There was a
patch
a while back (gotta dig out from my mailbox) to allow for iterables. If that
happens,
then you would not necessarily be able to do a len() call (sequences have
length;
iterables do not).
That said, there will need to be an error if you attempt to take the length of a
scalar, and that same error could be used for iterables.
Did you have an idea for the syntax?
Oh. Idea for syntax. We had discussed .list-index at one point, noting that
names
with a dash (not an underscore) would be reserved to ezt. Maybe the syntax
could be:
[foo.bar.list-len]
Other ideas?
Original issue reported on code.google.com by
cmpilato
on 19 Dec 2008 at 6:57The text was updated successfully, but these errors were encountered: