Does Scala offer functionality similar to Pretty Print in Python?

Does Scala offer functionality similar to Pretty Print pprint in Python?

+8
scala pprint
source share
1 answer

No, it is not. With the exception of XML, that is, for this there is a beautiful printer that generates data read by the interpreter.

In fact, it doesn’t even have a way to print the data read by the interpreter, mainly because of how the lines are represented when converting to a string. For example, List("abc").toString - List(abc) .

Add to this, no means at all will break them down based on width or identify nested collections.

However, this is doable, within the same limits as pprint .

+5
source share

All Articles