Maybe a little bug of ipython 0.7.3 ?

F

fdu.xiaojf

I'm new to ipython, and i found it a very cool product.

$ ipython
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.7.3 -- An enhanced Interactive Python.
<snip>

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:*

In [10]: b = range(100)

In [11]: b?
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 <...> , 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99]
<snip>

In [12]: c = range(10000)

In [13]: c?
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 <...> , 9984, 99
85, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996,
9997, 9998, 9999]
<snip>
 
M

Marc 'BlackJack' Rintsch

In <[email protected]>,
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top