Re: [IronPython] Dictionary Ordering

2006-05-17 Thread J. Merrill
At 06:44 PM 5/17/2006, Michael Foord wrote (in part) >Dino Viehland wrote (in part): >> It's an implementation detail which may change in future versions. >[snip] >I was wondering whether the ordering in IronPython was a design decision or a >con-incidence. [snip] It's likely that a dictionary wi

Re: [IronPython] Dictionary Ordering

2006-05-17 Thread Michael Foord
Dino Viehland wrote: > It's an implementation detail which may change in future versions. > > There's a OrderedDict in the Python cookbook though that should work w/ IP. > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438823 > > Hey - there's an even better one at : http://www.v

Re: [IronPython] Line numbers in snippets...

2006-05-17 Thread J. Merrill
I was trying to suggest to the IP developers that access to file, line and perhaps column should be readily available from any exception. Your response suggests that I might not have said so clearly. When there's a Name Error, it's often possible to work on solving the problem without line num

Re: [IronPython] from xml import xpath

2006-05-17 Thread Dino Viehland
You’re right, I did miss that…  Looking at this page: http://pyxml.sourceforge.net/topics/howto/section-install.html  It would seem that you may be right about the Pyd’s (it at least requires a C compiler, making that likely – and almost guaranteeing it won’t work w/ IronPython).   Unfort

Re: [IronPython] from xml import xpath

2006-05-17 Thread Simon Dahlbacka
Dino, you seemed to have missed the part about pyxml..It works in cpython with pyxml installed. However, pyxml is playing tricks with paths etc, and there might even be pyd:s involved..C:\Python24>python.exe Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32Type "help",

Re: [IronPython] from xml import xpath

2006-05-17 Thread Dino Viehland
Title: from xml import xpath This doesn’t work for my in CPython 2.4 either, so I think the docs are wrong:   >>> from xml import xpath Traceback (most recent call last):   File "", line 1, in ? ImportError: cannot import name xpath >>> import sys >>> sys.version '2.4.2 (#67, Sep 28

Re: [IronPython] Dictionary Ordering

2006-05-17 Thread Dino Viehland
It's an implementation detail which may change in future versions. There's a OrderedDict in the Python cookbook though that should work w/ IP. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438823 Do you want to help develop Dynamic languages on CLR? (http://members.microsoft.com/car

[IronPython] Dictionary Ordering

2006-05-17 Thread Michael Foord
Hello all, IronPython seems to default to have a dictionary 'ordering' based on key insertion order. This is nice, but differs from the CPython implementation. However the spec (as I'm sure you're aware) says : (from http://docs.python.org/lib/typesmapping.html ) Keys and values are list