Re: Stock quote AP

2018-03-12 Thread ROGER GRAYDON CHRISTMAN
On Mon, Mar 12, 2018 12:00 PM, Irv Kalb wrote: > > On Mar 10, 2018, at 9:26 PM, Chris Angelico wrote: >> >> On Sun, Mar 11, 2018 at 4:18 PM, Irv Kalb wrote: >> Hi, >> >> I teach courses on beginning Python (Python3). In one of my >topics, I explain how we can write simple programs that reach

Re: Enumerating all 3-tuples (Posting On Python-List Prohibited)

2018-03-12 Thread Ben Bacarisse
Lawrence D’Oliveiro writes: > On Sunday, March 11, 2018 at 2:40:16 PM UTC+13, Ben Bacarisse wrote: >> It would be nice to avoid relying on any value-based ordering. > > I don’t see why. The set of elements has to have the same cardinality > as the set of natural numbers, after all. Why not take a

Re: test

2018-03-12 Thread Yuan Xue
Alister writes: > On Mon, 12 Mar 2018 13:43:01 -0500, Yuan Xue wrote: > >> test > > failed Funny, I am wodering what type of persons are still using this clumsy system, and their purposes of using it. -- https://mail.python.org/mailman/listinfo/python-list

test

2018-03-12 Thread Yuan Xue
test -- https://mail.python.org/mailman/listinfo/python-list

Re: test

2018-03-12 Thread Cameron Simpson
On 17Mar2014 11:42, Mark H Harris wrote: On 3/16/14 5:07 AM, Chris “Kwpolska” Warrick wrote: Why not use the mailing list instead? It’s a much easier way to access this place. I prefer to 'pull' rather than receive the 'push'. The newsreader idea is better because threading works better, an

Re: Can mock.mock_open.read return different values?

2018-03-12 Thread codewizard
On Monday, March 12, 2018 at 4:51:53 AM UTC-4, Tim Golden wrote: > I'm contributing to a codebase which makes heavy use of mock in the test > suite, a technique which I'm aware of but have used only rarely. In one > situation it uses mock.mock_open(read_data="...") and then asserts again > mock_

Re: test

2018-03-12 Thread Alister via Python-list
On Mon, 12 Mar 2018 13:43:01 -0500, Yuan Xue wrote: > test failed -- Mollison's Bureaucracy Hypothesis: If an idea can survive a bureaucratic review and be implemented it wasn't worth doing. -- https://mail.python.org/mailman/listinfo/python-list

Re: Enumerating all 3-tuples

2018-03-12 Thread Chris Angelico
On Tue, Mar 13, 2018 at 5:42 AM, Skip Montanaro wrote: 4 (0, 0, 1) 9 (0, 0, 1) 18 (0, 0, 2) 32 (0, 0, 2) >> >> I spy duplicates. > > I didn't realize we'd started playing "I Spy." > We're actually playing Calvinball, but don't tell the others. ChrisA -- https://mail.python.

Re: Enumerating all 3-tuples

2018-03-12 Thread Skip Montanaro
>>> 4 (0, 0, 1) >>> 9 (0, 0, 1) >>> 18 (0, 0, 2) >>> 32 (0, 0, 2) > > I spy duplicates. I didn't realize we'd started playing "I Spy ." ​ ​ Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Initializing error

2018-03-12 Thread Chris Angelico
On Tue, Mar 13, 2018 at 2:53 AM, Michael F. Stemper wrote: > On 2018-03-10 09:41, Harsh Bhardwaj wrote: >> >> On Mar 5, 2018 11:16 AM, "Harsh Bhardwaj" wrote: >> >> Plz fix this problem for me. I tried every way to fix this. >> Windows 7(32-bit) > > > That's a pretty bad problem. Fortunately, the

Re: Enumerating all 3-tuples

