>
> Sure. I've now committed a modified version of your patch. Could you
> test if it still works on python 2.3?
>

I found a couple of small bugs introduced.  I've created a subsequent
patch that will address the bugs.  I've also removed the 'key'
parameter requirement from sorted.

> >  Is my technique sound?
>
> Mostly. I personally prefer having a global "fix", so that if the same
> ...

Thanks for the tips.  I'll try to follow your suggestions henceforth.
I'll need to re-train my fingers on how to call functions, but I've
needed to do that for years.

>
> >  If I invest the time on addressing the compatibility issues with the
> >  rest of the errors, can they be integrated as well?
>
> >  I guess what it really comes down to is what is the interest in
> >  maintaining Python 2.3 compatibility?
>
> I'm very interested in your patches, tough I have to warn you that I
> don't have python 2.3 installed anymore on my computer these days, so
> I might accidentally break compatibility in future changes (I'll try
> not to but well, you know...). So, basically, it's up to you (or other
> people needing it) to warn me if I break compatibility before any
> release. Sorry if that sounds harsh, but I have to put limits to what
> I do. I hope you don't take it badly.

Understood.  No hard feelings.  I think what I'll do is provide
patches that address my specific issues.  If there is further
interest, I'll consider taking on the task more thoroughly.

Regards,
Jason

Patch follows; I'll add it to trac if trac is back up when I think
about it.

Index: elixir/entity.py
===================================================================
--- elixir/entity.py    (revision 307)
+++ elixir/entity.py    (working copy)
@@ -3,7 +3,7 @@
 ``EntityMeta``.
 '''

-from py23compat import set, rsplit
+from py23compat import set, rsplit, sorted

 import sys
 import warnings
Index: elixir/py23compat.py
===================================================================
--- elixir/py23compat.py        (revision 307)
+++ elixir/py23compat.py        (working copy)
@@ -12,10 +12,9 @@
 except NameError:
     # global name 'sorted' doesn't exist in Python2.3
     # this provides a poor-man's emulation of the sorted built-in
method
-    def sorted(l, kwargs):
-        if 'key' not in kwargs:
-            raise Exception('Our python 2.3 version of sorted needs a
key kwarg argument')
-        key_func = kwargs['key']
+    def sorted(l, **kwargs):
+        identity = lambda x: x
+        key_func = kwargs.get('key', identity)
         sorted_list = list(l)
         sorted_list.sort(lambda self, other: cmp(key_func(self),
                                                  key_func(other)))

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to