Anthony Foglia (el 2010-02-16 a les 14:14:38 -0500) va dir::

> […] The user will probably want to pass in a dtype to construct the table, if
> need be.  I'd like to test the description obtained from that with the
> description from any pre-existing tables, and throw an error otherwise. […]

If ``atype`` is the dtype passed in by the user and ``adesc`` is the
description of an existing table, wouldn't ``atype == adesc._v_dtype`` do the
trick?  dtypes can be compared for structural and field name equality, and
according to the documentation of ``Description``:

    _v_dtype
        The NumPy type which reflects the structure of this table or
        nested column.  You can use this as the ``dtype`` argument of
        NumPy array factories.

Cheers,

::

  Ivan Vilata i Balaguer -- http://ivan.lovesgazpacho.net/

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to