2018-03-12 Thread Chris Angelico
On Tue, Mar 13, 2018 at 2:54 AM, Robin Becker wrote: > On 12/03/2018 13:17, Robin Becker wrote: > An alternative approach gives more orderly sequences using a variable base > number construction > >> 4 (0, 0, 1) >> 9 (0, 0, 1) >> 18 (0, 0, 2) >> 32 (0, 0, 2) I spy duplicates. ChrisA -- https://

Re: Initializing error

2018-03-12 Thread Michael F. Stemper
On 2018-03-10 09:41, Harsh Bhardwaj wrote: On Mar 5, 2018 11:16 AM, "Harsh Bhardwaj" wrote: Plz fix this problem for me. I tried every way to fix this. Windows 7(32-bit) That's a pretty bad problem. Fortunately, there is a fix: -- Michael F. Stemper Soglin

Re: Enumerating all 3-tuples

2018-03-12 Thread Robin Becker
On 12/03/2018 13:17, Robin Becker wrote: It's possible to generalize the cantor pairing function to triples, but that may not give you what you want. Effectively you can generate an arbitrary number of triples using an iterative method. My sample code looked like this ct mapping of non-negat

Re: Enumerating all 3-tuples

2018-03-12 Thread Elliott Roper
On 10 Mar 2018, Paul Moore wrote (in article): > On 10 March 2018 at 02:18, MRAB wrote: > > On 2018-03-10 01:13, Steven D'Aprano wrote: > > > > > > I am trying to enumerate all the three-tuples (x, y, z) where each of x, > > > y, z can range from 1 to ∞ (infinity). > > > > > > This is clearly unh

Re: Flask: request vs Request

2018-03-12 Thread Andrew Z
Thank you Christopher. On Mar 12, 2018 09:10, "Christopher Mullins" wrote: > Could you please give some context when you reply, TIA >> > > Whoops, thanks for the reminder Mark. > > So what for the Request is used for then? > > > In general when you see that something in Python starts with a cap

Re: Enumerating all 3-tuples

2018-03-12 Thread Robin Becker
It's possible to generalize the cantor pairing function to triples, but that may not give you what you want. Effectively you can generate an arbitrary number of triples using an iterative method. My sample code looked like this import math def cantor_pair(k1,k2): return (((k1+k2)*(k1+k

Re: Flask: request vs Request

2018-03-12 Thread Christopher Mullins
> > Could you please give some context when you reply, TIA > Whoops, thanks for the reminder Mark. So what for the Request is used for then? In general when you see that something in Python starts with a capital letter, that indicates a class. Check out the relevant section of the PEP8 coding

Re: __import__ fails randomly due to missing file

2018-03-12 Thread Arkadiusz Bulski
I inserted importlib.invalidate_caches() instead of os.sync() and at a glance, it seems to have fixed it. Big thanks Paul! pon., 12 mar 2018 o 11:00 użytkownik Paul Moore napisał: > On 12 March 2018 at 09:12, Arkadiusz Bulski wrote: > > Hi, > > > > For the record, I am the developer of Constr

Re: __import__ fails randomly due to missing file

2018-03-12 Thread Paul Moore
On 12 March 2018 at 09:12, Arkadiusz Bulski wrote: > Hi, > > For the record, I am the developer of Construct library. And the question > relates to it. > https://construct.readthedocs.io/en/latest/# > > I have an issue of Travis failing randomly at test cases. The cause is > always __import__ fail

__import__ fails randomly due to missing file

2018-03-12 Thread Arkadiusz Bulski
Hi, For the record, I am the developer of Construct library. And the question relates to it. https://construct.readthedocs.io/en/latest/# I have an issue of Travis failing randomly at test cases. The cause is always __import__ failing to import a dynamically generated code. Library generates a st

Can mock.mock_open.read return different values?

2018-03-12 Thread Tim Golden
I'm contributing to a codebase which makes heavy use of mock in the test suite, a technique which I'm aware of but have used only rarely. In one situation it uses mock.mock_open(read_data="...") and then asserts again mock_open.return_value.read.call_count. A code change I've made results in a