Re: [Python-3000] compiler module

2008-01-11 Thread Thomas Lee
Brett Cannon wrote: > On Jan 10, 2008 8:39 AM, Joe Angell <[EMAIL PROTECTED]> wrote: > >> My apologies if this has been asked before, but are there any plans to >> add the compiler module back in to py3k? If so, any idea on a >> timeline? If help is needed I may be able to put in some time on

Re: [Python-3000] compiler module

2008-01-13 Thread Thomas Lee
Brett Cannon wrote: > On Jan 10, 2008 8:39 AM, Joe Angell <[EMAIL PROTECTED]> wrote: > >> My apologies if this has been asked before, but are there any plans to >> add the compiler module back in to py3k? If so, any idea on a >> timeline? If help is needed I may be able to put in some time on

Re: [Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

2008-02-03 Thread Thomas Lee
Leif Walsh wrote: > On Feb 2, 2008 8:38 PM, Ron Adam <[EMAIL PROTECTED]> wrote: > >> Instead of a shebang which depends on the shell, maybe a version >> specifier >> of some sort could be used? >> >> # -*- pyversions: 2.5, 2.6 -*- >> >> So if a python 3.x detects a too low a version, maybe

Re: [Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

2008-02-03 Thread Thomas Lee
[EMAIL PROTECTED] wrote: > Leif> There is already an idiom with other packages (pygtk etc.) that > Leif> suggests syntax like > > Leif> try: > Leif> python.require('3.1') > Leif> except: > Leif> print('Some warning about version incompatibility') > Leif> exit

Re: [Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!

2008-02-03 Thread Thomas Lee
Leif Walsh wrote: > On Feb 2, 2008 8:38 PM, Ron Adam <[EMAIL PROTECTED]> wrote: > >> Instead of a shebang which depends on the shell, maybe a version specifier >> of some sort could be used? >> >> # -*- pyversions: 2.5, 2.6 -*- >> >> So if a python 3.x detects a too low a version, maybe it

Re: [Python-3000] Fixing super anyone?

2007-04-23 Thread Thomas Lee
Oops, here's the (broken) patch. Index: Objects/typeobject.c === --- Objects/typeobject.c (revision 54928) +++ Objects/typeobject.c (working copy) @@ -5625,16 +5625,33 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds)

Re: [Python-3000] Fixing super anyone?

2007-04-23 Thread Thomas Lee
Collin Winter wrote: > However, having the AST compiler expand > > class A: > def m(self): > blah() > super(self).m() > blah() > > to > > class A: > def m(self): > super = super_factory(A) > blah() > super(self).m() > blah() > I'm sold on the super(self) syntax a

Re: [Python-3000] PEP 3137 plan of attack

2007-10-07 Thread Thomas Lee
Guido van Rossum wrote: > - make == and != between PyBytes and PyUnicode return False instead of > raising TypeError > - make == and != between PyString and Pyunicode return False instead > of converting > - make comparisons between PyString and PyBytes work (these are > properly ordered) > If n

Re: [Python-3000] PEP 3137 plan of attack

2007-10-09 Thread Thomas Lee
Thomas Lee wrote: > Guido van Rossum wrote: > >> - make == and != between PyBytes and PyUnicode return False instead of >> raising TypeError >> A patch for this is ready. I'll submit it to the bug tracker later tonight. >> - make == and != between

Re: [Python-3000] PEP 3137 plan of attack

2007-10-09 Thread Thomas Lee
Thomas Lee wrote: > Thomas Lee wrote: > >> Guido van Rossum wrote: >> >> >>> - make == and != between PyBytes and PyUnicode return False instead of >>> raising TypeError >>> >>> > A patch for this is ready. I&#x

Re: [Python-3000] PEP 3137 plan of attack

2007-10-11 Thread Thomas Lee
Guido van Rossum wrote: >>> - make == and != between PyBytes and PyUnicode return False instead of raising TypeError Just thinking about it I'm pretty sure my initial patch is wrong - forgive my ignorance. To remove the ambiguity, is it fair to state the follow

Re: [Python-3000] PEP 3137 plan of attack

2007-10-11 Thread Thomas Lee
Guido van Rossum wrote: > > The point is that a bytes and a str instance are never considered equal... > > Sorry. I understand now. My brain must have been on a holiday earlier. :) Just pushed an updated patch to the bug tracker. >> str8() == str() -> False >> str8() != str() -> True >> >> Corr

Re: [Python-3000] PEP 3137 plan of attack

2007-10-11 Thread Thomas Lee
I was having weird problems with the codec registry too - specifically the assertion checking unidata_version == "3.2.0" mysteriously failing after forcing string/unicode equality checks to return false. Thought maybe unidata_version somehow got a str8 version or something weird like that ... h

Re: [Python-3000] PEP 3137 plan of attack

2007-10-11 Thread Thomas Lee
Guido van Rossum wrote: > On 10/9/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > >> Which reminds me of a task I forgot to add to the list: >> >> - change the constructor for PyString to match the one for PyBytes. >> > > And another pair of forgotten tasks: > > - change PyBytes so that i

[Python-3000] PEP 3137 patch #2 - str8() == str() -> False

2007-10-11 Thread Thomas Lee
Okay, here's another patch: http://bugs.python.org/issue1263 Using unicode-string-eq-false-r3.patch, str8/str comparison will now return False instead of attempting to convert. Unfortunately this breaks about 30 tests. In attempting to fix test_unicode (the obvious starting point for all this)

[Python-3000] PEP3137: str8() and str() comparison

2007-10-21 Thread Thomas Lee
I just uploaded a patch with all my progress on str8/str comparisons here: http://bugs.python.org/issue1263 I would really like some help from anybody knowledgeable with the following tests: test_compile test_str test_struct test_sqlite As discussed in the issue tracker, these are all failing