Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Nathaniel Smith
On 9 Apr 2014 00:15, "Greg Ewing" wrote: > > Victor Stinner wrote: >> >> I started to implement the RFC 1924 to have a full support. >> >> 3 days later, when my code was working, I saw the date of the RFC... > > > Do you still have the code? It needn't go to waste -- this > would make a fine addit

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread cjw
Guido, I am sorry to read this. I shall be responding more completely in a day or two. In my view, @ and @@ are completely redundant.  Both operations are  already provided, * and **, in numpy.matrix. PEP 465 provides no clear indication as to how

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Victor Stinner
2014-04-09 1:13 GMT+02:00 Greg Ewing : > Victor Stinner wrote: >> >> I started to implement the RFC 1924 to have a full support. >> >> 3 days later, when my code was working, I saw the date of the RFC... > > > Do you still have the code? It needn't go to waste -- this > would make a fine addition t

Re: [Python-Dev] Windows buildbots are red: test_idlelib

2014-04-08 Thread Victor Stinner
Thanks ! 2014-04-08 22:39 GMT+02:00 Zachary Ware : > On Mon, Apr 7, 2014 at 4:37 AM, Victor Stinner > wrote: >> Hi, >> >> Unit tests are failing on Windows because of this issue: >> http://bugs.python.org/issue21059 >> >> It looks like a regression in test_idlelib introduced with this issue: >>

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Greg Ewing
Victor Stinner wrote: I started to implement the RFC 1924 to have a full support. 3 days later, when my code was working, I saw the date of the RFC... Do you still have the code? It needn't go to waste -- this would make a fine addition to Python's easter egg basket! -- Greg

Re: [Python-Dev] Windows buildbots are red: test_idlelib

2014-04-08 Thread Zachary Ware
On Mon, Apr 7, 2014 at 4:37 AM, Victor Stinner wrote: > Hi, > > Unit tests are failing on Windows because of this issue: > http://bugs.python.org/issue21059 > > It looks like a regression in test_idlelib introduced with this issue: > http://bugs.python.org/issue15968 > > Zachary Ware wrote a fix:

Re: [Python-Dev] [Python-checkins] cpython (3.4): docs: Document __objclass__. Closes #19281.

2014-04-08 Thread Yury Selivanov
Thank you, Ethan. Fixed. On 2014-04-08, 1:57 PM, Ethan Furman wrote: Sorry, posted to wrong list the first time. On 04/08/2014 09:33 AM, Ethan Furman wrote: On 04/08/2014 09:07 AM, yury.selivanov wrote: http://hg.python.org/cpython/rev/0973d45197cc > +The :attr:`__objclass__` is interpreted

Re: [Python-Dev] [Python-checkins] cpython (3.4): docs: Document __objclass__. Closes #19281.

2014-04-08 Thread Ethan Furman
Sorry, posted to wrong list the first time. On 04/08/2014 09:33 AM, Ethan Furman wrote: On 04/08/2014 09:07 AM, yury.selivanov wrote: http://hg.python.org/cpython/rev/0973d45197cc > +The :attr:`__objclass__` is interpreted by the :mod:`inspect` module as +specifying the class where this obje

