469,342 Members | 5,664 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

Help on slow attribute copy

Hi there,

I am fairly new to python, the problem is as follows:

newnodes = {}
for i in nodes:
newnodes[i.label] = i.coordinate

is very slow, which is due to the dots, I know that for functions the
dot lookup
can be done outside the loop, can this be done for attributes in any
way? (in such a way that it is fast)
Coordinate is a tuple in this case, filling a dictionary of that size is
no problem without dots.
I use python 2.0 as shipped with abaqus, there are about 100000 nodes
in the current case, and more to come, and the
system can be stuck on this for 15+ minutes :-(

Greetings
Wout



This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Jul 19 '05 #1
0 990

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by CB | last post: by
2 posts views Thread by Mirjana Rakuljic | last post: by
1 post views Thread by sommarlov | last post: by
3 posts views Thread by Simon Brooke | last post: by
3 posts views Thread by Ryan Liu | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.