tomer filiba <tomerfiliba at gmail.com> wrote: > the point is -- ctypes can define C types. not the TCP/IP stack. > Construct can do both. it's a superset of ctype's typing mechanism. > but of course both have the right to *coexist* -- > ctypes is oriented at interop with dlls, and provides the mechanisms > needed for that. > Construst is about data structures of all sorts and kinds. > > ctypes is a very helpful library as a builtin, and so is Construct. > the two don't compete on a spot in the stdlib. I don't agree. Both ctypes and construct provide a way to describe a binary-packed structure in Python terms: and this is an overload of functionality. When I first saw Construct, the thing that crossed my head was: "hey, yet another syntax to describe a binary-packed structure in Python". ctypes uses its description to interoperate with native libraries, while Construct uses its to interoperate with binary protocols. I didn't see a good reason why you shouldn't extend ctypes so to provide features that it is currently missing. It looks like it could be easily extended to do so. Giovanni Bajo
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4