I vote for number 3 as well. As Paul already noted, his MA module already does something similar to this and I've found that very handy while working interactively.
On Tue, 2002-06-11 at 11:43, Perry Greenfield wrote:
... Yet on the other hand, it is undeniably convenient to use repr (by typing a variable) for small arrays interactively rather than using a print statement. This leads to 3 possible proposals for handling repr:
- Do what is done now, always print a string that when
eval'ed will recreate the array.
- Only give summary information for the array regardless of
- Print the array if it has fewer than THRESHOLD number of
elements, otherwise print a summary. THRESHOLD may be adjusted by the user.