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
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
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
__
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
'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
___
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
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
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-
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
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-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
28 matches
Mail list logo