On 04/28/2015 04:50 PM, Stefano Forli wrote: > Now, I understand that a segFault shouldn't happen, but I'm not sure > what would be the way to prevent it. Is this a bug or something that > nobody should ever do (and it should be added to the documentation)?
It's something nobody should ever do: python iterators are objects and what happens if you modify the value is anybody's guess. (With native containers it's usually a shallow copy of the element in a temp. value which gets overwritten on the next iteration. With other kinds of containers it may open a portal to asgard and brain-eating alien zombies start pouring in.) Index-based accesses should work though. Try for i in len( pmol.atoms ) : ... use pmol.atoms[i] ... -- Dimitri Maziuk Programmer/sysadmin BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss