Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Chris Angelico
On Tue, Dec 11, 2018 at 1:12 PM Avi Gross wrote: > I would then "generate" all possible combinations of digits 0-9 of length N. > There are an amazing number of ways to do that ranging from taking a > range(10**N) and converting it to a string then a list of numeral characters > then tossing ou

RE: Why Python don't accept 03 as a number?

2018-12-10 Thread Avi Gross
READERS DIGEST CONDENSED QUESTION: How expensive is eval("123 + 456 == 975") versus other ways? The discussion started by Jach has spread away from discussing how python deals with numbers starting with leading zeroes such as "03". I note there are many ID numbers like social security that have

Re: tkinter resizable text with grid

2018-12-10 Thread lizhollinshead5
On Thursday, 6 December 2018 07:02:50 UTC, Paulo da Silva wrote: > Hi! > > Does anybody know why this code does not expand the text widget when I > increase the window size (with mouse)? I want height and width but as > minimum (or may be initial) size. > > import tkinter as tk > > class App: >

Re: polar coordinates?

2018-12-10 Thread Cousin Stanley
Brian Christiansen wrote: > > I guess my question is if python can do this natively > or if there is a package somewhere ( polar.py ? ) that can do this > You might consider matplotlib for polar coordinate plotting ... https://matplotlib.org/examples/pylab_examples/polar_demo.

Re: How to host python micro-services on windows machine?

2018-12-10 Thread oliver
You might also find that https://www.raymond.cc/blog/keep-application-running-by-automatically-rerun-when-closed/ lists some useful options. But most solutions I read about for Windows seem to be based on its Services subsystem and its ability to restart and control how many time to retry. On Mon

Re: Program to keep track of success percentage

2018-12-10 Thread Cousin Stanley
Musatov wrote: > I am thinking about a program where the only user input is win/loss. > > The program let's you know if you have won > more than 31% of the time or not. > > Any suggestions about how to approach authoring > such a program? Thanks. The following results are from a python to

Re: How to host python micro-services on windows machine?

2018-12-10 Thread oliver
There are a few options in https://stackoverflow.com/q/7629813/869951, esp the third answer. On Mon., Dec. 10, 2018, 02:41 , wrote: > I am developing some micro-services in python. I want to host that > micro-services on windows machine. For ubuntu I am using Supervisord. What > should I use for

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Antoon Pardon
On 10/12/18 11:16, Chris Angelico wrote: > On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon wrote: >> On 10/12/18 11:03, Chris Angelico wrote: >>> Considering that, in a problem of that description, neither S nor M >>> may represent zero, I don't think there's a problem here. >> Not all such problems

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Chris Angelico
On Mon, Dec 10, 2018 at 10:31 PM wrote: > > Chris Angelico於 2018年12月10日星期一 UTC+8下午7時09分01秒寫道: > > Yet most human beings will agree that you don't write out an > > arithmetic problem as: > > > >0 1 9 8 > > + 7 1 3 > > = > > Python3 gives me the error message is because of the number

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread jfong
Chris Angelico於 2018年12月10日星期一 UTC+8下午7時09分01秒寫道: > On Mon, Dec 10, 2018 at 9:46 PM wrote: > > > > Chris Angelico於 2018年12月10日星期一 UTC+8下午6時17分14秒寫道: > > > On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon > > > wrote: > > > > > > > > On 10/12/18 11:03, Chris Angelico wrote: > > > > > Considering tha

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Chris Angelico
On Mon, Dec 10, 2018 at 9:46 PM wrote: > > Chris Angelico於 2018年12月10日星期一 UTC+8下午6時17分14秒寫道: > > On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon wrote: > > > > > > On 10/12/18 11:03, Chris Angelico wrote: > > > > Considering that, in a problem of that description, neither S nor M > > > > may repres

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread jfong
Chris Angelico於 2018年12月10日星期一 UTC+8下午6時17分14秒寫道: > On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon wrote: > > > > On 10/12/18 11:03, Chris Angelico wrote: > > > Considering that, in a problem of that description, neither S nor M > > > may represent zero, I don't think there's a problem here. > > >

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Chris Angelico
On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon wrote: > > On 10/12/18 11:03, Chris Angelico wrote: > > Considering that, in a problem of that description, neither S nor M > > may represent zero, I don't think there's a problem here. > > Not all such problems have that condition. They should. Every

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Antoon Pardon
On 10/12/18 11:03, Chris Angelico wrote: > On Mon, Dec 10, 2018 at 9:01 PM Antoon Pardon wrote: >> On 8/12/18 06:00, Cameron Simpson wrote: >>> On 07Dec2018 20:24, Jach Fong wrote: Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: > What is it exactly that you're trying to accomplish with this? P

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Antoon Pardon
On 8/12/18 07:59, Serhiy Storchaka wrote: > 08.12.18 03:17, jf...@ms4.hinet.net пише: > 00 >> 0 > 03 >>    File "", line 1 >> 03 >>   ^ >> SyntaxError: invalid token > > > In Python 3.8 the error message will be more informative: > 03 >   File "", line 1 > SyntaxError: leading

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Chris Angelico
On Mon, Dec 10, 2018 at 9:01 PM Antoon Pardon wrote: > > On 8/12/18 06:00, Cameron Simpson wrote: > > On 07Dec2018 20:24, Jach Fong wrote: > >> Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: > >>> What is it exactly that you're trying to accomplish with this? Perhaps > >>> there's a better way than usi

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Antoon Pardon
On 8/12/18 06:00, Cameron Simpson wrote: > On 07Dec2018 20:24, Jach Fong wrote: >> Ian at 2018/12/8 UTC+8 AM11:28:34 wrote: >>> What is it exactly that you're trying to accomplish with this? Perhaps >>> there's a better way than using eval. >> >> This problem comes from solving a word puzzle, >>  

Re: Why Python don't accept 03 as a number?

2018-12-10 Thread Antoon Pardon
On 8/12/18 09:35, Ian Kelly wrote: > On Fri, Dec 7, 2018 at 11:56 PM Henrik Bengtsson > wrote: >> A comment from the sideline: one could imagine extending the Python syntax >> with a (optional) 0d prefix that allows for explicit specification of >> decimal values. They would "complete" the family:

Re: Basic pynomo instructions not working

2018-12-10 Thread Adam Funk
On 2018-11-22, dieter wrote: > The "pynomo" version you have installed may have been developped for > Python 2 and not run in "python3". > > In Python 2, you have implicit relative imports. > As an example, it allows modules in the package "pynomo" > to use "import nomo_wrapper" to import the subm

Re: Creating type evaluation annotation

2018-12-10 Thread Marek Mosiewicz
W dniu 09.12.2018, nie o godzinie 15∶50 -0500, użytkownik Terry Reedy napisał: > > Mypy recognizes this sublanguage to 'compute' whether calls conform > to  > the defined interfaces. > As far as I understand currently it computes if declaration commits to static type. What I propose is to annotat