[Python-3000] What about operator.*slice?

2007-09-03 Thread Georg Brandl
Are they useful enough to keep? -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proc

[Python-3000] [EMAIL PROTECTED]: Poss. clarification for What's New in Python 3]

2007-09-03 Thread A.M. Kuchling
Forwarded: a comment on the 3.0 What's New. --amk --- Begin Message --- Hi, In the What's New in Python 3 document you say For example, in Python 2.x, print "A\n", "B\n" would write "A\nB\n"; but in Python 3.0, print("A\n", "B\n") writes "A\n B\n". I would be tempted to change this to:

Re: [Python-3000] Performance Notes

2007-09-03 Thread Adam Olsen
On 9/3/07, Nicholas Bastin <[EMAIL PROTECTED]> wrote: > I've been doing some profiling of 3.0 vs. 2.6 release builds on > Windows XP for the purpose of hopefully closing the performance gap. > This data is very preliminary, but I thought I'd throw it out here in > case someone else also wanted to l

Re: [Python-3000] backported ABC

2007-09-03 Thread Benjamin Aranguren
Thanks! This helps. I was just not sure if I was on the right track or not. I did try disabling &list_nohash in listobject.c I think I have the right idea and just needed some reassurance. I'll give it another try. Thanks again. On 9/3/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > You're

Re: [Python-3000] backported ABC

2007-09-03 Thread Guido van Rossum
You're going to have to do some spelunking in the 3.0 source (because I don't have time right now :-), but I think 3.0 has some magic that solves this. I *think* it is done by not inheriting tp_hash unless tp_richcompare is also inherited. The details are probably in typeobject.c. Ask me again tom

Re: [Python-3000] Performance Notes

2007-09-03 Thread Guido van Rossum
Interesting! Thanks for doing this. We'll need a lot of this over the coming year. I read in this that the increased cost is largely due to using unicode strings for all variable and attribute names. So the next step might be to optimize the snot out of unicode hashing and introduce the unicode eq

Re: [Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Guido van Rossum
Since IndexError and KeyError are conceptually like ValueError but in a more narrowly defined context, I think IndexError and KeyError actually make sense here (even though they don't inherit from ValueError). --Guido On 9/3/07, Eric Smith <[EMAIL PROTECTED]> wrote: > Ron Adam points out some dif

Re: [Python-3000] Merging between trunk and py3k?

2007-09-03 Thread Aahz
On Tue, Sep 04, 2007, Thomas Wouters wrote: > > Merging is sometimes hard, but always fun. Well, challenging. A > Chinese kind of interesting time. Not so Chinese, actually: http://www.noblenet.org/reference/inter.htm -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/

Re: [Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Ron Adam
Eric Smith wrote: > Ron Adam points out some differences in which exceptions are thrown by > str.format and string.Formatter. For example, on a missing positional > argument: > > >>> "{0}".format() > Traceback (most recent call last): >File "", line 1, in > ValueError: Not enough positi

Re: [Python-3000] Merging between trunk and py3k?

2007-09-03 Thread Nicholas Bastin
On 9/3/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > > On 8/31/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > I haven't heard yet that merging is impossible or useless; there's > > still a lot of similarity between the trunk and the branch. > > Merging is sometimes hard, but always fun. We

Re: [Python-3000] Merging between trunk and py3k?

2007-09-03 Thread Guido van Rossum
Thanks for volunteering! Let me know when you're short on time and I'll take over (or appoint another volunteer :). --Guido On 9/3/07, Thomas Wouters <[EMAIL PROTECTED]> wrote: > > > On 8/31/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > I haven't heard yet that merging is impossible or usel

Re: [Python-3000] Merging between trunk and py3k?

2007-09-03 Thread Thomas Wouters
On 8/31/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > I haven't heard yet that merging is impossible or useless; there's > still a lot of similarity between the trunk and the branch. Merging is sometimes hard, but always fun. Well, challenging. A Chinese kind of interesting time. It certain

[Python-3000] Performance Notes

2007-09-03 Thread Nicholas Bastin
I've been doing some profiling of 3.0 vs. 2.6 release builds on Windows XP for the purpose of hopefully closing the performance gap. This data is very preliminary, but I thought I'd throw it out here in case someone else also wanted to look into this. Also, possibly useful for comparing against pr

[Python-3000] str.format vs. string.Formatter exceptions

2007-09-03 Thread Eric Smith
Ron Adam points out some differences in which exceptions are thrown by str.format and string.Formatter. For example, on a missing positional argument: >>> "{0}".format() Traceback (most recent call last): File "", line 1, in ValueError: Not enough positional arguments in format string >>

Re: [Python-3000] backported ABC

2007-09-03 Thread Benjamin Aranguren
I am having a problem backporting collections.py/_abcoll.py and would like to get your input. There's one test in test_collections that fails. class TestOneTrickPonyABCs(unittest.TestCase): def test_Hashable(self): # Check some non-hashables non_samples = [list(), set(), dict

Re: [Python-3000] Patch for Doc/tutorial

2007-09-03 Thread Georg Brandl
Robin Stocker schrieb: > Paul Dubois schrieb: >> Attached is a patch for changes to the tutorial. I made it by doing: >> >> svn diff tutorial > tutorial.diff >> >> in the Doc directory. I hope this is what is wanted; if not let me know >> what to do. >> >> Unfortunately cygwin will not run Sphin