I mostly agree with what Ben says, comments below.
On Wed, Jul 01, 2015 at 12:48:47PM +1000, Ben Finney wrote:
> Alan Gauld writes:
>
> > Whilst I agree with the general use of super I'm not sure what
> > the MRO resolution has to do with this case?
>
> When accessing the superclass, the MRO is
On Wed, Jul 01, 2015 at 10:40:20PM +0100, Alan Gauld wrote:
> >Multiple inheitance is a fact in Python, and good practice is to not
> >arbitrarily write classes that break it.
>
> That depends on what you mean by break it., MI should allow the
> inheriting class to specify which, if any, of its
On Thu, Jul 2, 2015 at 9:57 AM, Joshua Valdez wrote:
>
> Hi so I figured out my problem, with this code and its working great but its
> still taking a very long time to process...I was wondering if there was a way
> to do this with just regular expressions instead of parsing the text with
> lxm
>
> So I got my code working now and it looks like this
>
> TAG = '{http://www.mediawiki.org/xml/export-0.10/}page'
> doc = etree.iterparse(wiki)
>
> for _, node in doc:
> if node.tag == TAG:
> title =
> node.find("{http://www.mediawiki.org/xml/export-0.10/}title";).text
> if t
Hi so I figured out my problem, with this code and its working great but
its still taking a very long time to process...I was wondering if there was
a way to do this with just regular expressions instead of parsing the text
with lxml...
the idea would be to identify a tag and then move to the nex
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?
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http
On Thu, Jul 2, 2015 at 12:30 PM, 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?
Unsure. How would it be observable?
[The following is not beginner
Danny Yoo wrote:
> On Thu, Jul 2, 2015 at 12:30 PM, 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?
> Unsure. How would it be observable?
[snip i
On 02/07/15 20:30, 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?
As soon as you mention memory space in relation to how something
works in Python you know
Steven D'Aprano writes:
> I mostly agree with what Ben says, comments below.
>
> On Wed, Jul 01, 2015 at 12:48:47PM +1000, Ben Finney wrote:
> > So please use `super`, even in single inheritance. Otherwise you are
> > restricting the usefulness of your class: it can never be used with
> >
Alan Gauld writes:
> On 01/07/15 03:48, Ben Finney wrote:
> > Alan Gauld writes:
> >
> >> Whilst I agree with the general use of super I'm not sure what
> >> the MRO resolution has to do with this case?
> >
> > When accessing the superclass, the MRO is always relevant
>
> Can you explain that?
>
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?
class MyClass:
def setdata(self, data):
self.data = data
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 not just an implementation detail, it is p
On 02Jul2015 17: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?
Um, they all g
On Thu, Jul 02, 2015 at 05:39:12PM -0700, 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.
I'm not sure what you mean by this. *All* objects have their own ID, and
instantiations of methods *don't*
On 03/07/2015 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?
I understand t
16 matches
Mail list logo