Skip to content

Conversation

@tejaskhajanchee
Copy link

My response to Issue#32 regarding more use of struct.unpack() function. Please review

Minor changes for my own sake. Not really important
First, There is no need for 'if constructs' inside the @Property decorators (getter functions). They will simply increase the overhead of checking that condition each time the function is called. All the assignment can be done the constructor itself.
Timestamp can be left as an integer. And it can be interpreted as `datetime.datetime()` object when required to be printed. This is because keeping it as an integer it can be converted into other timestamp formats like the SAS Timestamp format that starts with January 1, 1960, unlike the UNIX Time.  In this way, this parser can be used with other software also.
@coveralls
Copy link

coveralls commented Jun 1, 2019

Coverage Status

Coverage increased (+0.01%) to 93.735% when pulling 5747421 on tejaskhajanchee:my-edits-(comms-with-alecalve) into 5069a1d on alecalve:master.

Similar to `block_header.py`, `if constructs` are not needed in the `getter methods`. All those assignments can be done in the constructor itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants