Re: Global variables within classes.

2007-11-11 Thread uestc_mahui
On 11 10 , 10 01 , Donn Ingle <[EMAIL PROTECTED]> wrote: > > > def pop(self): > > item = self.list[-1] > > del self.list[-1] > > return item > > Is there some reason you do all that and not a self.list.pop(0)? > Hi. There are no special reasons I do it that way. Just

Re: Global variables within classes.

2007-11-10 Thread uestc_mahui
On 11 10 , 5 48 , Donn Ingle <[EMAIL PROTECTED]> wrote: > ## == API in another module perhaps === > Class Stack: > def push(self,stuff): > pass > > Class Canvas: > def do(self): > s.push("data") #I don't feel right about 's' here. > > Class Thing: > def buzz(self): > print s.pop(0) > >