Open amnaredo opened 2 years ago
This is an unavoidable limitation of pprint; the typeclass derivation that it does needs to know the types of the contents statically in order to print it, so anything that's a List[Any]
is going to fall back to the default PPrint[Any]
for each item of the list, which is just .toString
Original Author: lihaoyi
scala> pprint.stringify(List("asdf", "asdf")) res0: String = List("asdf", "asdf")
scala> pprint.stringify(List("asdf", "asdf", 1)) res1: String = List(asdf, asdf, 1)
scala> pprint.pprintln(List("asdf", "asdf", 1)) List(asdf, asdf, 1)
scala> pprint.pprintln(List("asdf", "asdf")) List("asdf", "asdf") ID: 189 Original Author: mduszyk