Greg Ewing wrote:
Nick Coghlan wrote:
else:
# Returned a different object, make a new proxy
result = type(self)(result)
You might want to check that the result has the
same type as the proxied object before doing that.
Yep - and I really think it would need to do this. T
Nick Coghlan wrote:
else:
# Returned a different object, make a new proxy
result = type(self)(result)
You might want to check that the result has the
same type as the proxied object before doing that.
--
Greg
___
Python-Dev maili
Armin Ronacher wrote:
I'm currently not
providing any __r*__ methods as I was too lazy to test on each call if the
method that is proxied is providing an __rsomething__ or not, and if not come up
with an ad-hoc implementation by calling __something__ and reversing the
arguments passed.
I don't
Fred Drake wrote:
On May 21, 2008, at 5:41 AM, Nick Coghlan wrote:
While a proxy class written in C would no doubt be faster than one
written in Python, one of the things I'm hoping to achieve is for the
stdlib generic proxy to serve as an example for people writing their
own new-style proxy c
Fred Drake wrote:
On May 21, 2008, at 5:41 AM, Nick Coghlan wrote:
While a proxy class written in C would no doubt be faster than one
written in Python, one of the things I'm hoping to achieve is for the
stdlib generic proxy to serve as an example for people writing their
own new-style proxy c
On May 21, 2008, at 5:41 AM, Nick Coghlan wrote:
While a proxy class written in C would no doubt be faster than one
written in Python, one of the things I'm hoping to achieve is for
the stdlib generic proxy to serve as an example for people writing
their own new-style proxy classes in additi
Fred Drake wrote:
Nick Coghlan wrote:
So what do people think of including a ProxyBase implementation in 2.6
and 3.0 that explicitly delegates all of the C-level slots to a
designated target instance?
On May 20, 2008, at 7:55 PM, Greg Ewing wrote:
Sounds good to me.
Same here. There's an
Nick Coghlan wrote:
So what do people think of including a ProxyBase implementation in
2.6 and 3.0 that explicitly delegates all of the C-level slots to a
designated target instance?
On May 20, 2008, at 7:55 PM, Greg Ewing wrote:
Sounds good to me.
Same here. There's an implementation i
Nick Coghlan wrote:
So what do people think of including a ProxyBase implementation in 2.6
and 3.0 that explicitly delegates all of the C-level slots to a
designated target instance?
Sounds good to me.
--
Greg
___
Python-Dev mailing list
Python-Dev@
Nick Coghlan wrote:
One of the tasks where classic classes are currently far superior to
new-style classes is in writing proxy classes like weakref.proxy -
cases where nearly all operations need to be delegated to some other
object, with only a few being handled via the proxy type object itself
One of the tasks where classic classes are currently far superior to
new-style classes is in writing proxy classes like weakref.proxy - cases
where nearly all operations need to be delegated to some other object,
with only a few being handled via the proxy type object itself.
With classic clas
11 matches
Mail list logo