@@ -863,43 +863,38 @@ class Information(PrefixOperator):
863863
864864
865865 >> a = 2;
866- >> Information[a]
867- = a = 2
868-
869-
866+ X> Information[a]
867+ | a = 2
870868 >> f[x_] := x ^ 2
871869 >> g[f] ^:= 2
872870 >> f::usage = "f[x] returns the square of x";
873871 X> Information[f]
874- = f[x] returns the square of x
875-
876- >> ? Table
877- =
878- . 'Table[expr, {i, n}]'
879- . evaluates expr with i ranging from 1 to n, returning
880- . a list of the results.
881- . 'Table[expr, {i, start, stop, step}]'
882- . evaluates expr with i ranging from start to stop,
883- . incrementing by step.
884- . 'Table[expr, {i, {e1, e2, ..., ei}}]'
885- . evaluates expr with i taking on the values e1, e2,
886- . ..., ei.
887- .
888-
889- >> Information[Table]
890- =
891- . 'Table[expr, {i, n}]'
892- . evaluates expr with i ranging from 1 to n, returning
893- . a list of the results.
894- . 'Table[expr, {i, start, stop, step}]'
895- . evaluates expr with i ranging from start to stop,
896- . incrementing by step.
897- . 'Table[expr, {i, {e1, e2, ..., ei}}]'
898- . evaluates expr with i taking on the values e1, e2,
899- . ..., ei.
900- .
901- . Attributes[Table] = {HoldAll, Protected}
902- .
872+ | f[x] returns the square of x
873+
874+ X> ? Table
875+ | 'Table[expr, {i, n}]'
876+ | evaluates expr with i ranging from 1 to n, returning
877+ | a list of the results.
878+ | 'Table[expr, {i, start, stop, step}]'
879+ | evaluates expr with i ranging from start to stop,
880+ | incrementing by step.
881+ | 'Table[expr, {i, {e1, e2, ..., ei}}]'
882+ | evaluates expr with i taking on the values e1, e2,
883+ | ..., ei.
884+
885+ X> Information[Table]
886+ | 'Table[expr, {i, n}]'
887+ | evaluates expr with i ranging from 1 to n, returning
888+ | a list of the results.
889+ | 'Table[expr, {i, start, stop, step}]'
890+ | evaluates expr with i ranging from start to stop,
891+ | incrementing by step.
892+ | 'Table[expr, {i, {e1, e2, ..., ei}}]'
893+ | evaluates expr with i taking on the values e1, e2,
894+ | ..., ei.
895+ |
896+ | Attributes[Table] = {HoldAll, Protected}
897+ |
903898 """
904899
905900 operator = "??"
@@ -910,14 +905,14 @@ class Information(PrefixOperator):
910905
911906 def format_definition (self , symbol , evaluation , options , grid = True ):
912907 'StandardForm,TraditionalForm,OutputForm: Information[symbol_, OptionsPattern[Information]]'
908+ ret = Symbol ("Null" )
913909 lines = []
914910 if isinstance (symbol , String ):
915911 evaluation .print_out (symbol )
916- evaluation .evaluate (Expression ('Information' , Symbol ('System`String' )))
917- return
912+ return ret
918913 if not isinstance (symbol , Symbol ):
919914 evaluation .message ('Information' , 'notfound' , symbol )
920- return Symbol ( 'Null' )
915+ return ret
921916 # Print the "usage" message if available.
922917 usagetext = _get_usage_string (symbol , evaluation )
923918 if usagetext is not None :
@@ -928,17 +923,16 @@ def format_definition(self, symbol, evaluation, options, grid=True):
928923
929924 if grid :
930925 if lines :
931- return Expression (
926+ infoshow = Expression (
932927 'Grid' , Expression (
933928 'List' , * (Expression ('List' , line ) for line in lines )),
934929 Expression (
935930 'Rule' , Symbol ('ColumnAlignments' ), Symbol ('Left' )))
936- else :
937- return Symbol ('Null' )
931+ evaluation .print_out (infoshow )
938932 else :
939933 for line in lines :
940934 evaluation .print_out (Expression ('InputForm' , line ))
941- return Symbol ( 'Null' )
935+ return ret
942936
943937 # It would be deserable to call here the routine inside Definition, but for some reason it fails...
944938 # Instead, I just copy the code from Definition
@@ -1005,7 +999,9 @@ def rhs(expr):
1005999
10061000 def format_definition_input (self , symbol , evaluation , options ):
10071001 'InputForm: Information[symbol_, OptionsPattern[Information]]'
1008- return self .format_definition (symbol , evaluation , options , grid = False )
1002+ self .format_definition (symbol , evaluation , options , grid = False )
1003+ ret = Symbol ("Null" )
1004+ return ret
10091005
10101006
10111007class Clear (Builtin ):
0 commit comments