Where can I get the new version of python-mode for emacs?
Hi all, My first try on using RST to write an email. so I can (will) make mistakes :-) I am experiencing the problem shown in this thread_ of the `python-mode`_ discussion list hosted at SourceForge. .. _thread: https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1215039&group_id=86916 .. _`python-mode`: http://sourceforge.net/projects/python-mode/ I have version 4.70 installed in my debian system (installed with apt-get, so I don't know where the sources are from). After reading the thread_ at sourceforge, I did a google search for "python emacs" and found the `Emacs goodies`_ page at python.org .. _`Emacs goodies`: http://www.python.org/emacs/ where I was redirected to the `python-mode`_ page at SourceForge. There I could only find version 1.0alpha (4.6) (the one said too old in the thread_) I also tried the `Barry Warsaw's Elisp packages`_ as suggested at `Emacs goodies`_ page "for some more up-to-date versions of these files", but the link doesn't work. .. _`Barry Warsaw's Elisp packages`: http://barry.warsaw.us/elisp/ So, *where can I find a newer version of emacs' python-mode*? Thanks, Marcio -- http://mail.python.org/mailman/listinfo/python-list
Re: Order of elements in a dict
Thanks for the help! Marcio -- http://mail.python.org/mailman/listinfo/python-list
Order of elements in a dict
Hi! In dictionaries, unlinke lists, it doesn't matter the order one inserts the contents, elements are stored using its own rules. Ex: >>> d = {3: 4, 1: 2} >>> d {1: 2, 3: 4} So, my question is: if I use keys() and values() it will give me the keys and values in the same order? In other words, it is safe to do: >>> dd = dict(zip(d.values(),d.keys())) to exchange keys and values on a dictionary? Or I can have the values and keys in a different order and end with something like this: >>> dd {2: 3 , 4: 1} instead of: >>> dd {2: 1, 4: 3} For this example it works as I wanted (the second output), but can I trust this? Also, if someone has a better way to exchange keys and values in a dict, I would like to learn. :-) Thanks! Marcio -- http://mail.python.org/mailman/listinfo/python-list