[vtkusers] More on VTK 5.0.4: hashing vtk class objects broken?

Berk Geveci berk.geveci at kitware.com
Wed May 27 09:56:02 EDT 2009


This is definitely not intentional. Furthermore, I can't reproduce it
on cvs head. Do you know what caused the problem between 5.0.3 and
5.0.4. Also, can you try 5.4 as I don't think we support 5.0 anymore?

-berk

On Wed, May 27, 2009 at 1:19 AM, Carlos Scheidegger
<cscheid at sci.utah.edu> wrote:
> Here's a simpler way to trigger the issue I just mentioned. The core problem
> is related to generating a hash from the vtk class object. On VTK 5.0.3 (and
> Python 2.5.2), I get this:
>
>>>> import vtk
>>>> hash(vtk.vtkObject)
> 140169743808624
>>>> id(vtk.vtkObject)
> 140169743808624
>
> This seems to me the correct behavior. On VTK 5.0.4 (and Python 2.6.2), I
> get this:
>
>>>> hash(vtk.vtkObject)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> AttributeError: mro
>>>> id(vtk.vtkObject)
> 3083232608L
>
> Is this an intended change? It is very convenient to use vtk classes in
> python dictionaries...
>
> Thanks!
> -carlos
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list