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

Comments on DecodeFunctions.py #11

Open
beckyc567 opened this issue Sep 3, 2018 · 0 comments
Open

Comments on DecodeFunctions.py #11

beckyc567 opened this issue Sep 3, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@beckyc567
Copy link
Collaborator

DecodeFunctions.py

  • specified pretty much everything in the documentation section at the top, except a version - do you need to at this level?

  • the commenting runs out a bit early

  • is there a reason for ...

def stringToIntList(aString, encodingType):
result = []
[result.append(ord(i)) for i in aString]
return result

... rather than ..

def stringToIntList(aString, encodingType):
return [ord(i) for i in aString]

... or ...

def stringToIntList(aString, encodingType):
result = [ord(i) for i in aString]
return result
... i.e. in the event that you might want to use the intermediate result before returning?

  • intArrayToIntArray fails if given an unrecognised outputType - it's OK for inputType as you have the unconditional else - could just slap an unconditional else to trap it as for inputType, or possibly add a defensive exception trap around the code or allow the function simply throw an exception to the parent - if you follow the inputType structure, I would guess the "int8" path is the default?
@richClubb richClubb self-assigned this Sep 3, 2018
@richClubb richClubb added the bug Something isn't working label Sep 3, 2018
@richClubb richClubb added this to the Version 0.1 Release milestone Sep 3, 2018
@richClubb richClubb removed this from the Version 0.1 Release milestone Sep 17, 2018
@richClubb richClubb added this to Task in UdsConfigTool Sep 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
UdsConfigTool
  
Task
Development

No branches or pull requests

2 participants