Re: keyword parameter order

2007-11-18 Thread Anthon
Hi Tim, Thanks for the comments, I obviously hadn't thought beyond the simple case. I am happy I wrote (and that you Martin answered) instead of trying to program myself into a halffunctional implementation %-) Regards Anthon On Nov 18, 1:40 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I am look

Re: keyword parameter order

2007-11-18 Thread Anthon
subclass that does so), but it made me revisit the idea of investigating the keyword parameter order.. I will just drop this idea Thanks Anthon On Nov 18, 12:08 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > I am not sure if this kind of info is available internally

Re: keyword parameter order

2007-11-18 Thread Tim Chase
> I am looking for a way to determine the order of keyword parameters > passed on to a class method. I'm fairly certain it's not possible, as how would code like this behave: def my_func(**kwd): kwd = OrderedDict(kwd) #magic happens here? return do_something(kwd) my_dict = {'hello':

Re: keyword parameter order

2007-11-18 Thread Martin v. Löwis
> I am not sure if this kind of info is available internally to the > interpreter (ordereddict is in C, so I would even prefer that). Has > anyone done this or anything like it? It's not available. See ceval.c:do_call; this fills the dictionary. >From then on, information about the order of keywor

keyword parameter order

2007-11-18 Thread Anthon
I am looking for a way to determine the order of keyword parameters passed on to a class method. In the source code the keyword parameters are ordered, an ordering that is lost by putting them into a dictionary and then accessing them by using **kw. If I had this order (either of the keyword+value