Re: Python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
On Sunday, October 11, 2015 at 12:04:18 PM UTC+5:30, Chris Angelico wrote: > On Sun, Oct 11, 2015 at 5:15 PM, Chris Angelico wrote: > > On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody wrote: > >> At > >> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-i

Re: Python 2.2 or 3.5

2015-10-10 Thread Mark Lawrence
On 11/10/2015 06:57, Rustom Mody wrote: On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote: On 11/10/2015 06:11, Rustom Mody wrote: At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-t

Re: Python 2.2 or 3.5

2015-10-10 Thread Chris Angelico
On Sun, Oct 11, 2015 at 5:15 PM, Chris Angelico wrote: > On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody wrote: >> At >> https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance >> >> it says >> In Py

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread Chris Angelico
On Sun, Oct 11, 2015 at 4:53 PM, dieter wrote: > Otherwise, you can likely use a technique called "monkey patching". > This is dynamically changing code at startup time. > In your case, it could look like: > >from ... import Node > >def new_method(self, ...): > ... > >Node.new_me

Re: Python 2.2 or 3.5

2015-10-10 Thread Ben Finney
Rustom Mody writes: > On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote: > > On 11/10/2015 06:11, Rustom Mody wrote: > > > At https://docs.python.org/3.5/faq/[…] > > > > > > it says > > > In Python 2.2, you can inherit from built-in classes such as int, list, > > > dict, e

Re: Python 2.2 or 3.5

2015-10-10 Thread Chris Angelico
On Sun, Oct 11, 2015 at 4:11 PM, Rustom Mody wrote: > At > https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance > > it says > In Python 2.2, you can inherit from built-in classes such as int, li

Re: Python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
On Sunday, October 11, 2015 at 11:09:17 AM UTC+5:30, Mark Lawrence wrote: > On 11/10/2015 06:11, Rustom Mody wrote: > > At > > https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance > > > > it says

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread dieter
speeze.pear...@gmail.com writes: > ... > Someone wrote a library that creates and manipulates `Node`s. > I would like to write another layer on top of this, to make > trees that behave just like the library's trees, but whose nodes > have some extra methods. If you are happy, the library supports

Re: Understanding WSGI together with Apache

2015-10-10 Thread dieter
Johannes Bauer writes: > I'm running an Apache 2.4 webserver using mod_wsgi 4.3.0. There are two > different applications running in there running on two completely > separate vhosts. > > I'm seeing some weird crosstalk between them which I do not understand. > In particular, crosstalk concerning

Re: Python 2.2 or 3.5

2015-10-10 Thread Mark Lawrence
On 11/10/2015 06:11, Rustom Mody wrote: At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance it says In Python 2.2, you can inherit from built-in classes such as int, list, dict, etc. So

Re: Python 2.2 or 3.5

2015-10-10 Thread Ian Kelly
On Sat, Oct 10, 2015 at 11:11 PM, Rustom Mody wrote: > At > https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance > > it says > In Python 2.2, you can inherit from built-in classes such as int, l

Python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance it says In Python 2.2, you can inherit from built-in classes such as int, list, dict, etc. So is it 3.5 or 2.2? For some reason google

python 2.2 or 3.5

2015-10-10 Thread Rustom Mody
At https://docs.python.org/3.5/faq/extending.html#can-i-create-an-object-class-with-some-methods-implemented-in-c-and-others-in-python-e-g-through-inheritance it says In Python 2.2, you can inherit from built-in classes such as int, list, dict, etc. So is it 3.5 or 2.2? For some reason google

Re: Strong typing implementation for Python

