Martin v. Löwis wrote: > Stephan Tolksdorf schrieb: > >>While Travis' proposal encompasses the data format functionality within >>the struct module and overlaps with what ctypes has to offer, it does >>not aim to replace ctypes. > > > This discussion could have been a lot shorter if he had said so. > Unfortunately (?) he stated that it was *precisely* a motivation > of the PEP to provide a standard data description machinery that > can then be adopted by the struct, array, and ctypes modules.
Struct and array I was sure about. Ctypes less sure. I'm very sorry for the distraction I caused by mis-stating my objective. My objective is really the extended buffer protocol. The data-type object is a means to that end. I do think ctypes could make use of the data-type object and that there is a real difference between using Python type objects as data-format descriptions and using another Python type for those descriptions. I thought to go the ctypes route (before I even knew what ctypes did) but decided against it for a number of reasons. But, nonetheless those are side issues. The purpose of the PEP is to provide an object that the extended buffer protocol can use to share data-format information. It should be considered primarily in that context. -Travis _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com