Re: Instantiating sub-class from super

2019-10-16 Thread Frank Millman
On 2019-10-16 7:33 AM, Frank Millman wrote: Here is a link to an article entitled 'Understanding Hidden Subtypes'. It dates back to 2004, but I think it is still relevant. It addresses precisely the issues that you raise, but from a data-modelling perspective, not a programming one. http://

Re: Instantiating sub-class from super

2019-10-16 Thread duncan smith
On 16/10/2019 19:52, MRAB wrote: > On 2019-10-16 19:43, duncan smith wrote: >> On 16/10/2019 04:41, DL Neil wrote: >>> 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-lis

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-16 Thread Piet van Oostrum
Martin Schöön writes: > Den 2019-10-15 skrev Piet van Oostrum : >> >> What does this report? Compare if there is a difference between home and >> work. >> >> from jupyter_core.paths import jupyter_path >> print(jupyter_path('notebook','templates')) >> > In both cases I get (with different userna

Re: Instantiating sub-class from super

2019-10-16 Thread Barry Scott
> On 14 Oct 2019, at 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? The pattern I know is to use a factory function to choose between a number

Re: Jupyter Notebook -> PDF with A4 pages?

2019-10-16 Thread Martin Schöön
Den 2019-10-15 skrev Piet van Oostrum : > > What does this report? Compare if there is a difference between home and work. > > from jupyter_core.paths import jupyter_path > print(jupyter_path('notebook','templates')) > In both cases I get (with different usernames): /home/username/.local/share/jup

Re: Instantiating sub-class from super

2019-10-16 Thread MRAB
On 2019-10-16 19:43, duncan smith wrote: On 16/10/2019 04:41, DL Neil wrote: 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 - ex

Re: Instantiating sub-class from super

2019-10-16 Thread duncan smith
On 16/10/2019 04:41, DL Neil wrote: > 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 >>

Re: Except with empty tuple

2019-10-16 Thread Terry Reedy
On 10/16/2019 1:18 PM, MRAB wrote: On 2019-10-16 15:03, Antoon Pardon wrote: I would like to verify I understand correctly. It is about the following construct: try: statement1 statement2 ... except (): pass As far as I understand and my tests see

Re: Except with empty tuple

2019-10-16 Thread MRAB
On 2019-10-16 15:03, Antoon Pardon wrote: I would like to verify I understand correctly. It is about the following construct: try: statement1 statement2 ... except (): pass As far as I understand and my tests seem to confirm this, this is equivalle

Re: Instantiating sub-class from super

2019-10-16 Thread Piet van Oostrum
DL Neil writes: > That said, if a "trans" person has ovaries or testes (for example) then > a non-traditional sexual identification is irrelevant - for medical > purposes. Diseases in those areas (and now I'm a long way from a > research questionnaire and from Python - but this is roughly how it

Re: upgrading python on raspbian

2019-10-16 Thread Cousin Stanley
Gene Heskett wrote: > Continueing this thread, I now have a missing function by name, "units", > that is preventing LinuxCNC from running. > > Where in the python 3 world do I find that function?, > Under debian buster there is a python 2 package called python-quantities that apparent

Except with empty tuple

2019-10-16 Thread Antoon Pardon
I would like to verify I understand correctly. It is about the following construct: try: statement1 statement2 ... except (): pass As far as I understand and my tests seem to confirm this, this is equivallent to just statement1 statement2 ...

Re: installing libraries

2019-10-16 Thread tommy yama
You can use python 3 spider probably. On Wed, Oct 16, 2019 at 7:22 PM Tesfalem Abraham wrote: > hello users, > > Here, I tried to start python 2.7 (spider) but I could not install or add > my lib to the working area. > > I do appreciate your suggestions for me. > > thanks. > -- > https://mail.py

installing libraries

2019-10-16 Thread Tesfalem Abraham
hello users, Here, I tried to start python 2.7 (spider) but I could not install or add my lib to the working area. I do appreciate your suggestions for me. thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Curious about library inclusion

2019-10-16 Thread Antoon Pardon
On 15/10/19 13:59, Rhodri James wrote: > 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/ >