On Apr 4, 5:25 pm, John Nagle [EMAIL PROTECTED] wrote:
Bruno Desthuilliers wrote:
Paul Rubin a écrit :
Brian Vanderburg II [EMAIL PROTECTED] writes:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object.
Ugh. Avoid that if
On 8 avr, 11:39, méchoui [EMAIL PROTECTED] wrote:
On Apr 4, 5:25 pm, John Nagle [EMAIL PROTECTED] wrote:
Bruno Desthuilliers wrote:
Paul Rubin a écrit :
Brian Vanderburg II [EMAIL PROTECTED] writes:
I've checked out some ways to get this to work. I want to be able to
add a new
Brian Vanderburg II wrote:
I don't know if this is the correct place to send this question.
It is.
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object. I've tested two
different methods that cause problems with
Brian Vanderburg II [EMAIL PROTECTED] writes:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object.
Ugh. Avoid that if you can. But see:
http://en.wikipedia.org/wiki/Monkey_patch
--
Paul Rubin a écrit :
Brian Vanderburg II [EMAIL PROTECTED] writes:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object.
Ugh. Avoid that if you can.
Why so ? OO is about objects, not classes, and adding methods on a
Peter Otten a écrit :
(snip)
Anyway, here is one more option to add too the zoo:
class A(object):
... def __init__(self, f, x):
... self._f = f
... self.x = x
... @property
... def f(self):
... return self._f.__get__(self)
... def __del__(self):
Bruno Desthuilliers wrote:
Paul Rubin a écrit :
Brian Vanderburg II [EMAIL PROTECTED] writes:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object.
Ugh. Avoid that if you can.
Why so ? OO is about objects, not classes, and
And for such a behavior they've termed monkeying
Thus, the coinage Monkeypatching for what you want to do:
http://mail.python.org/pipermail/python-dev/2008-January/076194.html
There are a group of people who think monkeypatching is destroying ruby.
You still probably should avoid it for
I don't know if this is the correct place to send this question.
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object. I've tested two
different methods that cause problems with 'deleting'/garbage collection
(__del__ may never
On Apr 3, 2:57 pm, Brian Vanderburg II [EMAIL PROTECTED]
wrote:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object. I've tested two
different methods that cause problems with 'deleting'/garbage collection
(__del__ may never
En Thu, 03 Apr 2008 21:57:56 -0300, Brian Vanderburg II
[EMAIL PROTECTED] escribió:
I don't know if this is the correct place to send this question.
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object. I've tested two
En Thu, 03 Apr 2008 22:43:30 -0300, Roger Miller
[EMAIL PROTECTED] escribió:
On Apr 3, 2:57 pm, Brian Vanderburg II [EMAIL PROTECTED]
wrote:
I've checked out some ways to get this to work. I want to be able to
add a new function to an instance of an object. I've tested two
different
12 matches
Mail list logo