Skip to content

Commit

Permalink
Use [] instead of list()
Browse files Browse the repository at this point in the history
The code should be a little faster now.
  • Loading branch information
LudovicRousseau committed Sep 22, 2024
1 parent f10755f commit 5695f76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/smartcard/scard/scard.i
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ Value of state:
>>> raise PCSCExceptions.ListReadersException(hresult)
>>>
>>> # get status change
>>> readerstates = list()
>>> readerstates = []
>>> for reader in readers:
>>> readerstates.append((reader, SCARD_STATE_UNAWARE))
>>>
Expand Down
2 changes: 1 addition & 1 deletion src/smartcard/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def toASCIIString(bytelist):
". .~."
"""

res = list()
res = []
for b in bytelist:
if b < 32 or b > 127:
c = '.'
Expand Down

0 comments on commit 5695f76

Please sign in to comment.