Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: >>> I haven't read the descriptor protocol as yet. >> You should. You should also trim your quotations to the relevant >> minimum, and post using your real name. > > I don't take advice from people on USENET who DON'T have a long history > of hel

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Steven D'Aprano
On Sun, 13 Mar 2016 04:54 am, BartC wrote: > On 12/03/2016 16:56, Steven D'Aprano wrote: >> On Sun, 13 Mar 2016 12:42 am, BartC wrote: >> >>> Ad-hoc attributes I don't have as much of a problem with, as they can be >>> handy. But predefined ones also have their points. (For one thing, I >>> know h

Re: Descriptors vs Property

2016-03-13 Thread Veek. M
Thomas 'PointedEars' Lahn wrote: > Veek. M wrote: > >> Thomas 'PointedEars' Lahn wrote: I haven't read the descriptor protocol as yet. >>> You should. You should also trim your quotations to the relevant >>> minimum, and post using your real name. >> >> I don't take advice from people on U

Re: Encapsulation in Python

2016-03-13 Thread Steven D'Aprano
On Sun, 13 Mar 2016 03:44 am, Ian Kelly wrote: > On Fri, Mar 11, 2016 at 7:39 PM, Rick Johnson > wrote: >> At run-time, i don't care how large a "module namespace" may >> be. Sometimes a module namespace will be small, with only a >> few exposed symbols, but sometimes, a module namespace will >>

Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > > http://www.thecodingforums.com/threads/examples-of-ecmascipt-written-by-thomas-lahn.937812/ > > Examples of ECMAScipt written by Thomas Lahn > > Thomas is the forums best known critic of everyone else's attempts at > writing ECMAscript. I was wondering

Error

2016-03-13 Thread Abeer Sohail
I get this error every time I open Python. -- https://mail.python.org/mailman/listinfo/python-list

programeren met python

2016-03-13 Thread Imre De Craemer via Python-list
hoe moet je python dounlauden -- https://mail.python.org/mailman/listinfo/python-list

Export

2016-03-13 Thread Herbert Müller
Hello, how can I export my .py files to .exe files? Thanks for your support Your Robert -- https://mail.python.org/mailman/listinfo/python-list

Word Order Simple.

2016-03-13 Thread Rodrick Brown
You are given nn words. Some words may repeat. For each word, output its number of occurrences. The output order should correspond with the input order of appearance of the word. See the sample input/output for clarification. *Note:* Each input line ends with a *"\n"* character. *Constraints:* 1≤

problem using pickle

2016-03-13 Thread Nicky Mac
Dear Python team, I have studied the excellent documentation, and attempted to make use of pickle thus: filename = 'my_saved_adventure' import pickle class object: def __init__(self,i,.t) : self.id = i . class world: def __init__(self): self.obj

Re: Export

2016-03-13 Thread Jesper K Brogaard
Den 13-03-2016 kl. 00:07 skrev Herbert Müller: Hello, how can I export my .py files to .exe files? Thanks for your support Your Robert Look at pyinstaller or py2exe. I have no experience with either of them. -- Venlig hilsen / Best regards Jesper K. Brogaard (remove upper case letters in my

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Gene Heskett
On Sunday 13 March 2016 01:43:21 Terry Reedy wrote: > On 3/12/2016 8:20 PM, Steven D'Aprano wrote: > > Yeah, we get it. The CPython interpreter is plenty fast enough for > > whatever you use it for. Good for you! Millions aren't so lucky. > > They are looking for something faster, because for them

Re: Word Order Simple.

2016-03-13 Thread Peter Otten
Rodrick Brown wrote: > You are given nn words. Some words may repeat. For each word, output its > number of occurrences. The output order should correspond with the input > order of appearance of the word. See the sample input/output for > clarification. > > *Note:* Each input line ends with a *"

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread BartC
On 13/03/2016 09:39, Steven D'Aprano wrote: On Sun, 13 Mar 2016 04:54 am, BartC wrote: Common sense tells you it is unlikely. Perhaps your common sense is different from other people's common sense. To me, and many other Python programmers, it's common sense that being able to replace functi

Re: Error

2016-03-13 Thread Joel Goldstick
On Sat, Mar 12, 2016 at 3:32 AM, Abeer Sohail wrote: > I get this error every time I open Python. > -- > https://mail.python.org/mailman/listinfo/python-list > and what error is that? no attachments in this list. just copy and paste the error please -- Joel Goldstick http://joelgoldstick.com

Re: problem using pickle

2016-03-13 Thread Peter Otten
Nicky Mac wrote: > Dear Python team, > I have studied the excellent documentation, That is always a laudable endeavour ;) > and attempted to make use of > pickle thus: > > filename = 'my_saved_adventure' > import pickle > class object: 'object' already is the name for a Python built-in; you

Re: Descriptors vs Property

2016-03-13 Thread Veek. M
Thomas 'PointedEars' Lahn wrote: >>> Nobility lies in action, not in name. >>> —Surak Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad to say I like/trust Ned a bit so *huggles* to you, and I shall snip. Also, sorry about the 'Steve' thing - bit shady dragging in

RE: looping and searching in numpy array

2016-03-13 Thread Albert-Jan Roskam
> Date: Thu, 10 Mar 2016 08:48:48 -0800 > Subject: Re: looping and searching in numpy array > From: heml...@gmail.com > To: python-list@python.org > > On Thursday, March 10, 2016 at 2:02:57 PM UTC+1, Peter Otten wrote: > > Heli wrote: > > > > > Dear all, > > > > > > I need to loop over a numpy

Re: programeren met python

2016-03-13 Thread Irmen de Jong
On 12-3-2016 17:58, Imre De Craemer wrote: > hoe moet je python dounlauden > Dit is een Engelse newsgroup, dus je kunt je vragen beter in het Engels stellen in plaats van in het Nederlands. Maar om je vraag te beantwoorden: Ga naar https://www.python.org/downloads/ met je web browser en klik da

RE: looping and searching in numpy array

2016-03-13 Thread Albert-Jan Roskam
> From: sjeik_ap...@hotmail.com > To: heml...@gmail.com; python-list@python.org > Subject: RE: looping and searching in numpy array > Date: Sun, 13 Mar 2016 13:51:23 + > > Hi, I suppose you have seen this already (in particular the first link): > http://numpy-discussion.10968.n7.nabble.c

issue w/ python 3.5.7

2016-03-13 Thread lucile . mage
Hello, We would like to get the procedure to launch the software "python.exe". The only options we have acsess are: modify, repair and uninstall. Thanks for your help, Rgds, Lucile -- https://mail.python.org/mailman/listinfo/python-list

Loading error message

2016-03-13 Thread BobFtz--- via Python-list
Hello I have just downloaded and installed a copy of the 3.5.1 programme but when I come to run the programme I get an error message that says that .api-ms-win-crt-runtime-l 1-1-0.dll is missing. I have un-installed and reinstalled the 3.5.1 programme a few time (as advised) but I sti

pdf version of python tutorial

2016-03-13 Thread kamaraju kusumanchi
Is there a pdf version of the python tutorial https://docs.python.org/3/tutorial/index.html that I can download? The idea is to have everything in one file so I can search easily, be able to work offline. thanks raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog -- https://mail.

Re: pdf version of python tutorial

2016-03-13 Thread Chris Warrick
On 13 March 2016 at 14:45, kamaraju kusumanchi wrote: > Is there a pdf version of the python tutorial > https://docs.python.org/3/tutorial/index.html that I can download? The > idea is to have everything in one file so I can search easily, be able > to work offline. > > thanks > raju > -- > Kamara

Re: issue w/ python 3.5.7

2016-03-13 Thread Steven D'Aprano
On Mon, 14 Mar 2016 03:56 am, lucile.m...@free.fr wrote: > Hello, > We would like to get the procedure to launch the software "python.exe". > The only options we have acsess are: modify, repair and uninstall. Thanks > for your help, Rgds, What is your operating system? -- Steven -- https://

Re: Descriptors vs Property

2016-03-13 Thread Thomas 'PointedEars' Lahn
Veek. M wrote: > Thomas 'PointedEars' Lahn wrote: Nobility lies in action, not in name. —Surak > > Someone called Ned.B who i know elsewhere spoke on your behalf. I'm glad > to say I like/trust Ned a bit so *huggles* to you, and I shall snip. > > Also, sorry about the 'Steve' thi

Re: issue w/ python 3.5.7

2016-03-13 Thread Thomas 'PointedEars' Lahn
lucile.m...@free.fr wrote: > We would like to get the procedure to launch the software "python.exe". > The only options we have acsess are: modify, repair and uninstall. […] -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte kein

Re: issue w/ python 3.5.7

2016-03-13 Thread Oscar Benjamin
On 13 Mar 2016 18:01, "Steven D'Aprano" wrote: > > On Mon, 14 Mar 2016 03:56 am, lucile.m...@free.fr wrote: > > > Hello, > > We would like to get the procedure to launch the software "python.exe". > > The only options we have acsess are: modify, repair and uninstall. Thanks > > for your help, Rgds

Re: Loading error message

2016-03-13 Thread Oscar Benjamin
On 13 Mar 2016 17:06, "BobFtz--- via Python-list" wrote: > > Hello > > I have just downloaded and installed a copy of the 3.5.1 programme but when > I come to run the programme I get an error message that says that > .api-ms-win-crt-runtime-l 1-1-0.dll is missing. > > I have un-installed and

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread BartC
On 13/03/2016 01:10, Mark Lawrence wrote: On 12/03/2016 23:57, BartC wrote: [switch statements] How does Python manage without them? Is it really necessary to declare hundreds of individual variables and assign a value to each? (And risk someone assigning a new value to them.) That they might

Re: The Cost of Dynamism

2016-03-13 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Sun, Mar 13, 2016 at 6:24 AM, Thomas 'PointedEars' Lahn > wrote: >> Marko Rauhamaa wrote: >>> […] HTML markup is all ASCII. >> >> Wrong. I am creating HTML documents whose source code contains Unicode >> characters every day. >> >> Also, the two of you fail to differen

Re: The Cost of Dynamism

2016-03-13 Thread Thomas 'PointedEars' Lahn
BartC wrote: > On 12/03/2016 19:26, Thomas 'PointedEars' Lahn wrote: >> BartC wrote: >>> On 12/03/2016 12:13, Marko Rauhamaa wrote: Why, look at the *English* page on Hillary Clinton: Hillary Diane Rodham Clinton /ˈhɪləri daɪˈæn ˈrɒdəm ˈklɪntən/ (born October 26, 1947

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Marko Rauhamaa
BartC : > Exactly why having ready-made solutions is preferable to everyone > hacking their own solutions to switch. A developer friend of mine once said insightfully that the point of OO is getting rid of switch statements. IOW, most use cases for switch statements are handled with virtual funct

Re: problem using pickle

2016-03-13 Thread Terry Reedy
On 3/12/2016 10:45 AM, Nicky Mac wrote: class object: def __init__(self,i, This is a syntax error, so this is not the code that ran without error. As Peter Otten said, please write a minimal complete runnable example that shows the error and then copy and paste it as run. -- Terry J

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Chris Angelico
On Mon, Mar 14, 2016 at 6:39 AM, BartC wrote: > I used it in my benchmark to replace the if-else chain checking three lots > of ranges: > > switch(c) > if case(ord("A"),ord("B"),ord("C"),ord("D"),ord("E"),ord("F"), > ord("G"),ord("H"),ord("I"),ord("J"),ord("K"),ord("L"), > ord("M")

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Christian Gollwitzer
Am 13.03.16 um 20:39 schrieb BartC: switch(c) if case(ord("A"),ord("B"),ord("C"),ord("D"),ord("E"),ord("F"), ord("G"),ord("H"),ord("I"),ord("J"),ord("K"),ord("L"), ord("M"),ord("N"),ord("O"),ord("P"),ord("Q"),ord("R"), ord("S"),ord("T"),ord("U"),ord("V"),ord("W"),ord("X

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Chris Angelico
On Mon, Mar 14, 2016 at 8:26 AM, Christian Gollwitzer wrote: > I assume you run this in a big loop. What about a single hash-table lookup? > > from collections import Counter > counts=Counter() > for c in whatever: > counts[c]+=1 > > upper=sum(counts[x] for x in range(ord('A'), ord('Z')+1)

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread BartC
On 13/03/2016 20:57, Chris Angelico wrote: On Mon, Mar 14, 2016 at 6:39 AM, BartC wrote: I used it in my benchmark to replace the if-else chain checking three lots of ranges: switch(c) if case(ord("A"),ord("B"),ord("C"),ord("D"),ord("E"),ord("F"), It worked, but took 110 seconds; 80 seconds

Re: pdf version of python tutorial

2016-03-13 Thread kamaraju kusumanchi
On Sun, Mar 13, 2016 at 1:34 PM, Chris Warrick wrote: > > There is a download link on the documentation index: > > https://docs.python.org/3/download.html > Exactly what I needed. Thanks. raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog -- https://mail.python.org/mailman/lis

Is anyone in this group using Python Editor v5 for Chromebooks?

2016-03-13 Thread Jeff Schumaker
I'm trying to use Python Editor v5 for Chromebooks. It works fine, except it won't read data files. I'm just wondering if anyone else is using this editor and has found a solution to this problem. -- https://mail.python.org/mailman/listinfo/python-list

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Paul Rubin
BartC writes: > def case(*args): > return any((arg == switch.value for arg in args)) def case(values): return switch.value in values > I used it in my benchmark to replace the if-else chain checking three > lots of ranges: > > switch(c) > if case(ord("A"),ord("B"),ord("C"),ord("D"),ord(

Re: Encapsulation in Python

2016-03-13 Thread Gregory Ewing
Rick Johnson wrote: Sure, that's reliable in most cases, but your argument assumes that the actual source code for the symbol exists in the module from which it was imported, when it could just as well exist N-levels below that that module, due to chained imports. Unless the module is doing som

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread chetam . chetzy
On Friday, January 8, 2016 at 11:38:11 AM UTC-5, acushl...@gmail.com wrote: > On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang wrote: > > i have these task which i believe i have done well to some level > > > > Create a function get_algorithm_result to implement the algorithm below > > >

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread Chris Angelico
On Mon, Mar 14, 2016 at 11:17 AM, wrote: > Hello, I have this same assignment to create Bank account and I am new to > python. please help me out. The best help you can get is: DO THE WORK. You can't simply ask for help without doing any work first. If you want to learn how to write Python co

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread MRAB
On 2016-03-14 00:40, Chris Angelico wrote: On Mon, Mar 14, 2016 at 11:17 AM, wrote: Hello, I have this same assignment to create Bank account and I am new to python. please help me out. The best help you can get is: DO THE WORK. You can't simply ask for help without doing any work first.

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread Chris Angelico
On Mon, Mar 14, 2016 at 11:57 AM, MRAB wrote: > On 2016-03-14 00:40, Chris Angelico wrote: >> >> On Mon, Mar 14, 2016 at 11:17 AM, wrote: >>> >>> Hello, I have this same assignment to create Bank account and I am new to >>> python. please help me out. >> >> >> The best help you can get is: >> >>

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread Ben Finney
chetam.che...@gmail.com writes: > Hello, I have this same assignment to create Bank account and I am new > to python. Welcome to Python! If you have an assignment, that implies you are working through a course and you have received enough teaching to attempt the task yourself. > please help me o

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-03-13 Thread BartC
On 14/03/2016 00:17, chetam.che...@gmail.com wrote: Create a class called BankAccount Create a constructor that takes in an integer and assigns this to a `balance` property. Create a method called `deposit` that takes in cash deposit amount and updates the balance accordingly.

Re: The Cost of Dynamism (was Re: Pyhon 2.x or 3.x, which is faster?)

2016-03-13 Thread Steven D'Aprano
On Mon, 14 Mar 2016 12:16 am, BartC wrote: > On 13/03/2016 09:39, Steven D'Aprano wrote: >> On Sun, 13 Mar 2016 04:54 am, BartC wrote: > >>> Common sense tells you it is unlikely. >> >> Perhaps your common sense is different from other people's common sense. >> To me, and many other Python progra

Re: looping and searching in numpy array

2016-03-13 Thread srinivas devaki
problem is infact not related to numpy at all. the complexity of your algorithm is O(len(npArray1) * len(npArray2)) which means the number of computations that you are doing is in the range of 10**10, if the absolute difference between the maximum element and minimum element is less than 10**6, y