Re: [Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Chris Angelico
On Wed, Apr 9, 2014 at 3:30 AM, Larry Hastings wrote: > On 04/08/2014 12:50 PM, Chris Angelico wrote: > > It would be nice to have a simple notation that fetches what it needs > and ignores any extras. > > a, b, c, * = x.split("-") > > Bomb if there aren't two hyphens in x, but if there are more,

Re: [Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Larry Hastings
On 04/08/2014 12:50 PM, Chris Angelico wrote: It would be nice to have a simple notation that fetches what it needs and ignores any extras. a, b, c, * = x.split("-") Bomb if there aren't two hyphens in x, but if there are more, just take the first three and ignore the rest. Would work with inf

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Steven D'Aprano
On Tue, Apr 08, 2014 at 06:49:13PM +0200, Antoine Pitrou wrote: > Le 08/04/2014 04:02, Steven D'Aprano a écrit : > > > >Many, many more people take part in the CPython core developer culture > >than just the core developers themselves. Look at the readership of this > >mailing list, which is open t

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Chris Angelico
On Wed, Apr 9, 2014 at 2:49 AM, Antoine Pitrou wrote: > Le 08/04/2014 04:02, Steven D'Aprano a écrit : > >> >> Many, many more people take part in the CPython core developer culture >> than just the core developers themselves. Look at the readership of this >> mailing list, which is open to the pu

Re: [Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Chris Angelico
On Wed, Apr 9, 2014 at 2:40 AM, Eric Snow wrote: > On Apr 8, 2014 10:31 AM, "MRAB" wrote: >> If the RHS yields too few, e.g. 3, you'll get: >> >> ValueError: attempt to assign sequence of size 3 to extended slice of size 4 >> >> If it yields too many, e.g. 10, you'll get: >> >> ValueError: attemp

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Antoine Pitrou
Le 08/04/2014 04:02, Steven D'Aprano a écrit : Many, many more people take part in the CPython core developer culture than just the core developers themselves. Look at the readership of this mailing list, which is open to the public and has regular posters who aren't core developers. In-jokes li

Re: [Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Eric Snow
On Apr 8, 2014 10:31 AM, "MRAB" wrote: > If the RHS yields too few, e.g. 3, you'll get: > > ValueError: attempt to assign sequence of size 3 to extended slice of size 4 > > If it yields too many, e.g. 10, you'll get: > > ValueError: attempt to assign sequence of size 10 to extended slice of size 4

Re: [Python-Dev] issue with itertools leads the crash

2014-04-08 Thread MRAB
On 2014-04-08 16:31, Brett Cannon wrote: Please a file a bug at bugs.python.org , otherwise this is most likely going to get lost track of. On Tue Apr 08 2014 at 11:30:15 AM, Kirill mailto:kir_...@rambler.ru>> wrote: issue with itertools leads the crash

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Ryan
Ooooh...that stings. Victor Stinner wrote: >2014-04-08 3:04 GMT+02:00 Steven D'Aprano : >>> > >Python used to have an alias <> for != and I for one miss <> in >3.x. I >>> > >don't think TOOWTDI should be the last word in this debate. >>> > >>> > PEP 401 to the rescue: >>> >>> It occurs to me tha

[Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Brett Cannon
Please a file a bug at bugs.python.org, otherwise this is most likely going to get lost track of. On Tue Apr 08 2014 at 11:30:15 AM, Kirill wrote: > issue with itertools leads the crash > > The following code leads to system failure and crash on Ubuntu 12.04.3 > with Python 2.7.6. > > import

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Nathaniel Smith
On Tue, Apr 8, 2014 at 9:58 AM, Björn Lindqvist wrote: > 2014-04-07 3:41 GMT+02:00 Nathaniel Smith : >> So, I guess as far as I'm concerned, this is ready to go. Feedback welcome: >> http://legacy.python.org/dev/peps/pep-0465/ > > Couldn't you please have made your motivation example actually ru

[Python-Dev] issue with itertools leads the crash

2014-04-08 Thread Kirill
issue with itertools leads the crash The following code leads to system failure and crash on Ubuntu 12.04.3 with Python 2.7.6. import itertools r = range (1,10) r[1:9:2] = itertools.cycle([0]) Kirill . ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Thomas Wouters
On Apr 8, 2014 2:39 PM, "Nick Coghlan" wrote: > > On 8 April 2014 21:24, Björn Lindqvist wrote: > > 2014-04-08 12:23 GMT+02:00 Sturla Molden : > >> Björn Lindqvist wrote: > >> > >>> import numpy as np > >>> from numpy.linalg import inv, solve > >>> > >>> # Using dot function: > >>> S = np.dot((n

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Nick Coghlan
On 8 April 2014 21:24, Björn Lindqvist wrote: > 2014-04-08 12:23 GMT+02:00 Sturla Molden : >> Björn Lindqvist wrote: >> >>> import numpy as np >>> from numpy.linalg import inv, solve >>> >>> # Using dot function: >>> S = np.dot((np.dot(H, beta) - r).T, >>>np.dot(inv(np.dot(np.dot(H, V

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Daniel Holth
On Tue, Apr 8, 2014 at 12:08 AM, Nick Coghlan wrote: > > On 7 Apr 2014 21:58, "MRAB" wrote: >> >> On 2014-04-08 02:45, Guido van Rossum wrote: >>> >>> So what? Aren't we allowed to have fun? :-) >>> >> Next thing you know, he'll be threatening people with The Comfy Chair! > > You may want to take

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Björn Lindqvist
2014-04-08 12:23 GMT+02:00 Sturla Molden : > Björn Lindqvist wrote: > >> import numpy as np >> from numpy.linalg import inv, solve >> >> # Using dot function: >> S = np.dot((np.dot(H, beta) - r).T, >>np.dot(inv(np.dot(np.dot(H, V), H.T)), np.dot(H, beta) - r)) >> >> # Using dot method:

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Sturla Molden
Björn Lindqvist wrote: > import numpy as np > from numpy.linalg import inv, solve > > # Using dot function: > S = np.dot((np.dot(H, beta) - r).T, >np.dot(inv(np.dot(np.dot(H, V), H.T)), np.dot(H, beta) - r)) > > # Using dot method: > S = (H.dot(beta) - r).T.dot(inv(H.dot(V).dot(H.T)

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Björn Lindqvist
2014-04-07 3:41 GMT+02:00 Nathaniel Smith : > So, I guess as far as I'm concerned, this is ready to go. Feedback welcome: > http://legacy.python.org/dev/peps/pep-0465/ Couldn't you please have made your motivation example actually runnable? import numpy as np from numpy.linalg import inv, solve

Re: [Python-Dev] PEP 465: A dedicated infix operator for matrix multiplication

2014-04-08 Thread Victor Stinner
2014-04-08 3:04 GMT+02:00 Steven D'Aprano : >> > >Python used to have an alias <> for != and I for one miss <> in 3.x. I >> > >don't think TOOWTDI should be the last word in this debate. >> > >> > PEP 401 to the rescue: >> >> It occurs to me that since that Aprils' Fools joke is many years old >>