Skip to content

Conversation

@Kriechi
Copy link
Member

@Kriechi Kriechi commented Jan 12, 2016

No description provided.

@Lukasa
Copy link
Member

Lukasa commented Jan 13, 2016

This is an interesting idea, but I wonder if it wouldn't be more effective if you used the string repr instead: body = repr(self.serialize_body()). How do you feel about that?

@Kriechi
Copy link
Member Author

Kriechi commented Jan 13, 2016

Usually I'm not interessted in the body of a data frame (mostly plain text anyway), but in one of the other frame types (headers, error codes, etc).

I think this is not very readable or intuitive to understand:

>>> repr(b"\x02\x10\x32\x41\x42\x43\x44") "'\\x02\\x102ABCD'"

where as this is much better IMHO:

>>> b"\x02\x10\x32\x41\x42\x43\x44".encode('hex') '02103241424344'
@Lukasa
Copy link
Member

Lukasa commented Jan 13, 2016

@Kriechi That's fair. In that case, you'll need to fix the test breakage. =)

@Kriechi Kriechi force-pushed the improve-frame-repr branch 7 times, most recently from 9108b42 to f2cac44 Compare January 13, 2016 10:40
@Kriechi Kriechi force-pushed the improve-frame-repr branch from f2cac44 to ba9f015 Compare January 13, 2016 10:51
@Kriechi
Copy link
Member Author

Kriechi commented Jan 13, 2016

Done.

@Lukasa
Copy link
Member

Lukasa commented Jan 13, 2016

\o/

Lukasa added a commit that referenced this pull request Jan 13, 2016
encode non-printable body in hex
@Lukasa Lukasa merged commit 49e41e8 into python-hyper:master Jan 13, 2016
@Kriechi Kriechi deleted the improve-frame-repr branch January 13, 2016 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants