Does Python really follow its philosophy of "Readability counts"?

Rhodri James rhodri at wildebst.demon.co.uk
Fri Jan 16 02:41:09 CET 2009


On Thu, 15 Jan 2009 17:07:00 -0000, Paul Rubin  
<"http://phr.cx"@nospam.invalid> wrote:

> Luis Zarrabeitia <kyrie at uh.cu> writes:
>> No, copy and paste from the original data structures would eliminate  
>> those
>> mismatches.
>
> The whole point is that would be possible if Python had data structure
> definitions ("types") that were possible to copy and paste from some
> single location, instead of building up structures dynamically, adding
> fields on the fly in ways that have become obscure over the evolution
> of the code.

mutter mutter __slots__ mutter mutter

It strikes me that what you actually want to write is the script that
scans your C data structure and spits out a Python class or module that
implements it with whatever degree of checking you want.  That should
make writing your actual data munger safer and faster, if I'm
understanding you correctly.

-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list