gaogaotiantian / objprint

A library that can print Python objects in human readable format
Apache License 2.0
519 stars 43 forks source link

Change the output order of line number and arg name #67

Closed riyadparvez closed 2 years ago

riyadparvez commented 2 years ago

For the following example:

from objprint import config, install, objjson, op

config(line_number=True)
config(arg_name=True)

x = 1
op(x)

This is the output right now:

x:
<module> (/path/to/objprint-test.py:7)
1

What I think more intuitive is argument name followed by the value and the file and line number at the top. In this particular case:

<module> (/path/to/objprint-test.py:7)
x:
1

Any thoughts?

gaogaotiantian commented 2 years ago

You are right, it should be fixed.