Re: [Tutor] Instance attribute as a parameter's default value

2005-08-26 Thread Kent Johnson
Jan Eden wrote: > Hi, > > Jan Eden wrote on 26.08.2005: > > >>Hi, >> >>I need to use an instance attribute as the default value for a parameter to a >>method. >> >>This obviously won't work: >> >>page.Children() >> >>def Children(self, id=self.id, level=2): >> >>How can I get the id parameter t

Re: [Tutor] Instance attribute as a parameter's default value

2005-08-26 Thread Pierre Barbier de Reuille
Jan Eden a écrit : > Hi, > > Jan Eden wrote on 26.08.2005: > > >>Hi, >> >>I need to use an instance attribute as the default value for a parameter to a >>method. >> >>This obviously won't work: >> >>page.Children() >> >>def Children(self, id=self.id, level=2): >> >>How can I get the id parame

Re: [Tutor] Instance attribute as a parameter's default value

2005-08-26 Thread Jan Eden
Hi, Jan Eden wrote on 26.08.2005: >Hi, > >I need to use an instance attribute as the default value for a parameter to a >method. > >This obviously won't work: > >page.Children() > >def Children(self, id=self.id, level=2): > >How can I get the id parameter to use the attribute page.id? I know I c

[Tutor] Instance attribute as a parameter's default value

2005-08-26 Thread Jan Eden
Hi, I need to use an instance attribute as the default value for a parameter to a method. This obviously won't work: page.Children() def Children(self, id=self.id, level=2): How can I get the id parameter to use the attribute page.id? I know I could simply use the method call page.Children(