Can a simple a==b 'hang' in and endless loop?
Terry Hancock
hancock at anansispaceworks.com
Thu Jan 19 14:52:02 EST 2006
On Thu, 19 Jan 2006 19:30:18 +0100
Claudio Grondi <claudio.grondi at freenet.de> wrote:
> Dennis Lee Bieber wrote:
> > On Thu, 19 Jan 2006 17:25:38 +0100, Claudio Grondi
> > <claudio.grondi at freenet.de> declaimed the following in
> > comp.lang.python:
> As shown just above in this thread the code:
> >>> a = [1]
> >>> a.append(a)
> >>> a
> [1, [...]]
> uses it, so it seems, that things have changed.
No it doesn't. It just uses "...".
That would be like complaining if I wrote an object
representation like:
<MyObject is 2>
that I was "using" the keyword "is" inconsistently. Wrong.
I'm not using it at all -- I'm just using the string "is".
Same above. Although the deeper meaning "an ellipsis shows
an omission" is preserved. The ellipsis in the recursive
definition substitutes for a literal representation which
is conceptually infinite (although due to recursion limits
is really finite).
--
Terry Hancock (hancock at AnansiSpaceworks.com)
Anansi Spaceworks http://www.AnansiSpaceworks.com
More information about the Python-list
mailing list