Re: [Python-3000] Proposal to add __str__ method to iterables.

2008-05-31 Thread Lennart Regebro
emptyness. filter(lambda c: c!="a", "abracadbra") 'brcdbr' "abracadbra".replace('c', '') 'brcdbr' I find using filter on a string kinda strange, I have to say. How often do you have to filter away certain characters in s a string? Nev

Re: [Python-3000] Python incompatibility test project.

2008-05-18 Thread Lennart Regebro
On Sun, May 18, 2008 at 4:38 PM, Lennart Regebro <[EMAIL PROTECTED]> wrote: > It currently contains what I believe to be complete tests of language > incompatibilities. Although I just relialized that there is a bunch of builtin methods that are gone which I don't have t

[Python-3000] Python incompatibility test project.

2008-05-18 Thread Lennart Regebro
your code, the easier to port to Python 3. ;.) Feedback and help is greatly appreciated! No Python 3 experience necessary, this is a fun way to get to know Python 3! -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 __

Re: [Python-3000] Python 3.0 Porting Strategies

2008-03-28 Thread Lennart Regebro
see what I can do next week. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.pyth

Re: [Python-3000] Python 3.0 Porting Strategies

2008-03-27 Thread Lennart Regebro
've done a buch of tests to see what works and what doesn't and how to get around it that could serve as a starting point. Any ideas of where to check these in? -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___

Re: [Python-3000] lambda

2008-03-27 Thread Lennart Regebro
On Thu, Mar 27, 2008 at 12:34 AM, Greg Ewing <[EMAIL PROTECTED]> wrote: >x, y => x + y I know this is off topic and that we should stop, but this is actually quite nice. Remember that one for Python 4000. ;) -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com

Re: [Python-3000] lambda

2008-03-26 Thread Lennart Regebro
hurts my readability nerve. :-) ) Which I guess shows that fanatical adherence to readability isn't always such a hot idea. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3

Re: [Python-3000] lambda

2008-03-26 Thread Lennart Regebro
ocumenting if > the function is given a name. Yup. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-

Re: [Python-3000] lambda

2008-03-26 Thread Lennart Regebro
ead of just def would of course be OK too. But as mentioned, that's probably too late. And I'm sure everybody that actually likes lambda would hate it. :) Different mindsets there I think. -- Lennart Regebro: Zope and Plone consulting. http://www.collibe

Re: [Python-3000] Enough with the u"string" already!

2008-03-24 Thread Lennart Regebro
t;" in 3.0 to a __future__ import in 2.6. The rest of the discussion proved ultimately pointless and can safely be ignored. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-24 Thread Lennart Regebro
ess mean that 2to3 needs to compile the 2.6 code directly to pyc-files, as I understand it. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3000@python.org http://mail.pytho

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-24 Thread Lennart Regebro
On Mon, Mar 24, 2008 at 1:49 AM, Mike Meyer <[EMAIL PROTECTED]> wrote: > This is, to be blunt, wishful thinking. Funny. 8 years of Python development experience is wishful thinking. Whaddayouknow. I'm done now. -- Lennart Regebro: Zope and Plone consulting. http://www.collibert

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-24 Thread Lennart Regebro
ve > cookies in the 3.0 file that "smart" debuggers can use to help with > debugging code from 2to3? At the very least, each time a line is > changed, the ability to add a comment with the original line and the > file and line number it came from. A complicated solution

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-23 Thread Lennart Regebro
On Sun, Mar 23, 2008 at 10:52 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Lennart Regebro wrote: > > On Thu, Mar 20, 2008 at 11:02 PM, Mike Meyer <[EMAIL PROTECTED]> wrote: > >> Fair enough. But doesn't 2.5->2.6 present the same prob

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-23 Thread Lennart Regebro
at works, you make sure it works on the other. With 2.6/3.0 you have to develop both at once. You are right that you don't have to test them at once, though. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64

Re: [Python-3000] Reserve "pragma" keyword in Python 3.0?

2008-03-22 Thread Lennart Regebro
thing reasonable. As "enable specialfeature" or "use specialfeature". "pragma specialfeature" is just confusing. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
On Thu, Mar 20, 2008 at 11:20 PM, Walter Dörwald <[EMAIL PROTECTED]> wrote: > A future import would only affect one module though, -U is global. Yeah, I don't think -U would work because of that. That would again mean you need to switch all code at the same time. -- Lennart Reg

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
n the SyntaxError, then evidently the SyntaxError is better. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
still: by > the time 3.2 is released, all major library packages will be > available. Library packages is, as mentioned, not the problem here. > It does, thanks. I still think you can use 2to3 in all the cases > you've described. Then I didn't make myself c

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
up with any case where you need to know if it is a int or a long, except if you are stripping out the L from a repr. So I don't think it's necessary. But maybe it could be helpful? > * 1L and u'' are invalid That could be good, but deprecation warnings in -3 mode is eno

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
On Thu, Mar 20, 2008 at 7:02 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Lennart Regebro schrieb: > > > On Thu, Mar 20, 2008 at 5:50 PM, Thomas Wouters <[EMAIL PROTECTED]> wrote: > >> It'll do a much better job than try-and-pray. It may no

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
realistic option. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/op

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
rals. Also, if it doesn't come into 2.6, it can always appear in a 2.7. While u'' support rather is something you'd want to *remove* from a 3.1, not add. Yes, this is a better solution. I'm now lobbying for "from __future__ import unicode_s

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
tier than the standard _("Hello") binding, and this is a parallell case to the u("Hello") binding I mentioned before as a partial workaround for the unicode problem. Perhaps something to think about for 3.1? -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
t, which > is forbidden). A try/except around that future import solves that, so that isn't any problem. Indeed, this would solve the problem without changing 3.0, it would instead be a change in 2.6. Sounds good to me. -- Lennart Regebro: Zope and Plone consulting. ht

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
we need to have this discussion again, I will prepare a longer answer to why the 2to3 conversion should be supplemented with a possible gradual code path. I started to write an answer already, but it's going to take me a while, and I'd rather not. :) -- Lennart Regebro: Zope

Re: [Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
his discussion *has* been beaten to death. 3 should be an option, and it is an option, if u'' gets supported. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-3000 mailing list Pyt

[Python-3000] u'text' as an alias for 'text'?

2008-03-20 Thread Lennart Regebro
, I use the logging module, and so on. But I don't think that is so unusual, is it? So, please allow u'' in Python 3.0! With that change, my porting/compatibility worried would be gone, and you would be able to choose between the three porting strategies dependningon how your co