![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Can't extend function type
From: Diez B. Roggisch <deets@nospam.web.de>
Date: Fri Oct 07 2005 - 10:25:22 CEST
Paul Rubin wrote:
Well - function inheritance is not known so far in python - and in no
How do you expect to create f and g, even if above construct would work?
f * g
But then how did you plan to declare f?
def f(composable_function)(x):
obviously won't work.
So the only way to achieve this with current semantics is to make f anf
class ComposeableFunction(object):
def __call__(self, *args, **kwargs):
def __mul__(self, other):
class f(ComposeableFunction):
class g(ComposeableFunction):
f = f()
print f(4)
Diez
|