Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-08 Thread John Ladasky
On Monday, November 7, 2016 at 5:23:25 PM UTC-8, Steve D'Aprano wrote: > On Tue, 8 Nov 2016 05:47 am, j...@i...edu wrote: > > It has been very important for the field of computational molecular > > dynamics (and probably several other fields) to get floating-point > > arithmetic working right on GP

Re: constructor classmethods

2016-11-08 Thread Marko Rauhamaa
Steve D'Aprano : > On Wed, 9 Nov 2016 10:01 am, teppo.p...@gmail.com wrote: >> Generally, with testing, it would be optimal to test outputs of the >> system for given inputs without caring how things are implemented. > > I disagree with that statement. I, OTOH, agree with it. > But in fact, that

Re: What is currently the recommended way to work with a distutils-based setup.py that requires compilation?

2016-11-08 Thread Tim Johnson
* Ivan Pozdeev via Python-list [161106 17:28]: > https://wiki.python.org/moin/WindowsCompilers has now completely replaced > instructions for `distutils`-based packages (starting with `from > distutils.core import setup`) with ones for `setuptools`-based ones > (starting with `from setuptools impo

Re: constructor classmethods

2016-11-08 Thread Steve D'Aprano
On Wed, 9 Nov 2016 10:01 am, teppo.p...@gmail.com wrote: > Generally, with testing, it would be optimal to test outputs of the system > for given inputs without caring how things are implemented. I disagree with that statement. You are talking about "black-box testing" -- the test code should tr

Re: constructor classmethods

2016-11-08 Thread Chris Angelico
On Wed, Nov 9, 2016 at 10:01 AM, wrote: > One solution is: > > class Example: > def __init__(self, queue=None): > self._queue = queue or Queue() > > Fine approach, but technically __init__ has two execution branches and > someone staring blindly coverages might require covering those

Re: constructor classmethods

2016-11-08 Thread teppo . pera
> How is having 15 arguments in a .create() method better than having 15 > arguments in __init__() ? > So, if you use the create() method, and it sets up internal data structures, > how do you test them? In other words, if create() makes that queue then how > do you test with a half-empty queue

Re: Lua tutorial help for Python programmer?

2016-11-08 Thread Skip Montanaro
On Tue, Nov 8, 2016 at 2:12 AM, Andrea D'Amore wrote: > There's lua-list, I figure all your questions fit better there than here. > There's the official wiki on lua-users [1], I don't know about a > Py-Lua Rosetta Stone. Thanks. I asked here specifically because I was interested in Lua from a Pyt

ANN: PyDDF Python Sprint 2016

2016-11-08 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a Python sprint in Düsseldorf, Germany] ANKÜNDIGUNG PyDDF Python Sprint 2016 in Düsseldorf Samstag, 19.11

Re: Lua tutorial help for Python programmer?

2016-11-08 Thread Andrea D'Amore
On 7 November 2016 at 20:27, Skip Montanaro wrote: > I just got Lua scripting dumped in my lap as a way to do some server > side scripting in Redis. The very most basic stuff isn't too hard (i = > 1, a = {"x"=4, ...}, for i = 1,10,2 do ... end), but as soon as I get > beyond that, I find it diffic