Does Scala offer functionality similar to Pretty Print pprint in Python?
Does Scala offer functionality similar to Pretty Print pprint in Python?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, it doesn’t. Except for XML, that is — there’s a pretty printer for that, which generates interpreter-readable data.
In fact, it doesn’t even have a way to print interpreter-readable data, mainly because of how strings are represented when converted to string. For instance,
List("abc").toStringisList(abc).Add to that, there’s no facility at all that will break them based on width, or ident nested collections.
That said, it is doable, within the same limits as
pprint.