bug in docs or in ets:info/1?
Fredrik Thulin
ft@REDACTED
Tue Nov 2 07:35:12 CET 2004
Hi
It seems to me that the documentation of ets:info/1 isn't in sync with
the code, or even more probably the other way around. The R10B-0
documentation says that ets:info/1 returns a list of tuples, when it is
in fact returning a tuple containing a number of tuples. I think a list
of tuples would be more suitable.
Eshell V5.4 (abort with ^G)
1> L = ets:info(inet_cache).
{{memory,277},
...
{protection,public}}
2> is_list(L).
false
3> is_tuple(L).
true
4>
Documentation :
>info(Tab) -> [{Item,Value}] | undefined
>
>Types:
>
>Tab = tid() | atom()
>Item, Value - see below
>
>Returns information about the table Tab as a list of {Item,Value}
>tuples:
The fix in ets.erl seems pretty obvious, but maybe there are concerns
with code that is expecting the current format?
/Fredrik
More information about the erlang-questions
mailing list