Re: 51w6 *s performance patch
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: 51w6 *s performance patch
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2005年5月19日 16:47:10 -0300
> Read the old thread for a bunch of suggestions. I'd rather
> have an append operator (t[] = x) than a size/length operator.
But then you need an append operator, a "last" operator (that gets the
contents of the last element in your list), plus a remove operator.
With *t you get all of them (plus the length itself):
t[*t+1] = x -- append
print(t[*t]) -- last element
t[*t] = nil -- remove
-- Roberto