Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's rough, but I recently explored/compared various struct-like packages https://github.com/moreati/structlytyped


Very cool. Any conclusions from the experiment?

Disclosure: I'm the primary author/maintainer of suitcase (https://github.com/digidotcom/python-suitcase). In your example, you can shave off a line by doing the following:

    example = FIDOAttestation.from_data(a)


No conclusions yet, the script (together with https://github.com/moreati/parsedover) is mainly a dumping ground/personal notes while I try various parsing approaches. https://github.com/moreati/structlytyped was a diversion into parsing binary data.

I'm trying various not-regex syntaxes. My motivation is: we all agree regex is bad, but we keep using it because it's available everywhere and hence the least common denominator (a schelling point). What would it take to get beyond regex as the goto pattern matching/parsing? At least for casual use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: