Maybe a little bug of ipython 0.7.3 ?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Jan 8 16:59:33 CET 2007


In <mailman.2416.1168269839.32031.python-list at python.org>,
fdu.xiaojf at gmail.com wrote:

> In [8]: a = range(1000)
> 
> In [9]: a?
> Type:           list
> Base Class:     <type 'list'>
> String Form:    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
> 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 <...> 0, 981, 98
> 2, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 
> 997, 998, 999]
> Namespace:      Interactive
> Length:         1000
> Docstring:
>     list() -> new list
> list(sequence) -> new list initialized from sequence's items
> 
> *Please note that there is an extra "0" after "**26 <...>", which 
> doesn't appear for the followling cases:*

This 0 is the last digit of `980`.  If the string form is very long the
string itself is shortened by leaving out the middle part.  It's
irrelevant which object it was before the conversion to a string.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list