Finding fast default aliases in Python -


Is there a faster way to do the following for too many big names?

  aliases = country name = surname [country name]  

1).

You can do something like this to save some typing:

  country name = aliases.get (country name, country name)  

(But I think it is very easy to read your code)

When it comes to speed, then what is the best solution if "hit" or "miss" Will be the majority of. But it probably will be in the nanosecond range when it comes to difference.


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -