Hi,
I was wondering if there was a shorthand way to get a reference to a method
object from within that method's code.
Take this code snippet as an example:
import re
class MyClass(object):
def find_line(self, lines):
if not hasattr(MyClass.do_work, matcher):
Paddy O'Loughlin wrote:
Hi,
I was wondering if there was a shorthand way to get a reference to a method
object from within that method's code.
Take this code snippet as an example:
import re
class MyClass(object):
def find_line(self, lines):
if not hasattr(MyClass.do_work,
Paddy O'Loughlin wrote:
Hi,
I was wondering if there was a shorthand way to get a reference to a
method object from within that method's code.
Take this code snippet as an example:
import re
class MyClass(object):
def find_line(self, lines):
if not hasattr(MyClass.do_work,
I suspect that the inspection module has your answer, but that it'll be
bulkier, and much slower than just doing what you're doing already.
Hmm.
Yeah, it does appear to be bulky. I don't think it's really any more use
than what I'm doing already.
Why not use the default arguments gimmick?
Paddy O'Loughlin wrote:
I suspect that the inspection module has your answer, but that it'll be
bulkier, and much slower than just doing what you're doing already.
Hmm.
Yeah, it does appear to be bulky. I don't think it's really any more use
than what I'm doing already.
Why not use the