Re: [Python-Dev] Infix operators

2008-07-24 Thread Greg Ewing
Josiah Carlson wrote: This is the first time anyone has mentioned "conciseness" in this thread. I thought it more or less went without saying. After all, if conciseness isn't a goal, there's nothing wrong with a plain function call, which can be as short as 3 characters as well. The trouble i

Re: [Python-Dev] Infix operators

2008-07-24 Thread Greg Ewing
Scott Dial wrote: I would argue that Python contains a "array of some_type" data type. That sum() performs a left-fold of __add__ on the array is completely independent of them being numbers. That's not strictly true -- it explicitly refuses to operate on strings (or at least it did last time

Re: [Python-Dev] Warnings for intra-package imports

2008-07-24 Thread Brett Cannon
On Thu, Jul 24, 2008 at 10:53 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > I was just reading up on PEP 328. In the "Timeline" section, it > mentions that intra-package imports should raise a DeprecationWarning > in 2.6. This doesn't seem to be implemented currently. > > Is this still the pla

[Python-Dev] Warnings for intra-package imports

2008-07-24 Thread Benjamin Peterson
I was just reading up on PEP 328. In the "Timeline" section, it mentions that intra-package imports should raise a DeprecationWarning in 2.6. This doesn't seem to be implemented currently. Is this still the plan? I would like to see Py3k warnings for these kinds of imports at least. -- Cheers, B

Re: [Python-Dev] Infix operators

2008-07-24 Thread Josiah Carlson
On Thu, Jul 24, 2008 at 7:08 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Fredrik Johansson wrote: > >> Anyway, it is easy to define pseudo-operators in Python; >> >> A *matrixmul* B >> A *dot* B >> A *cross* B >> A *elementwise* B > > Urg. This is another one of those recipes that I consider > is t

Re: [Python-Dev] Infix operators

2008-07-24 Thread Scott Dial
Greg Ewing wrote: Scott Dial wrote: Perhaps I'm nobody, but I think this would be ridiculous. Matrices are not native objects to the language. Why should that matter? We already have things like sum(), which operates on any sequence of numbers, without needing a special "array of numbers" data

Re: [Python-Dev] Infix operators

2008-07-24 Thread Greg Ewing
Fredrik Johansson wrote: Anyway, it is easy to define pseudo-operators in Python; A *matrixmul* B A *dot* B A *cross* B A *elementwise* B Urg. This is another one of those recipes that I consider is too clever for its own good. Very nice in theory, but I would never use it in real life. What

Re: [Python-Dev] Infix operators

2008-07-24 Thread Greg Ewing
Scott Dial wrote: Perhaps I'm nobody, but I think this would be ridiculous. Matrices are not native objects to the language. Why should that matter? We already have things like sum(), which operates on any sequence of numbers, without needing a special "array of numbers" data type. I don't see

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Greg Ewing
Thomas Lee wrote: I'm making some good progress with the AST optimizer, and now the main thing standing in my way is lnotab. My suggestion would be to drop the idea of trying to compress the lnotab in clever ways, and just make it a straightforward list of bytecode offset/line number pairs. I c

Re: [Python-Dev] Infix operators

2008-07-24 Thread Fredrik Johansson
On Fri, Jul 25, 2008 at 12:06 AM, Scott Dial <[EMAIL PROTECTED]> wrote: > Perhaps I'm nobody, but I think this would be ridiculous. Matrices are > not native objects to the language. There is no type(matrix). The notion > of what makes a Python object a matrix is a convention and to have > built-i

Re: [Python-Dev] Any PEP about 2.6 -> 3000 code transition?

2008-07-24 Thread Barry Scott
On Jul 21, 2008, at 22:37, Lennart Regebro wrote: On Mon, Jul 21, 2008 at 20:16, Brett Cannon <[EMAIL PROTECTED]> wrote: But waiting until all the betas have gone out totally defeats the purpose of the betas! I agree. Writing an actual *guide* can wait, but documenting the differences with c

Re: [Python-Dev] Infix operators

2008-07-24 Thread Scott Dial
Sebastien Loisel wrote: Greg Ewing said: I would actually be in favour of adding a matrix multiplication operator That would be helpful to me, for my students as well as my papers. Perhaps I'm nobody, but I think this would be ridiculous. Matrices are not native objects to the language. The

Re: [Python-Dev] Infix operators

2008-07-24 Thread Sebastien Loisel
Greg Ewing said: > I would actually be in favour of adding a matrix multiplication > operator That would be helpful to me, for my students as well as my papers. Sincerely, -- Sébastien Loisel ___ Python-Dev mailing list Python-Dev@python.org http://ma

