Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the __repr__ of IpAddress instances more human-readable. #49

Open
exhuma opened this issue Jul 6, 2018 · 0 comments
Open

Make the __repr__ of IpAddress instances more human-readable. #49

exhuma opened this issue Jul 6, 2018 · 0 comments

Comments

@exhuma
Copy link
Owner

exhuma commented Jul 6, 2018

Currently the representation of the IpAddress type contains a byte-string. Converting the byte-string to an ip-address would make log output much more readable.

The following line would break the API with the superclass Type:

IpAddress('192.168.1.1')

becuase the superclass requires a bytes object as argument. The following would keep a consistent API but would make output quite long:

IpAddress.from_string('192.168.1.1')

Alternatively a non-executable form may be used:

<IpAddress 192.168.1.1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant