Re: fastest data structure for retrieving objects identified by (x, y) tuple?

2012-10-04 Thread Benjamin Jessup
On 10/4/2012 12:20 AM, python-list-requ...@python.org wrote: How do you know that? No offence, but if you can't even work out whether lookups in a dict or a list are faster, I can't imagine why you think you can intuit what the fastest way to retrieve the nearest neighbours would be. Whats wro

Re: Python-list Digest, Vol 109, Issue 20

2012-10-04 Thread Benjamin Jessup
On 10/4/2012 12:20 AM, python-list-requ...@python.org wrote: How do you know that? No offence, but if you can't even work out whether lookups in a dict or a list are faster, I can't imagine why you think you can intuit what the fastest way to retrieve the nearest neighbours would be. Whats wro

fastest data structure for retrieving objects identified by (x,y) tuple?

2012-10-03 Thread Benjamin Jessup
I have a group of objects identified by unique (x,y) pairs and I want to find out an object's "neighbors" in a matrix of size 2400 x 2400. # #obj# # # # # # #obj# 3 x 3 Example # # # # # ##

[python-list] python application file format

2012-09-26 Thread Benjamin Jessup
Hello all, What do people recommend for a file format for a python desktop application? Data is complex with 100s/1000s of class instances, which reference each other. Write the file with struct module? (Rebuild object pointers, safe, compact, portable, not expandable without reserved space)