2015-10-10 Thread Michael Torrie
On 10/09/2015 10:26 AM, John Michael Lafayette wrote: > I would like Python to have a strong typing feature that can co-exist with > the current dynamic typing system. Currently Python is like this: > > var animal = Factory.make("dog") # okay. > var dog = Factory.make("dog") # okay.

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread Gregory Ewing
Laura Creighton wrote: don't fear mixins and multiple inheritance unduly. They are a practical solution for a lot of problems. You might have one of them. I don't think mixins are a solution here, because they still require controlling the instantiation of the classes so that you can substitu

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread Steven D'Aprano
On Sun, 11 Oct 2015 04:02 am, speeze.pear...@gmail.com wrote: > (This is a long post, but the question is simple. Most of this is > just me enumerating what I've already tried.) > > Someone wrote a library that creates and manipulates `Node`s. > I would like to write another layer on top of this,

Re: Strong typing implementation for Python

2015-10-10 Thread Bartc
On 09/10/2015 17:26, John Michael Lafayette wrote: I would like Python to have a strong typing feature that can co-exist with the current dynamic typing system. Currently Python is like this: var animal = Factory.make("dog") # okay. var dog = Factory.make("dog") # okay. var

Re: Python problem

2015-10-10 Thread Laura Creighton
In a message of Sat, 10 Oct 2015 20:39:29 +0100, Mark Lawrence writes: >On 10/10/2015 07:15, Sébastien Pinsonneault wrote: >> Hi, >> >> I've downloaded Python 3.5.0 64 bits, but I can't open it. It ask me >> each time if I want to modify, repair or uninstall, but doesn't open. >> >> I have Windows

Re: Error

2015-10-10 Thread Terry Reedy
On 10/10/2015 2:33 AM, Chris Angelico wrote: On Sat, Oct 10, 2015 at 4:39 PM, Shreenivas Potnis wrote: I have 32 bit machine with XP service pack 3. I installed x86 version of python. While running I get the following error: Python 3.5 does not run on XP. One of the goals for the 3.5.1

Re: Strong typing implementation for Python

2015-10-10 Thread Mark Lawrence
On 09/10/2015 17:03, John Michael Lafayette wrote: I would like Python to have a strong typing feature that can co-exist with the current dynamic typing system. Currently Python is like this: var animal = Factory.make("dog") #okay var dog = Factory.make("dog") #okay As Ben Finney has all read

Re: Python problem

2015-10-10 Thread Mark Lawrence
On 10/10/2015 07:15, Sébastien Pinsonneault wrote: Hi, I've downloaded Python 3.5.0 64 bits, but I can't open it. It ask me each time if I want to modify, repair or uninstall, but doesn't open. I have Windows 10 64 bits. Thx Check out the issue tracker as there are known problems. If you'r

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread Laura Creighton
In a message of Sat, 10 Oct 2015 10:02:24 -0700, speeze.pear...@gmail.com write s: >I should just use the existing library's `Node` class, and write >my library in a functional style. Don't define `MyNode.foo()`, >instead define `mylibrary.foo(my_node)`. >I've got nothing against functional progra

Re: How do I extend a class that I never instantiate myself?

2015-10-10 Thread Ian Kelly
On Sat, Oct 10, 2015 at 11:02 AM, wrote: > (This is a long post, but the question is simple. Most of this is > just me enumerating what I've already tried.) > > Someone wrote a library that creates and manipulates `Node`s. > I would like to write another layer on top of this, to make > trees that

How do I extend a class that I never instantiate myself?

2015-10-10 Thread speeze . pearson
(This is a long post, but the question is simple. Most of this is just me enumerating what I've already tried.) Someone wrote a library that creates and manipulates `Node`s. I would like to write another layer on top of this, to make trees that behave just like the library's trees, but whose nodes

Re: Errors installing xmiparser with Python 3.4 and windows - any help?

2015-10-10 Thread Gary Hanyzewski
Laura, Thanks for the pointer to PyXB, I think this will work for my purposes and it appears to be Python 3.4 / Windows compatible. Thank you to all who helped. On Friday, October 9, 2015 at 1:14:32 PM UTC-5, Laura Creighton wrote: > In a message of Fri, 09 Oct 2015 10:24:34 -0700, Gary Hanyze

Re: Using pipe in a system call

2015-10-10 Thread Emile van Sebille
On 10/10/2015 4:42 AM, Cecil Westerhof wrote: >To avoid this, I have adopted this habit - > >export_spreekwoorden = ( >"SELECT spreekwoord " >"FROM spreekwoorden " >"ORDER BY spreekwoord COLLATE LOCALIZED" >) > >To my eye, the result is nicer, at virtually no extra effort. Just >don't forget the

Understanding WSGI together with Apache

2015-10-10 Thread Johannes Bauer
Hi there, I'm running an Apache 2.4 webserver using mod_wsgi 4.3.0. There are two different applications running in there running on two completely separate vhosts. I'm seeing some weird crosstalk between them which I do not understand. In particular, crosstalk concerning the locales of the two.

Re: Using pipe in a system call

2015-10-10 Thread Cecil Westerhof
On Saturday 10 Oct 2015 13:42 CEST, Cecil Westerhof wrote: > On Saturday 10 Oct 2015 09:45 CEST, Frank Millman wrote: > >> "Cecil Westerhof" wrote in message >> news:87a8rsnkmw@equus.decebal.nl... >> >> This has got nothing to do with your question (which I found >> interesting) but I thought

Re: Using pipe in a system call

2015-10-10 Thread Cecil Westerhof
On Saturday 10 Oct 2015 09:45 CEST, Frank Millman wrote: > "Cecil Westerhof" wrote in message > news:87a8rsnkmw@equus.decebal.nl... > > This has got nothing to do with your question (which I found > interesting) but I thought I would mention it. > >> export_spreekwoorden is defined as: >> expo

Re: Using pipe in a system call

2015-10-10 Thread Frank Millman
"Cecil Westerhof" wrote in message news:87a8rsnkmw@equus.decebal.nl... This has got nothing to do with your question (which I found interesting) but I thought I would mention it. export_spreekwoorden is defined as: export_spreekwoorden= ''' SELECT spreekwoord FROM

Static typing implementation for Python (was: Strong typing implementation for Python)

2015-10-10 Thread Ben Finney
John Michael Lafayette writes: > I would like Python to have a strong typing feature that can co-exist > with the current dynamic typing system. You have incorrectly conflated two separate matters. The opposite of string typing is weak typing. Python has strong typing: its objects will only beh