Re: [Python-Dev] [Python-3000] Removing bsddb module from py3k (was Re: No beta2 tonight)

2008-07-24 Thread Josiah Carlson
On Mon, Jul 21, 2008 at 2:26 AM, Jesus Cea <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Josiah Carlson wrote: > | I'm still curious as to what deep features people are using in bsddb. > | Anyone have any pointers to open source software? > > I'm using replication

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Phillip J. Eby
At 12:56 AM 7/25/2008 +1000, Thomas Lee wrote: I'm making some good progress with the AST optimizer, and now the main thing standing in my way is lnotab. Currently lnotab expects bytecode sequencing to be roughly in-sync with the order of the source file and a few things that the optimizer does

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Thomas Lee
Antoine Pitrou wrote: Thomas Lee vector-seven.com> writes: By the way, you were right about JUMP_IF_TRUE/JUMP_IF_FALSE. It's far too late. Apologies. I'm still pretty sure this is the peepholer's doing, Yes indeed. Which is what's being achieved with the AST optimization I origi

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Antoine Pitrou
Thomas Lee vector-seven.com> writes: > By the way, you were right about JUMP_IF_TRUE/JUMP_IF_FALSE. It's far > too late. Apologies. > > I'm still pretty sure this is the peepholer's doing, Yes indeed. > Which is what's being achieved with the AST optimization I originally > proposed, right?

Re: [Python-Dev] bsddb: Test failures on windows (HELP!)

2008-07-24 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesus Cea wrote: | Trent, I was wondering if you could look at some test failures in MS | Windows builds. I can't debug Windows issues myself :-(. This is a MS | free environment... I will be out of the city, 100% offline, until monday/tuesday. I wil

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Thomas Lee
Antoine Pitrou wrote: Antoine Pitrou pitrou.net> writes: In http://bugs.python.org/issue2459 ("speedup for / while / if with better bytecode") I had the same problem and decided to change the lnotab format so that line number increments are signed bytes rather than unsigned. By the wa

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Thomas Lee
Antoine Pitrou wrote: Hi, Hi. Thanks for getting back to me so quickly. I can even respond before I have to drag myself off to bed. :) I'm making some good progress with the AST optimizer, and now the main thing standing in my way is lnotab. Currently lnotab expects bytecode sequencing t

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Antoine Pitrou
Antoine Pitrou pitrou.net> writes: > > In http://bugs.python.org/issue2459 ("speedup for / while / if with better > bytecode") I had the same problem and decided to change the lnotab format so > that line number increments are signed bytes rather than unsigned. By the way, the same change could

Re: [Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Antoine Pitrou
Hi, > I'm making some good progress with the AST optimizer, and now the main > thing standing in my way is lnotab. Currently lnotab expects bytecode > sequencing to be roughly in-sync with the order of the source file and a > few things that the optimizer does (e.g. swapping the bodies of an

[Python-Dev] lnotab and the AST optimizer

2008-07-24 Thread Thomas Lee
I'm making some good progress with the AST optimizer, and now the main thing standing in my way is lnotab. Currently lnotab expects bytecode sequencing to be roughly in-sync with the order of the source file and a few things that the optimizer does (e.g. swapping the bodies of an if/else after

Re: [Python-Dev] bsddb: Test failures on windows (HELP!)

2008-07-24 Thread Amaury Forgeot d'Arc
Tres Seaver wrote: > Mark Hammond wrote: > >>> Trent, I was wondering if you could look at some test failures in MS >>> Windows builds. I can't debug Windows issues myself :-(. This is a MS >>> free environment... >> >> In these errors I see lots of bsdbd errors, many of the form: >> >> | DBFileExi

Re: [Python-Dev] crash in 3.0b2 exception code

2008-07-24 Thread Benjamin Peterson
On Thu, Jul 24, 2008 at 2:27 AM, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi, > > I get a crash in one of lxml's doctests in 3.0b2, and it looks like it's > coming from plain Python code (as opposed to Cython code). Just a quick > check > before I start digging into this, has anyone seen this be

Re: [Python-Dev] bsddb: Test failures on windows (HELP!)

2008-07-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark Hammond wrote: >> Trent, I was wondering if you could look at some test failures in MS >> Windows builds. I can't debug Windows issues myself :-(. This is a MS >> free environment... > > In these errors I see lots of bsdbd errors, many of the fo

[Python-Dev] crash in 3.0b2 exception code

2008-07-24 Thread Stefan Behnel
Hi, I get a crash in one of lxml's doctests in 3.0b2, and it looks like it's coming from plain Python code (as opposed to Cython code). Just a quick check before I start digging into this, has anyone seen this before? Stefan [...] Program received signal SIGSEGV, Segmentation fault. [Switching t