bug in docs or in ets:info/1?

Fredrik Thulin <>
Tue Nov 2 07:35:12 CET 2004


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).
2> is_list(L).
3> is_tuple(L).

Documentation :

>info(Tab) -> [{Item,Value}] | undefined
>Tab = tid() | atom()
>Item, Value - see below
>Returns information about the table Tab as a list of {Item,Value}

The fix in ets.erl seems pretty obvious, but maybe there are concerns 
with code that is expecting the current format?


More information about the erlang-questions mailing list