Skip to content

tiny update code style & fix typo#287

Open
Jackyele wants to merge 2 commits into
Thriftpy:developfrom
Jackyele:develop
Open

tiny update code style & fix typo#287
Jackyele wants to merge 2 commits into
Thriftpy:developfrom
Jackyele:develop

Conversation

@Jackyele

Copy link
Copy Markdown
  1. fix typo
  2. tiny code style update
  3. change the type of thrift_reserved_keywords to set for possible speed up
import timeit

def test_l(s=thrift_reserved_keywords):
    return 'aa' in s

def test_s(s=set(thrift_reserved_keywords)):
    return 'aa' in s

# test...
print timeit.repeat(test_l)  # 1.476s
print timeit.repeat(test_s)  # 0.143s

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.

1 participant