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

unify struct.pack params #54

Open
majek opened this issue Aug 11, 2014 · 0 comments
Open

unify struct.pack params #54

majek opened this issue Aug 11, 2014 · 0 comments

Comments

@majek
Copy link
Owner

majek commented Aug 11, 2014

~/puka/puka$ grep "pack(" *py|sed "s|.*pack(\(.*\)\$|\1|g"|cut -d "," -f 1|sort| uniq -c
     32 '!B'
      1 'B'
      1 '!BBBB'
      1 '!BHI'
      2 '>c'
      1 '>cB'
      2 '>cBi'
      1 '>cd'
      1 '>ci'
      2 '>cI'
      1 '>cq'
      1 '>cQ'
      2 '!HH'
      1 '!HHQH'
      1 '>I'
      4 '!I'
      8 '!IB'
     14 '!IHB'
      1 '!IHIH'
      1 '!II'
      1 '!IIHB'
      3 '!IQB'
      1 '!Q'
~/puka/puka$ grep "unpack_from(" *py|sed "s|.*unpack_from(\(.*\)\$|\1|g"|cut -d "," -f 1|sort| uniq -c
      2 '>B'
     26 '!B'
      2 'B'
      1 '!BB'
      1 '!BHI'
      1 '>d'
      1 '>f'
      1 '>h'
      1 '!H'
      3 '!HB'
      2 '!HH'
      1 '!HIH'
      1 '!HxxQ'
      2 '>i'
      3 '>I'
      8 '!I'
      1 '!II'
      1 '>q'
      1 '>Q'
      1 '!Q'
      1 '!QB'
      2 '!QBB'

We could kill '!' for 'B', not use '>', and maybe use ord instead of B. Or even proper pack constructructors for more complex things.

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

No branches or pull requests

1 participant