Re: Instantiating sub-class from super

2019-10-15 Thread Frank Millman
On 2019-10-14 10:55 PM, DL Neil via Python-list wrote: Is there a technique or pattern for taking a (partially-) populated instance of a class, and re-creating it as an instance of one of its sub-classes? In a medically-oriented situation, we have a Person() class, and start collecting infor

Re: Instantiating sub-class from super

2019-10-15 Thread DL Neil via Python-list
On 16/10/19 1:55 PM, duncan smith wrote: On 15/10/2019 21:36, DL Neil wrote: On 16/10/19 12:38 AM, Rhodri James wrote: On 14/10/2019 21:55, DL Neil via Python-list wrote: ... So, yes, the "label" is unimportant - except to politicians and statisticians, who want precise answers from vague coll

Re: Instantiating sub-class from super

2019-10-15 Thread duncan smith
On 15/10/2019 21:36, DL Neil wrote: > On 16/10/19 12:38 AM, Rhodri James wrote: >> On 14/10/2019 21:55, DL Neil via Python-list wrote: > ... > >>> It seemed better (at the design-level) to have Man( Person ) and >>> Woman( Person ) sub-classes to contain the pertinent attributes, >>> source more d

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Cousin Stanley wrote: > There is also a useful python package > called sunset which I fouund a reference to > on stackoverflow Maybe I'll wake up some time today :-) The python package is called suntime not sunset # pip3 show suntime -- Stanley C. Kitching Human Being Ph

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Cousin Stanley wrote: > > d_sse = sse_sunset - sse_sunrise # seconds of daylight > I think it might be required to convert utc time to local time for the difference in sunrise and sunset times to make sense in local time -- Stanley C. Kitching Human Being Phoenix, A

Re: question about making an App for Android

2019-10-15 Thread Cousin Stanley
Chris Angelico wrote: > Or maybe it's really simple, because there's an HTTP API >that > gives you the information. > > There's an API for everything these days. > > A quick web search showed up this: > > https://sunrise-sunset.org/api > There is also a useful python package c

Re: Instantiating sub-class from super

2019-10-15 Thread DL Neil via Python-list
On 16/10/19 12:38 AM, Rhodri James wrote: On 14/10/2019 21:55, DL Neil via Python-list wrote: ... It seemed better (at the design-level) to have Man( Person ) and Woman( Person ) sub-classes to contain the pertinent attributes, source more detailed and specific questions, and collect such dat

[RELEASE] Python 3.7.5 is now available

2019-10-15 Thread Ned Deily
Python 3.7.5 is now available, the next maintenance release of Python 3.7. You can find the release files, a link to the changelog, and more information here: https://www.python.org/downloads/release/python-375/ Note that the next feature release of Python 3, Python 3.8.0, is also now avai

Re: Hello, I need help.

2019-10-15 Thread Piet van Oostrum
Damla Pehlivan writes: > Dear Python Team, [...] > I am writing this mail quite emotionally. I asked a new "friend" for help, > but he laughed. He said it was because I am a girl and this is why I could > not do it. I want to prove to him and the whole world that I can do it. I > have a lesson n

UG Announcement - Python Tanzania Community

2019-10-15 Thread Noah .
Dear Listers, As per requirements, we are pleased to announce the existence of the Python language community in Tanzania. Please find below some information and the current developments. *User Group Details;* Name: Python Community Tanzania Mailing list: https://mail.python.org/mailman3/lists/t

Re: Hello, I need help.

2019-10-15 Thread Peter Pearson
On Tue, 15 Oct 2019 18:57:04 +0300, Damla Pehlivan wrote: [snip] > . . . I downloaded the python program, and I > also downloaded Pycharm to use it. To be fair, I do not know what I am > doing, but I made some progress last night and I was happy about it. Today > when I came back from university

Re: upgrading python on raspbian

2019-10-15 Thread Gene Heskett
On Tuesday 15 October 2019 11:10:41 Dennis Lee Bieber wrote: > On Tue, 15 Oct 2019 01:30:59 -0400, Gene Heskett > > > declaimed the following: > >On Monday 14 October 2019 12:56:22 Gene Heskett wrote: > > > >Continueing this thread, I now have a missing function by name, > > "units", that is prev

Re: Hello, I need help.

2019-10-15 Thread Igor Korot
Hi, Are you trying to run your program, PyCharm, or the python console? Thank you. On Tue, Oct 15, 2019 at 12:01 PM Damla Pehlivan wrote: > > Dear Python Team, > First, I would like to introduce myself. My name is Damla Pehlivan, and I > live in Ankara/Turkey. I am a university student at Ankar

Hello, I need help.

2019-10-15 Thread Damla Pehlivan
Dear Python Team, First, I would like to introduce myself. My name is Damla Pehlivan, and I live in Ankara/Turkey. I am a university student at Ankara University. My major is Biology; therefore, I want to learn Python to use for Data Science. When I researched and asked my professors, they suggeste

Re: Instantiating sub-class from super

2019-10-15 Thread Rhodri James
On 14/10/2019 21:55, DL Neil via Python-list wrote: Is there a technique or pattern for taking a (partially-) populated instance of a class, and re-creating it as an instance of one of its sub-classes? In a medically-oriented situation, we have a Person() class, and start collecting informat

Re: Curious about library inclusion

2019-10-15 Thread Rhodri James
On 15/10/2019 12:38, Antoon Pardon wrote: On 11/10/19 15:48, Rhodri James wrote: On 10/10/2019 12:40, Antoon Pardon wrote: About including piped iterators: http://code.activestate.com/recipes/580625-collection-pipeline-in-python/ On 10/10/19 13:00, Paul Moore wrote: As another measure,

Re: Curious about library inclusion

2019-10-15 Thread Antoon Pardon
On 11/10/19 15:48, Rhodri James wrote: > On 10/10/2019 12:40, Antoon Pardon wrote: >> About including piped iterators: >> >> http://code.activestate.com/recipes/580625-collection-pipeline-in-python/ >> >> On 10/10/19 13:00, Paul Moore wrote: >>> As another measure, look at various other librar

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-15 Thread Piet van Oostrum
Martin Schöön writes: > Den 2019-10-13 skrev Piet van Oostrum : >> Martin Schöön writes: >> >>> Is there a way to do "Download as PDF" and get A4 pages instead >>> of Letter? Yes, I know I can do "Download as LaTeX" and edit the >> > < snip > > >> Make a directory ~/.jupyter/templates and put a