Re: [Tutor] Loop not iterating

2015-07-03 Thread Nym City via Tutor
Thank to very much for replying.  The second solution that you proposed worked perfectly: import csvdomains = open('top500domains.csv')domainsReader = csv.reader(domains)domains = ["https://www."; + row[1] for row in domainsReader]for domain in domains:    print(domain) The above solution is p

Re: [Tutor] Inheritance, superclass, ‘super’

2015-07-03 Thread Oscar Benjamin
On 3 July 2015 at 00:47, Ben Finney wrote: >> That depends on what you mean by break it., MI should allow the >> inheriting class to specify which, if any, of its direct superclasses >> methods are invoked. > > That “should” is contrary to Python's collaborative multiple inheritance > model. Inste

Re: [Tutor] Are the methods in a class copied or just linked to?

2015-07-03 Thread Oscar Benjamin
On 3 July 2015 at 02:17, Steven D'Aprano wrote: > On Thu, Jul 02, 2015 at 12:30:23PM -0700, Jim Mooney Py3.4.3winXP wrote: > >> When an instance uses a class method, does it actually use the method that >> is in the class object's memory space, or is the method copied to the >> instance? > > The f

Re: [Tutor] Are the methods in a class copied or just linked to?

2015-07-03 Thread Steven D'Aprano
On Fri, Jul 03, 2015 at 10:32:52AM +0100, Alan Gauld wrote: > On 03/07/15 02:17, Steven D'Aprano wrote: > >On Thu, Jul 02, 2015 at 12:30:23PM -0700, Jim Mooney Py3.4.3winXP wrote: > > > >>When an instance uses a class method, does it actually use the method that > >>is in the class object's memory

Re: [Tutor] Are the methods in a class copied or just linked to?

2015-07-03 Thread Alan Gauld
On 03/07/15 02:17, Steven D'Aprano wrote: On Thu, Jul 02, 2015 at 12:30:23PM -0700, Jim Mooney Py3.4.3winXP wrote: When an instance uses a class method, does it actually use the method that is in the class object's memory space, or is the method copied to the instance? The first. And it is no

Re: [Tutor] method conflict?

2015-07-03 Thread Alan Gauld
On 03/07/15 01:39, Jim Mooney Py3.4.3winXP wrote: Okay, it appears the method in a class has its own ID, but all instantiations of that method have identical IDs. But what happens if we have a huge number of instantiations trying to access the identical method at the same time? They all execute