> "Panos Laganakos" <[EMAIL PROTECTED]> (PL) wrote:
>PL> Thanks Ben.
>PL> What does it mean that they're statically bound?
It means that the default values are evaluated at definition time. At that
time there isn't a variable 'self' defined. It would only work if the
defaults would be evaluat
On Apr 23, 2006, at 4:59 PM, Panos Laganakos wrote:
> Thanks Ben.
>
> What does it mean that they're statically bound?
>
> It seems weird that I'm not able to access variables in the class
> namespace even though these attributes come into existance after class
> instantiation.
>
The parameters
Thanks Ben.
What does it mean that they're statically bound?
It seems weird that I'm not able to access variables in the class
namespace even though these attributes come into existance after class
instantiation.
--
http://mail.python.org/mailman/listinfo/python-list
Panos Laganakos wrote:
> I'd like to know how its possible to pass a data attribute as a method
> parameter.
>
> Something in the form of:
>
> class MyClass:
> def __init__(self):
> self.a = 10
> self.b = '20'
>
> def my_method(self, param1=self.a, param2=self.b):
>
Hello,
I'd like to know how its possible to pass a data attribute as a method
parameter.
Something in the form of:
class MyClass:
def __init__(self):
self.a = 10
self.b = '20'
def my_method(self, param1=self.a, param2=self.b):
pass
Seems to produce a NameError o